コード例 #1
0
ファイル: events_dispatcher.py プロジェクト: webiumsk/WoT
 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
ファイル: events_dispatcher.py プロジェクト: webiumsk/WoT
 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
ファイル: entities.py プロジェクト: webiumsk/WOT-0.9.12
 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)