import ui import snd import systemSetting import net import chat import app import localeInfo import constInfo import chrmgr import player class MenuDialog(ui.ScriptWindow): def __init__(self): ui.ScriptWindow.__init__(self) self.__Load() def __del__(self): ui.ScriptWindow.__del__(self) def Destroy(self): self.ClearDictionary() self.swithbot = None def __Load_LoadScript(self, fileName): try: pyScriptLoader = ui.PythonScriptLoader() pyScriptLoader.LoadScriptFile(self, fileName) except: import exception exception.Abort('tools.__Load_LoadScript') def __Load_BindObject(self): try: self.titlebar = self.GetChild('TitleBar') self.botao10 = self.GetChild2("swithbot") except: import exception exception.Abort('tools.__Load_BindObject') def __Load(self): self.__Load_LoadScript('tools.py') self.__Load_BindObject() self.SetCenterPosition() self.GetChild('TitleBar').SetCloseEvent(ui.__mem_func__(self.Close)) self.botao10.SetEvent(ui.__mem_func__(self.botaoswithbot)) def Show(self): ui.ScriptWindow.Show(self) def botaoswithbot(self): self.Close() def OnPressEscapeKey(self): self.Close() return TRUE def __OnCloseButtonClick(self): self.Close() return TRUE def Close(self): self.Hide()