コード例 #1
0
 def addSpecBattlesToCarousel(self):
     clientID = channel_num_gen.getClientID4LazyChannel(LAZY_CHANNEL.SPECIAL_BATTLES)
     if not clientID:
         LOG_ERROR('Client ID not found', 'addSpecBattlesToCarousel')
         return
     currCarouselItemCtx = _defCarouselItemCtx._replace(label=LAZY_CHANNEL.SPECIAL_BATTLES, order=channel_num_gen.getOrder4LazyChannel(LAZY_CHANNEL.SPECIAL_BATTLES), isNotified=True, criteria={POP_UP_CRITERIA.VIEW_ALIAS: PREBATTLE_ALIASES.BATTLE_SESSION_LIST_WINDOW_PY}, openHandler=self.loadBattleSessionList)
     self.__fireEvent(ChannelManagementEvent(clientID, PreBattleChannelEvent.REQUEST_TO_ADD, currCarouselItemCtx._asdict()))
コード例 #2
0
ファイル: events_dispatcher.py プロジェクト: webiumsk/WoT
 def addSpecBattlesToCarousel(self):
     clientID = channel_num_gen.getClientID4LazyChannel(LAZY_CHANNEL.SPECIAL_BATTLES)
     if not clientID:
         LOG_ERROR('Client ID not found', 'addSpecBattlesToCarousel')
         return
     currCarouselItemCtx = _defCarouselItemCtx._replace(label=LAZY_CHANNEL.SPECIAL_BATTLES, order=channel_num_gen.getOrder4LazyChannel(LAZY_CHANNEL.SPECIAL_BATTLES), isNotified=True, criteria={POP_UP_CRITERIA.VIEW_ALIAS: PREBATTLE_ALIASES.BATTLE_SESSION_LIST_WINDOW_PY}, openHandler=self.loadBattleSessionList)
     self._fireEvent(ChannelManagementEvent(clientID, PreBattleChannelEvent.REQUEST_TO_ADD, currCarouselItemCtx._asdict()))
コード例 #3
0
def addCompaniesToCarousel():
    clientID = channel_num_gen.getClientID4LazyChannel(LAZY_CHANNEL.COMPANIES)
    if not clientID:
        LOG_ERROR('Client ID not found', 'addCompaniesToCarousel')
        return
    else:
        g_eventBus.handleEvent(ChannelManagementEvent(
            clientID, ChannelManagementEvent.REQUEST_TO_ADD, {
                'label':
                LAZY_CHANNEL.COMPANIES,
                'canClose':
                False,
                'isNotified':
                False,
                'icon':
                None,
                'order':
                channel_num_gen.getOrder4LazyChannel(LAZY_CHANNEL.COMPANIES),
                'criteria': {
                    POP_UP_CRITERIA.VIEW_ALIAS:
                    guiFactory.getAliasByEvent(
                        events.ShowWindowEvent.SHOW_COMPANIES_WINDOW)
                },
                'openHandler':
                loadCompaniesWindow
            }),
                               scope=EVENT_BUS_SCOPE.LOBBY)
        return
コード例 #4
0
def addSpecBattlesToCarousel():
    clientID = channel_num_gen.getClientID4LazyChannel(
        LAZY_CHANNEL.SPECIAL_BATTLES)
    if not clientID:
        LOG_ERROR('Client ID not found', 'addSpecBattlesToCarousel')
        return
    else:
        g_eventBus.handleEvent(ChannelManagementEvent(
            clientID, ChannelManagementEvent.REQUEST_TO_ADD, {
                'label':
                LAZY_CHANNEL.SPECIAL_BATTLES,
                'canClose':
                False,
                'isNotified':
                False,
                'icon':
                None,
                'order':
                channel_num_gen.getOrder4LazyChannel(
                    LAZY_CHANNEL.SPECIAL_BATTLES),
                'criteria': {
                    POP_UP_CRITERIA.VIEW_ALIAS:
                    guiFactory.getAliasByEvent(
                        events.ShowWindowEvent.SHOW_BATTLE_SESSION_LIST)
                },
                'openHandler':
                loadBattleSessionList
            }),
                               scope=EVENT_BUS_SCOPE.LOBBY)
        return
コード例 #5
0
 def removeSpecBattlesFromCarousel(self):
     clientID = channel_num_gen.getClientID4LazyChannel(
         LAZY_CHANNEL.SPECIAL_BATTLES)
     if not clientID:
         LOG_ERROR('Client ID not found', 'removeSpecBattlesFromCarousel')
         return
     self._fireEvent(
         ChannelManagementEvent(clientID,
                                PreBattleChannelEvent.REQUEST_TO_REMOVE))
コード例 #6
0
def removeSpecBattlesFromCarousel():
    clientID = channel_num_gen.getClientID4LazyChannel(
        LAZY_CHANNEL.SPECIAL_BATTLES)
    if not clientID:
        LOG_ERROR('Client ID not found', 'removeSpecBattlesFromCarousel')
        return
    g_eventBus.handleEvent(ChannelManagementEvent(
        clientID, ChannelManagementEvent.REQUEST_TO_REMOVE),
                           scope=EVENT_BUS_SCOPE.LOBBY)
コード例 #7
0
 def acceptInvite(self):
     yield lambda callback: callback(None)
     prbID = self._inviteInfo.getID()
     invite = self.prbAutoInvites.getInvite(prbID)
     postActions = [actions.LeavePrbModalEntity()]
     finishActions = [_DisableNotify(channel_num_gen.getClientID4LazyChannel(LAZY_CHANNEL.SPECIAL_BATTLES))]
     if g_preDefinedHosts.isRoamingPeriphery(invite.peripheryID):
         success = yield DialogsInterface.showI18nConfirmDialog('changeRoamingPeriphery')
         if not success:
             return
     self.prbPeripheriesHandler.join(invite.peripheryID, JoinBattleSessionCtx(prbID, invite.prbType, 'prebattle/join'), postActions, finishActions)
コード例 #8
0
ファイル: invite_windows.py プロジェクト: webiumsk/WOT-0.9.12
 def acceptInvite(self):
     yield lambda callback: callback(None)
     prbID = self._inviteInfo.getID()
     invite = self.prbAutoInvites.getInvite(prbID)
     postActions = []
     if self.prbDispatcher.hasModalEntity():
         postActions.append(actions.LeavePrbModalEntity())
     finishActions = [_DisableNotify(channel_num_gen.getClientID4LazyChannel(LAZY_CHANNEL.SPECIAL_BATTLES))]
     if g_preDefinedHosts.isRoamingPeriphery(invite.peripheryID):
         success = yield DialogsInterface.showI18nConfirmDialog('changeRoamingPeriphery')
         if not success:
             return
     self.prbPeripheriesHandler.join(invite.peripheryID, JoinBattleSessionCtx(prbID, invite.prbType, 'prebattle/join'), postActions, finishActions)
コード例 #9
0
def addCompaniesToCarousel():
    clientID = channel_num_gen.getClientID4LazyChannel(LAZY_CHANNEL.COMPANIES)
    if not clientID:
        LOG_ERROR('Client ID not found', 'addCompaniesToCarousel')
        return
    else:
        g_eventBus.handleEvent(ChannelManagementEvent(clientID, ChannelManagementEvent.REQUEST_TO_ADD, {'label': LAZY_CHANNEL.COMPANIES,
         'canClose': False,
         'isNotified': False,
         'icon': None,
         'order': channel_num_gen.getOrder4LazyChannel(LAZY_CHANNEL.COMPANIES),
         'criteria': {POP_UP_CRITERIA.VIEW_ALIAS: guiFactory.getAliasByEvent(events.ShowWindowEvent.SHOW_COMPANIES_WINDOW)},
         'openHandler': loadCompaniesWindow}), scope=EVENT_BUS_SCOPE.LOBBY)
        return
コード例 #10
0
def addSpecBattlesToCarousel():
    clientID = channel_num_gen.getClientID4LazyChannel(LAZY_CHANNEL.SPECIAL_BATTLES)
    if not clientID:
        LOG_ERROR('Client ID not found', 'addSpecBattlesToCarousel')
        return
    else:
        g_eventBus.handleEvent(ChannelManagementEvent(clientID, ChannelManagementEvent.REQUEST_TO_ADD, {'label': LAZY_CHANNEL.SPECIAL_BATTLES,
         'canClose': False,
         'isNotified': False,
         'icon': None,
         'order': channel_num_gen.getOrder4LazyChannel(LAZY_CHANNEL.SPECIAL_BATTLES),
         'criteria': {POP_UP_CRITERIA.VIEW_ALIAS: guiFactory.getAliasByEvent(events.ShowWindowEvent.SHOW_BATTLE_SESSION_LIST)},
         'openHandler': loadBattleSessionList}), scope=EVENT_BUS_SCOPE.LOBBY)
        return
コード例 #11
0
 def notifySpecialBattleWindow(self):
     clientID = channel_num_gen.getClientID4LazyChannel(
         LAZY_CHANNEL.SPECIAL_BATTLES)
     if not clientID:
         LOG_ERROR('Client ID not found', 'notifySpecialBattleWindow')
         return
     self.__fireEvent(events.ChannelManagementEvent(
         clientID, events.ChannelManagementEvent.REQUEST_TO_CHANGE, {
             'key': 'isNotified',
             'value': True,
             'isShowByReq': True,
             'showIfClosed': True
         }),
                      scope=EVENT_BUS_SCOPE.LOBBY)
コード例 #12
0
 def restoreBattleSessionList(self):
     viewContainer = self.app.containerManager
     window = viewContainer.getView(
         WindowLayer.WINDOW, {
             POP_UP_CRITERIA.VIEW_ALIAS:
             PREBATTLE_ALIASES.BATTLE_SESSION_LIST_WINDOW_PY
         })
     if window is None:
         clientID = channel_num_gen.getClientID4LazyChannel(
             LAZY_CHANNEL.SPECIAL_BATTLES)
         if not clientID:
             LOG_ERROR('Client ID not found', 'restoreBattleSessionList')
             return
         self.__fireEvent(
             events.ChannelManagementEvent(
                 clientID, ChannelCarouselEvent.OPEN_BUTTON_CLICK,
                 {'clientID': clientID}))
     return
コード例 #13
0
ファイル: companylistview.py プロジェクト: webiumsk/WoT
 def getClientID(self):
     return channel_num_gen.getClientID4LazyChannel(LAZY_CHANNEL.COMPANIES)
コード例 #14
0
ファイル: events_dispatcher.py プロジェクト: webiumsk/WoT
 def removeSpecBattlesFromCarousel(self):
     clientID = channel_num_gen.getClientID4LazyChannel(LAZY_CHANNEL.SPECIAL_BATTLES)
     if not clientID:
         LOG_ERROR('Client ID not found', 'removeSpecBattlesFromCarousel')
         return
     self._fireEvent(ChannelManagementEvent(clientID, PreBattleChannelEvent.REQUEST_TO_REMOVE))
コード例 #15
0
def removeSpecBattlesFromCarousel():
    clientID = channel_num_gen.getClientID4LazyChannel(LAZY_CHANNEL.SPECIAL_BATTLES)
    if not clientID:
        LOG_ERROR('Client ID not found', 'removeSpecBattlesFromCarousel')
        return
    g_eventBus.handleEvent(ChannelManagementEvent(clientID, ChannelManagementEvent.REQUEST_TO_REMOVE), scope=EVENT_BUS_SCOPE.LOBBY)
コード例 #16
0
 def getClientID(self):
     return channel_num_gen.getClientID4LazyChannel(
         self.proto.messages.getCompanyRoomName())
コード例 #17
0
def rqActivateLazyChannel(name, component):
    clientID = channel_num_gen.getClientID4LazyChannel(name)
    if not clientID:
        LOG_ERROR("Client ID is not found", name)
    else:
        rqActivateChannel(clientID, component)
コード例 #18
0
ファイル: events_dispatcher.py プロジェクト: kblw/wot_client
def rqExitFromLazyChannel(name):
    clientID = channel_num_gen.getClientID4LazyChannel(name)
    if not clientID:
        LOG_ERROR('Client ID is not found', name)
    else:
        rqExitFromChannel(clientID)
コード例 #19
0
ファイル: events_dispatcher.py プロジェクト: kblw/wot_client
def rqDeactivateLazyChannel(name):
    clientID = channel_num_gen.getClientID4LazyChannel(name)
    if not clientID:
        LOG_ERROR('Client ID is not found', name)
    else:
        rqDeactivateChannel(clientID)
コード例 #20
0
 def getClientID(self):
     return channel_num_gen.getClientID4LazyChannel(LAZY_CHANNEL.COMPANIES)
コード例 #21
0
 def getClientID(self):
     return channel_num_gen.getClientID4LazyChannel(self.proto.messages.getCompanyRoomName())
コード例 #22
0
def rqExitFromLazyChannel(name):
    clientID = channel_num_gen.getClientID4LazyChannel(name)
    if not clientID:
        LOG_ERROR('Client ID is not found', name)
    else:
        rqExitFromChannel(clientID)
コード例 #23
0
 def getClientID(self):
     return channel_num_gen.getClientID4LazyChannel(LAZY_CHANNEL.SPECIAL_BATTLES)
コード例 #24
0
 def getClientID(self):
     return channel_num_gen.getClientID4LazyChannel(
         LAZY_CHANNEL.SPECIAL_BATTLES)
コード例 #25
0
def rqDeactivateLazyChannel(name):
    clientID = channel_num_gen.getClientID4LazyChannel(name)
    if not clientID:
        LOG_ERROR('Client ID is not found', name)
    else:
        rqDeactivateChannel(clientID)