i m using Ava2 metiN2 file
when i try to create a simple button step i do
/uiscript/uiscript
import uiscriptlocale
window = {
"name":"SimpleBonusWindow",
"style":("movable","float","attach"),
"x":300, "y":200,
"width":200, "height":100,
"children": [
{
"name":"close_button",
"type":"button",
"x":170, "y":0, "text":"X"
},
{
"name":"example_button",
"type":"button",
"x": 60, "y": 40, "text":"Show HP"
},
],
}
then /root
import ui
import wndMgr
import localeInfo
import item
import player
import chat
class CustomBtnWindow(ui.ScriptWindow):
def __init__(self):
super(CustomBtnWindow, self).__init__()
self.bonusList = []
def LoadWindow(self):
pyScrLoader = ui.PythonScriptLoader()
pyScrLoader.LoadScriptFile(self, "UIScript/CustomBtn.py")
self.btnClose = self.GetChild("close_button")
self.btnClose.SetEvent(ui.__mem_func__(self.Close))
self.btnExample = self.GetChild("example_button")
self.btnExample.SetEvent(ui.__mem_func__(self.OnExampleClick))
def OnExampleClick(self):
# For demo: fetch a stat and display in chat
stat = player.GetStatus(item.APPLY_MAX_HP)
chat.AppendChat(chat.CHAT_TYPE_INFO, "Max HP: %d" % stat)
def OnPressEscapeKey(self):
self.Close()
return True
def Close(self):
wndMgr.Hide(self.hWnd)
/root/interfacemodule.py
def __MakeButton(self):
self.Btn = uiCustomBtn.CustomButton()
self.Btn.LoadWindow()
# self.Btn.Hide()
def MakeInterface(self):
self.__MakeButton()
0730 12:41:15592 ::
networkModule.py(line:188) SetSelectCharacterPhase
system.py(line:177) __hybrid_import
system.py(line:142) _process_result
introSelect.py(line:18) <module>
system.py(line:177) __hybrid_import
system.py(line:142) _process_result
uiInventory.py(line:23) <module>
system.py(line:177) __hybrid_import
system.py(line:142) _process_result
game.py(line:68) <module>
system.py(line:177) __hybrid_import
system.py(line:142) _process_result
interfaceModule.py(line:142) <module>
system.py(line:184) __hybrid_import
networkModule.SetSelectCharacterPhase - <type 'exceptions.ImportError'>:No module named uiCustomBtn
0730 12:41:15593 :: ============================================================================================================
0730 12:41:15593 :: Abort!!!!
i followed same way as a module called tablebonus where you show bonsu of the character