def showVehicleStats(vehTypeCompDescr): g_eventBus.handleEvent(events.LoadViewEvent( VIEW_ALIAS.LOBBY_PROFILE, ctx={'itemCD': vehTypeCompDescr}), scope=EVENT_BUS_SCOPE.LOBBY)
def onCloseTechTree(self): if self._canBeClosed: self.__stopTopOfTheTreeSounds() self.fireEvent(events.LoadViewEvent(VIEW_ALIAS.LOBBY_HANGAR), scope=EVENT_BUS_SCOPE.LOBBY)
def showBattleConsumesIntro(): g_eventBus.handleEvent( events.LoadViewEvent( FORTIFICATION_ALIASES.FORT_COMBAT_RESERVES_INTRO_ALIAS), EVENT_BUS_SCOPE.LOBBY)
def __onSettingsChanged(self, diff): if 'isRegularQuestEnabled' in diff and not diff[ 'isRegularQuestEnabled']: self.fireEvent(events.LoadViewEvent(VIEW_ALIAS.LOBBY_HANGAR), scope=EVENT_BUS_SCOPE.LOBBY)
def openRequestWindow(self): self.fireEvent( events.LoadViewEvent(CLANS_ALIASES.CLAN_PROFILE_INVITES_WINDOW_PY), EVENT_BUS_SCOPE.LOBBY) self.destroy()
def goToScene(self, sceneID): event = self.config.getSceneEvent(sceneID) if event: g_eventBus.handleEvent(events.LoadViewEvent( SFViewLoadParams(event)), scope=EVENT_BUS_SCOPE.LOBBY)
def showFAQWindow(self): self.fireEvent(events.LoadViewEvent(MESSENGER_VIEW_ALIAS.FAQ_WINDOW), scope=EVENT_BUS_SCOPE.LOBBY)
def showVehicleCompare(): g_eventBus.handleEvent(events.LoadViewEvent(VIEW_ALIAS.VEHICLE_COMPARE), scope=EVENT_BUS_SCOPE.LOBBY)
def showRankedPrimeTimeWindow(): g_eventBus.handleEvent( events.LoadViewEvent( alias=RANKEDBATTLES_ALIASES.RANKED_BATTLE_PRIME_TIME, ctx={}), EVENT_BUS_SCOPE.LOBBY)
def showBattleResultsWindow(arenaUniqueID): g_eventBus.handleEvent( events.LoadViewEvent( VIEW_ALIAS.BATTLE_RESULTS, getViewName(VIEW_ALIAS.BATTLE_RESULTS, str(arenaUniqueID)), {'arenaUniqueID': arenaUniqueID}), EVENT_BUS_SCOPE.LOBBY)
def showBoostersWindow(): g_eventBus.handleEvent(events.LoadViewEvent(VIEW_ALIAS.BOOSTERS_WINDOW), EVENT_BUS_SCOPE.LOBBY)
def showClanInvitesWindow(): g_eventBus.handleEvent( events.LoadViewEvent(CLANS_ALIASES.CLAN_PROFILE_INVITES_WINDOW_PY), EVENT_BUS_SCOPE.LOBBY)
def showClanSearchWindow(): alias = CLANS_ALIASES.CLAN_SEARCH_WINDOW_PY g_eventBus.handleEvent(events.LoadViewEvent(alias, alias, ctx=None), EVENT_BUS_SCOPE.LOBBY) return
def showHangar(): g_eventBus.handleEvent(events.LoadViewEvent(VIEW_ALIAS.LOBBY_HANGAR), scope=EVENT_BUS_SCOPE.LOBBY)
def fortModernization(self): self.fireEvent(events.LoadViewEvent( FORTIFICATION_ALIASES.FORT_MODERNIZATION_WINDOW_ALIAS, ctx={'data': self.buildingID}), scope=EVENT_BUS_SCOPE.LOBBY)
def showVehicleSellDialog(vehInvID): g_eventBus.handleEvent( events.LoadViewEvent(VIEW_ALIAS.VEHICLE_SELL_DIALOG, ctx={'vehInvID': int(vehInvID)}), EVENT_BUS_SCOPE.LOBBY)
def fortDestroy(self): self.fireEvent(events.LoadViewEvent( FORTIFICATION_ALIASES.FORT_DEMOUNT_BUILDING_WINDOW, ctx={'data': self.buildingID}), scope=EVENT_BUS_SCOPE.LOBBY)
def showTrainingSettings(self): self.fireEvent(events.LoadViewEvent( PREBATTLE_ALIASES.TRAINING_SETTINGS_WINDOW_PY, ctx={'isCreateRequest': False}), scope=EVENT_BUS_SCOPE.LOBBY)
def inviteFriendRequest(self): self.fireEvent(events.LoadViewEvent(PREBATTLE_ALIASES.SEND_INVITES_WINDOW_PY, ctx={'prbName': 'unit', 'ctrlType': CTRL_ENTITY_TYPE.UNIT}), scope=EVENT_BUS_SCOPE.LOBBY)
def onCrewDogMoreInfoClick(self): self.fireEvent(events.LoadViewEvent(VIEW_ALIAS.CREW_ABOUT_DOG_WINDOW), EVENT_BUS_SCOPE.LOBBY)
def _defaultExitEvent(): return events.LoadViewEvent(SFViewLoadParams(VIEW_ALIAS.LOBBY_HANGAR), name=VIEW_ALIAS.LOBBY_HANGAR)
def onCloseView(self): returnAlias = self.__getFromCtx('returnAlias', VIEW_ALIAS.LOBBY_HANGAR) self.fireEvent(events.LoadViewEvent(returnAlias, ctx=self.__ctx), EVENT_BUS_SCOPE.LOBBY)
def openReferralManagement(self): self.fireEvent( events.LoadViewEvent(VIEW_ALIAS.REFERRAL_MANAGEMENT_WINDOW), EVENT_BUS_SCOPE.LOBBY) self.destroy()
def atCall(self, cd): cd.avoid() g_eventBus.handleEvent( events.LoadViewEvent(VIEW_ALIAS.SQUAD_PROMO_WINDOW), EVENT_BUS_SCOPE.LOBBY)
def openInviteWindow(self): self.fireEvent( events.LoadViewEvent( CLANS_ALIASES.CLAN_PERSONAL_INVITES_WINDOW_PY), EVENT_BUS_SCOPE.LOBBY) self.destroy()
def fortDirection(self): self.fireEvent( events.LoadViewEvent( FORTIFICATION_ALIASES.FORT_CREATE_DIRECTION_WINDOW_ALIAS), EVENT_BUS_SCOPE.LOBBY)
def __onVehicleBecomeElite(self, vehTypeCompDescr): self.fireEvent( events.LoadViewEvent( VIEW_ALIAS.ELITE_WINDOW, getViewName(VIEW_ALIAS.ELITE_WINDOW, vehTypeCompDescr), {'vehTypeCompDescr': vehTypeCompDescr}), EVENT_BUS_SCOPE.LOBBY)
def fortAssignPlayers(self): self.fireEvent(events.LoadViewEvent( FORTIFICATION_ALIASES.FORT_FIXED_PLAYERS_WINDOW_ALIAS, ctx={'data': self.buildingID}), scope=EVENT_BUS_SCOPE.LOBBY)
def loadFortView(): g_eventBus.handleEvent( events.LoadViewEvent(FORTIFICATION_ALIASES.FORTIFICATIONS_VIEW_ALIAS), EVENT_BUS_SCOPE.LOBBY)
def showPrebattleSendInvitesWindow(self): if self.canSendInvite(): self.fireEvent(events.LoadViewEvent(SFViewLoadParams(PREBATTLE_ALIASES.SEND_INVITES_WINDOW_PY), ctx={'prbName': self.__prbName, 'ctrlType': CTRL_ENTITY_TYPE.LEGACY}), scope=EVENT_BUS_SCOPE.LOBBY)