def removeTrainingFromCarousel(self, isList = True): clientType = SPECIAL_CLIENT_WINDOWS.TRAINING_LIST if isList else SPECIAL_CLIENT_WINDOWS.TRAINING_ROOM clientID = channel_num_gen.getClientID4SpecialWindow(clientType) if not clientID: LOG_ERROR('Client ID not found', 'removeTrainingToCarousel') return self._handleRemoveRequest(clientID)
def addFalloutToCarousel(self): clientID = channel_num_gen.getClientID4SpecialWindow(SPECIAL_CLIENT_WINDOWS.FALLOUT) if not clientID: LOG_ERROR('Client ID not found', 'addFalloutToCarousel') return currCarouselItemCtx = _defCarouselItemCtx._replace(label='#fallout:channel/label', criteria={POP_UP_CRITERIA.VIEW_ALIAS: 'falloutBattleSelectorWindow'}, openHandler=self.showFalloutWindow) self._handleAddPreBattleRequest(clientID, currCarouselItemCtx._asdict())
def removeEpicTrainingFromCarousel(self, isList=True, closeWindow=True): if not IS_DEVELOPMENT: return clientType = SPECIAL_CLIENT_WINDOWS.EPIC_TRAINING_LIST if isList else SPECIAL_CLIENT_WINDOWS.EPIC_TRAINING_ROOM clientID = channel_num_gen.getClientID4SpecialWindow(clientType) if not clientID: LOG_ERROR('Client ID not found', 'removeEpicTrainingFromCarousel') return self.__handleRemoveRequest(clientID, closeWindow=closeWindow)
def addFalloutToCarousel(self): clientID = channel_num_gen.getClientID4SpecialWindow( SPECIAL_CLIENT_WINDOWS.FALLOUT) if not clientID: LOG_ERROR('Client ID not found', 'addFalloutToCarousel') return currCarouselItemCtx = _defCarouselItemCtx._replace( label='#fallout:channel/label', criteria={ POP_UP_CRITERIA.VIEW_ALIAS: 'falloutBattleSelectorWindow' }, openHandler=self.showFalloutWindow) self.__handleAddPreBattleRequest(clientID, currCarouselItemCtx._asdict())
def addTrainingToCarousel(self, isList = True): if isList: clientType = SPECIAL_CLIENT_WINDOWS.TRAINING_LIST alias = PREBATTLE_ALIASES.TRAINING_LIST_VIEW_PY handler = self._showTrainingList else: clientType = SPECIAL_CLIENT_WINDOWS.TRAINING_ROOM alias = PREBATTLE_ALIASES.TRAINING_ROOM_VIEW_PY handler = self._returnToTrainingRoom clientID = channel_num_gen.getClientID4SpecialWindow(clientType) if not clientID: LOG_ERROR('Client ID not found', 'addTrainingToCarousel') return currCarouselItemCtx = _defCarouselItemCtx._replace(label=MENU.HEADERBUTTONS_BATTLE_TYPES_TRAINING, criteria={POP_UP_CRITERIA.VIEW_ALIAS: alias}, viewType=ViewTypes.LOBBY_SUB, openHandler=handler) self._handleAddPreBattleRequest(clientID, currCarouselItemCtx._asdict())
def addTrainingToCarousel(self, isList=True): self.removeTrainingFromCarousel(not isList, closeWindow=False) if isList: clientType = SPECIAL_CLIENT_WINDOWS.TRAINING_LIST alias = PREBATTLE_ALIASES.TRAINING_LIST_VIEW_PY handler = lambda: self.__fireEvent( events.TrainingEvent(events.TrainingEvent.SHOW_TRAINING_LIST)) else: clientType = SPECIAL_CLIENT_WINDOWS.TRAINING_ROOM alias = PREBATTLE_ALIASES.TRAINING_ROOM_VIEW_PY handler = lambda: self.__fireEvent( events.TrainingEvent(events.TrainingEvent. RETURN_TO_TRAINING_ROOM)) clientID = channel_num_gen.getClientID4SpecialWindow(clientType) if not clientID: LOG_ERROR('Client ID not found', 'addTrainingToCarousel') return currCarouselItemCtx = _defCarouselItemCtx._replace( label=MENU.HEADERBUTTONS_BATTLE_TYPES_TRAINING, criteria={POP_UP_CRITERIA.VIEW_ALIAS: alias}, layer=WindowLayer.SUB_VIEW, openHandler=handler) self.__handleAddPreBattleRequest(clientID, currCarouselItemCtx._asdict())
def getClientID(self): return channel_num_gen.getClientID4SpecialWindow(SPECIAL_CLIENT_WINDOWS.FALLOUT)
def removeFalloutFromCarousel(self): clientID = channel_num_gen.getClientID4SpecialWindow(SPECIAL_CLIENT_WINDOWS.FALLOUT) if not clientID: LOG_ERROR("Client ID not found", "removeFalloutFromCarousel") return self._handleRemoveRequest(clientID)
def getID(self): return channel_num_gen.getClientID4SpecialWindow(channel_num_gen.SPECIAL_CLIENT_WINDOWS.CLUB_CHAT)
def getID(self): return channel_num_gen.getClientID4SpecialWindow( channel_num_gen.SPECIAL_CLIENT_WINDOWS.CLUB_CHAT)
def removeFalloutFromCarousel(self): clientID = channel_num_gen.getClientID4SpecialWindow(SPECIAL_CLIENT_WINDOWS.FALLOUT) if not clientID: LOG_ERROR('Client ID not found', 'removeFalloutFromCarousel') return self._handleRemoveRequest(clientID)