예제 #1
0
 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)
예제 #2
0
 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())
예제 #3
0
 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)
예제 #4
0
 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())
예제 #5
0
 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())
예제 #6
0
 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())
예제 #7
0
 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())
예제 #8
0
 def getClientID(self):
     return channel_num_gen.getClientID4SpecialWindow(SPECIAL_CLIENT_WINDOWS.FALLOUT)
예제 #9
0
 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)
예제 #10
0
 def getID(self):
     return channel_num_gen.getClientID4SpecialWindow(channel_num_gen.SPECIAL_CLIENT_WINDOWS.CLUB_CHAT)
예제 #11
0
 def getID(self):
     return channel_num_gen.getClientID4SpecialWindow(
         channel_num_gen.SPECIAL_CLIENT_WINDOWS.CLUB_CHAT)
예제 #12
0
 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)