def init(self): g_playerEvents.onAccountShowGUI += self.__pe_onAccountShowGUI g_playerEvents.onAvatarBecomePlayer += self.__pe_onAvatarBecomePlayer connectionManager.onDisconnected += self.__cm_onDisconnected windowsManager = GUIProxy.windowsManager() windowsManager.onInitBattleGUI += self.__wm_onInitBattleGUI windowsManager.onDestroyBattleGUI += self.__wm_onDestroyBattleGUI
def init(self): g_playerEvents.onGuiCacheSyncCompleted += self.__pe_onGuiCacheSyncCompleted g_playerEvents.onAvatarBecomePlayer += self.__pe_onAvatarBecomePlayer connectionManager.onDisconnected += self.__cm_onDisconnected windowsManager = GUIProxy.windowsManager() windowsManager.onInitBattleGUI += self.__wm_onInitBattleGUI windowsManager.onDestroyBattleGUI += self.__wm_onDestroyBattleGUI
def getGuiRoot(self): try: root = GUIProxy.windowsManager().battleWindow except AttributeError: LOG_CURRENT_EXCEPTION() root = None return root
def _resolveGuiRoot(self): proxy = None try: window = GUIProxy.windowsManager().window self._guiRef = weakref.ref(window) proxy = window.proxy except AttributeError: LOG_CURRENT_EXCEPTION() return proxy
def fini(self): g_playerEvents.onAccountShowGUI -= self.__pe_onAccountShowGUI g_playerEvents.onAvatarBecomePlayer -= self.__pe_onAvatarBecomePlayer connectionManager.onDisconnected -= self.__cm_onDisconnected windowsManager = GUIProxy.windowsManager() windowsManager.onInitBattleGUI -= self.__wm_onInitBattleGUI windowsManager.onDestroyBattleGUI -= self.__wm_onDestroyBattleGUI if self.__tutorial is not None: self.__dispatcher.stop() self.__tutorial.stop() return
def fini(self): g_playerEvents.onGuiCacheSyncCompleted -= self.__pe_onGuiCacheSyncCompleted g_playerEvents.onAvatarBecomePlayer -= self.__pe_onAvatarBecomePlayer connectionManager.onDisconnected -= self.__cm_onDisconnected windowsManager = GUIProxy.windowsManager() windowsManager.onInitBattleGUI -= self.__wm_onInitBattleGUI windowsManager.onDestroyBattleGUI -= self.__wm_onDestroyBattleGUI if self.__tutorial is not None: self.__dispatcher.stop() self.__tutorial.stop() self.__loggedDBIDs.clear() return
def _resolveGuiRoot(self): proxy = None try: window = GUIProxy.windowsManager().battleWindow self._guiRef = weakref.ref(window) proxy = window.proxy dispatcher = self.getDispatcher() if dispatcher is not None and proxy is not None: dispatcher.populateUI(proxy) except AttributeError: LOG_CURRENT_EXCEPTION() return proxy