def showModuleInfo(self, moduleId):
     if moduleId is None:
         return LOG_ERROR('There is error while attempting to show module info window: ', str(moduleId))
     else:
         self.fireEvent(events.LoadViewEvent(VIEW_ALIAS.MODULE_INFO_WINDOW, getViewName(VIEW_ALIAS.MODULE_INFO_WINDOW, moduleId), {'moduleCompactDescr': str(moduleId),
          'vehicleDescr': g_currentVehicle.item.descriptor}))
         return
Esempio n. 2
0
 def __onVehicleBecomeElite(self, vehTypeCompDescr):
     self.fireEvent(
         events.LoadViewEvent(
             VIEW_ALIAS.ELITE_WINDOW,
             getViewName(VIEW_ALIAS.ELITE_WINDOW, vehTypeCompDescr),
             {"vehTypeCompDescr": vehTypeCompDescr},
         )
     )
 def showPersonalCase(self):
     self.fireEvent(
         events.LoadViewEvent(
             VIEW_ALIAS.PERSONAL_CASE,
             functions.getViewName(VIEW_ALIAS.PERSONAL_CASE, self._tankmanID),
             {"tankmanID": self._tankmanID, "page": 0},
         )
     )
Esempio n. 4
0
 def dropSkills(self):
     self.fireEvent(
         LoadViewEvent(
             VIEW_ALIAS.TANKMAN_SKILLS_DROP_WINDOW,
             getViewName(VIEW_ALIAS.TANKMAN_SKILLS_DROP_WINDOW, self.tmanInvID),
             {"tankmanID": self.tmanInvID},
         )
     )
Esempio n. 5
0
 def openPersonalCase(self, value, tabNumber):
     self.fireEvent(
         events.LoadViewEvent(
             VIEW_ALIAS.PERSONAL_CASE,
             getViewName(VIEW_ALIAS.PERSONAL_CASE, value),
             ctx={"tankmanID": int(value), "page": int(tabNumber)},
         )
     )
def showConnectToSecureChannelWindow(channel):
    g_eventBus.handleEvent(
        events.LoadViewEvent(
            MESSENGER_VIEW_ALIAS.CONNECT_TO_SECURE_CHANNEL_WINDOW,
            getViewName(MESSENGER_VIEW_ALIAS.CONNECT_TO_SECURE_CHANNEL_WINDOW, channel.getClientID()),
            {"channel": channel},
        ),
        scope=EVENT_BUS_SCOPE.LOBBY,
    )
def showProfileWindow(databaseID, userName):
    alias = VIEW_ALIAS.PROFILE_WINDOW
    g_eventBus.handleEvent(
        events.LoadViewEvent(alias,
                             getViewName(alias, databaseID),
                             ctx={
                                 'userName': userName,
                                 'databaseID': databaseID
                             }), EVENT_BUS_SCOPE.LOBBY)
def showModuleInfo(itemCD, vehicleDescr):
    itemCD = int(itemCD)
    g_eventBus.handleEvent(
        events.LoadViewEvent(
            VIEW_ALIAS.MODULE_INFO_WINDOW,
            getViewName(VIEW_ALIAS.MODULE_INFO_WINDOW, itemCD), {
                'moduleCompactDescr': itemCD,
                'vehicleDescr': vehicleDescr
            }), EVENT_BUS_SCOPE.LOBBY)
 def __loadBrowser(self, url, title, width, height, isModal, showRefresh, showCreateWaiting):
     browserCtrl = dependency.instance(IBrowserController)
     browserId = yield browserCtrl.load(url=url, title=title, browserSize=(width, height), isModal=isModal, showActionBtn=showRefresh, showCreateWaiting=showCreateWaiting, handlers=self._createHandlers())
     browser = browserCtrl.getBrowser(browserId)
     if browser is not None:
         browser.ignoreKeyEvents = True
     alias = getViewName(VIEW_ALIAS.BROWSER_WINDOW_MODAL if isModal else VIEW_ALIAS.BROWSER_WINDOW, browserId)
     self._onBrowserOpen(alias)
     return
Esempio n. 10
0
def showClanProfileWindow(clanDbID, clanAbbrev):
    alias = CLANS_ALIASES.CLAN_PROFILE_MAIN_WINDOW_PY
    g_eventBus.handleEvent(
        events.LoadViewEvent(alias,
                             getViewName(alias, clanDbID),
                             ctx={
                                 'clanDbID': clanDbID,
                                 'clanAbbrev': clanAbbrev
                             }), EVENT_BUS_SCOPE.LOBBY)
Esempio n. 11
0
def showPersonalCase(tankmanInvID, tabIndex, scope = EVENT_BUS_SCOPE.DEFAULT):
    """
    Show personalCase window on current tab.
    :param tankmanInvID: int-type tankman inventory ID.
    :param tabIndex: int-type tab index
    :param scope:
    """
    g_eventBus.handleEvent(events.LoadViewEvent(VIEW_ALIAS.PERSONAL_CASE, getViewName(VIEW_ALIAS.PERSONAL_CASE, tankmanInvID), {'tankmanID': tankmanInvID,
     'page': tabIndex}), scope)
Esempio n. 12
0
 def openExchangeFreeToTankmanXpWindow(self):
     self.fireEvent(
         events.LoadViewEvent(
             VIEW_ALIAS.EXCHANGE_FREE_TO_TANKMAN_XP_WINDOW,
             getViewName(VIEW_ALIAS.EXCHANGE_FREE_TO_TANKMAN_XP_WINDOW, self.tmanInvID),
             {"tankManId": self.tmanInvID},
         ),
         EVENT_BUS_SCOPE.LOBBY,
     )
Esempio n. 13
0
 def onShowInfo(self, data):
     dataCompactId = int(data.id)
     item = g_itemsCache.items.getItemByCD(dataCompactId)
     if item is None:
         return LOG_ERROR('There is error while attempting to show vehicle info window: ', str(dataCompactId))
     if item.itemTypeID == GUI_ITEM_TYPE.VEHICLE:
         shared_events.showVehicleInfo(item.intCD)
     else:
         self.fireEvent(events.LoadViewEvent(VIEW_ALIAS.MODULE_INFO_WINDOW, getViewName(VIEW_ALIAS.MODULE_INFO_WINDOW, item.intCD), {'moduleCompactDescr': str(item.intCD),
          'isAdditionalInfoShow': i18n.makeString(MENU.MODULEINFO_ADDITIONALINFO)}))
 def __showBrowser(self, browserID, ctx):
     LOG_BROWSER('CTRL: Showing a browser: ', browserID, ctx['url'])
     if ctx.get('showWindow'):
         alias = ctx['alias']
         g_eventBus.handleEvent(
             LoadViewEvent(alias, getViewName(alias, browserID), ctx=ctx),
             EVENT_BUS_SCOPE.LOBBY)
     showBrowserCallback = ctx.get('showBrowserCallback')
     if showBrowserCallback:
         showBrowserCallback()
 def __destroyChangeModeWindow(self):
     if self.browserCtrl.getBrowser(self.__changeModeBrowserId):
         app = g_appLoader.getApp()
         if app is not None and app.containerManager is not None:
             windowAlias = getViewName(VIEW_ALIAS.BROWSER_WINDOW_MODAL, self.__changeModeBrowserId)
             window = app.containerManager.getView(ViewTypes.WINDOW, criteria={POP_UP_CRITERIA.UNIQUE_NAME: windowAlias})
             if window:
                 window.destroy()
     self.__changeModeBrowserId = 0
     return
Esempio n. 16
0
 def __showBrowser(self, browserID, ctx):
     _logger.info('CTRL: Showing a browser: %r - %s', browserID, ctx['url'])
     if ctx.get('showWindow'):
         alias = ctx['alias']
         g_eventBus.handleEvent(
             LoadViewEvent(SFViewLoadParams(alias,
                                            getViewName(alias, browserID)),
                           ctx=ctx), EVENT_BUS_SCOPE.LOBBY)
     showBrowserCallback = ctx.get('showBrowserCallback')
     if showBrowserCallback:
         showBrowserCallback()
Esempio n. 17
0
def showClubProfile(clubDbID, viewIdx=0):
    assert clubDbID
    alias = CYBER_SPORT_ALIASES.CYBER_SPORT_STATIC_PROFILE_PY
    g_eventBus.handleEvent(events.LoadViewEvent(alias,
                                                getViewName(
                                                    alias, int(clubDbID)),
                                                ctx={
                                                    'clubDbID': clubDbID,
                                                    'viewIdx': viewIdx
                                                }),
                           scope=EVENT_BUS_SCOPE.LOBBY)
Esempio n. 18
0
def _showBattleResults(arenaUniqueID, dataProvider):
    """
    :param arenaUniqueID: long, arena unique id
    :param dataProvider: gui.battle_results.data_providers.* instance
    """
    g_eventBus.handleEvent(
        events.LoadViewEvent(VIEW_ALIAS.BATTLE_RESULTS,
                             getViewName(VIEW_ALIAS.BATTLE_RESULTS,
                                         str(arenaUniqueID)),
                             ctx={'dataProvider': dataProvider}),
        EVENT_BUS_SCOPE.LOBBY)
Esempio n. 19
0
def showPremiumWindow(arenaUniqueID=0, premiumBonusesDiff=None):
    """
    Show premium window
    """
    g_eventBus.handleEvent(
        events.LoadViewEvent(VIEW_ALIAS.PREMIUM_WINDOW,
                             getViewName(VIEW_ALIAS.PREMIUM_WINDOW),
                             ctx={
                                 'arenaUniqueID': arenaUniqueID,
                                 'premiumBonusesDiff': premiumBonusesDiff
                             }), EVENT_BUS_SCOPE.LOBBY)
Esempio n. 20
0
 def showUserInfo(self, uid, userName):
     (userDossier, _, isHidden,) = yield g_itemsCache.items.requestUserDossier(int(uid))
     if userDossier is None:
         if isHidden:
             key = 'messenger/userInfoHidden'
         else:
             key = 'messenger/userInfoNotAvailable'
         DialogsInterface.showI18nInfoDialog(key, lambda result: None, I18nInfoDialogMeta(key, messageCtx={'userName': userName}))
     else:
         self.fireEvent(events.LoadViewEvent(VIEW_ALIAS.PROFILE_WINDOW, getViewName(VIEW_ALIAS.PROFILE_WINDOW, uid), {'userName': userName,
          'databaseID': int(uid)}), EVENT_BUS_SCOPE.LOBBY)
Esempio n. 21
0
 def showModuleInfo(self, moduleId):
     if moduleId is None:
         return LOG_ERROR('There is error while attempting to show module info window: ', str(moduleId))
     vehicle = g_currentVehicle.item
     vDescr = vehicle.descriptor
     _, _, battleID = self._getHistoricalBattleData()
     battle = g_eventsCache.getHistoricalBattles().get(battleID)
     if battle is not None and battle.canParticipateWith(vehicle.intCD):
         vDescr = battle.getVehicleModifiedDescr(vehicle)
     self.fireEvent(events.LoadViewEvent(VIEW_ALIAS.MODULE_INFO_WINDOW, getViewName(VIEW_ALIAS.MODULE_INFO_WINDOW, moduleId), {'moduleCompactDescr': str(moduleId),
      'vehicleDescr': vDescr}))
Esempio n. 22
0
def showClanSendInviteWindow(clanDbID):
    alias = CLANS_ALIASES.CLAN_PROFILE_SEND_INVITES_WINDOW_PY
    g_eventBus.handleEvent(events.LoadViewEvent(alias,
                                                getViewName(alias, clanDbID),
                                                ctx={
                                                    'clanDbID':
                                                    clanDbID,
                                                    'ctrlType':
                                                    CTRL_ENTITY_TYPE.UNIT
                                                }),
                           scope=EVENT_BUS_SCOPE.LOBBY)
Esempio n. 23
0
 def showModuleInfo(self, moduleId):
     if moduleId is None:
         return LOG_ERROR(
             'There is error while attempting to show module info window: ',
             str(moduleId))
     self.fireEvent(
         events.LoadViewEvent(
             VIEW_ALIAS.MODULE_INFO_WINDOW,
             getViewName(VIEW_ALIAS.MODULE_INFO_WINDOW, moduleId), {
                 'moduleCompactDescr': str(moduleId),
                 'vehicleDescr': g_currentVehicle.item.descriptor
             }))
Esempio n. 24
0
def showModuleInfo(itemCD, vehicleDescr):
    if constants.IS_BOOTCAMP_ENABLED:
        if g_bootcamp.isRunning():
            return
    itemCD = int(itemCD)
    g_eventBus.handleEvent(
        events.LoadViewEvent(
            VIEW_ALIAS.MODULE_INFO_WINDOW,
            getViewName(VIEW_ALIAS.MODULE_INFO_WINDOW, itemCD), {
                'moduleCompactDescr': itemCD,
                'vehicleDescr': vehicleDescr
            }), EVENT_BUS_SCOPE.LOBBY)
Esempio n. 25
0
    def _showAward(self, ctx):
        for setting, new_count in self.__postponedBoxes.iteritems():
            g_eventBus.handleEvent(
                events.LoadViewEvent(VIEW_ALIAS.LOBBY_NY_MISSIONS_REWARD,
                                     name=getViewName(
                                         VIEW_ALIAS.LOBBY_NY_MISSIONS_REWARD,
                                         setting),
                                     ctx={
                                         'rewards': new_count,
                                         'setting': setting
                                     }), EVENT_BUS_SCOPE.LOBBY)

        self.__postponedBoxes = defaultdict(int)
Esempio n. 26
0
def _loadBrowser(onBrowserOpen, handlersCreator, url, title, width, height, isModal, showRefresh, showCreateWaiting):
    """
    Load browser and show window
    Takes onBrowserOpen callback with str param: aliasId. Called after browser was created.
    """
    browserCtrl = dependency.instance(IBrowserController)
    browserId = yield browserCtrl.load(url=url, title=title, browserSize=(width, height), isModal=isModal, showActionBtn=showRefresh, showCreateWaiting=showCreateWaiting, handlers=handlersCreator() if callable(handlersCreator) else None)
    browser = browserCtrl.getBrowser(browserId)
    if browser is not None:
        browser.ignoreKeyEvents = True
    if onBrowserOpen is not None:
        alias = getViewName(VIEW_ALIAS.BROWSER_WINDOW_MODAL if isModal else VIEW_ALIAS.BROWSER_WINDOW, browserId)
        onBrowserOpen(alias)
    return
Esempio n. 27
0
 def onShowInfo(self, itemCD):
     dataCompactId = int(itemCD)
     item = g_itemsCache.items.getItemByCD(dataCompactId)
     if item is None:
         return LOG_ERROR('There is error while attempting to show vehicle info window: ', str(dataCompactId))
     else:
         if item.itemTypeID == GUI_ITEM_TYPE.VEHICLE:
             if item.isPreviewAllowed():
                 shared_events.showVehiclePreview(item.intCD, VIEW_ALIAS.LOBBY_STORE)
             else:
                 shared_events.showVehicleInfo(item.intCD)
         else:
             self.fireEvent(events.LoadViewEvent(VIEW_ALIAS.MODULE_INFO_WINDOW, getViewName(VIEW_ALIAS.MODULE_INFO_WINDOW, item.intCD), {'moduleCompactDescr': item.intCD,
              'isAdditionalInfoShow': i18n.makeString(MENU.MODULEINFO_ADDITIONALINFO)}), EVENT_BUS_SCOPE.LOBBY)
         return
def _handlerCloseBrowserWindow(onBrowserClose, command, ctx):
    if 'browser_id' in ctx:
        windowAlias = getViewName(ctx['browser_alias'], ctx['browser_id'])
        app = g_appLoader.getApp()
        if app is not None and app.containerManager is not None:
            browserWindow = app.containerManager.getView(
                ViewTypes.WINDOW,
                criteria={POP_UP_CRITERIA.UNIQUE_NAME: windowAlias})
            if browserWindow is not None:
                browserWindow.destroy()
            else:
                raise WebCommandException("Browser window can't be found!")
    if onBrowserClose is not None:
        onBrowserClose()
    return
Esempio n. 29
0
    def browser(self, cmd, ctx):
        if 'browser_id' in ctx:
            windowAlias = getViewName(ctx['browser_alias'], ctx['browser_id'])
            app = g_appLoader.getApp()
            if app is not None and app.containerManager is not None:
                supportedBrowserViewTypes = (ViewTypes.WINDOW, ViewTypes.OVERLAY)
                browserWindow = None
                for viewType in supportedBrowserViewTypes:
                    browserWindow = app.containerManager.getView(viewType, criteria={POP_UP_CRITERIA.UNIQUE_NAME: windowAlias})
                    if browserWindow is not None:
                        break

                if browserWindow is not None:
                    browserWindow.destroy()
                else:
                    raise WebCommandException('Browser window could not be found! May be alias "{}" is wrong or probably browser has unsupported viewType.'.format(windowAlias))
        self._onBrowserClose()
        return
Esempio n. 30
0
 def showModuleInfo(self, moduleId):
     if moduleId is None:
         return LOG_ERROR(
             'There is error while attempting to show module info window: ',
             str(moduleId))
     vehicle = g_currentVehicle.item
     vDescr = vehicle.descriptor
     _, _, battleID = self._getHistoricalBattleData()
     battle = g_eventsCache.getHistoricalBattles().get(battleID)
     if battle is not None and battle.canParticipateWith(vehicle.intCD):
         vDescr = battle.getVehicleModifiedDescr(vehicle)
     self.fireEvent(
         events.LoadViewEvent(
             VIEW_ALIAS.MODULE_INFO_WINDOW,
             getViewName(VIEW_ALIAS.MODULE_INFO_WINDOW, moduleId), {
                 'moduleCompactDescr': str(moduleId),
                 'vehicleDescr': vDescr
             }))
Esempio n. 31
0
    def browser(self, cmd, ctx):
        if 'browser_id' in ctx:
            windowAlias = getViewName(ctx['browser_alias'], ctx['browser_id'])
            appLoader = dependency.instance(IAppLoader)
            app = appLoader.getApp()
            if app is not None and app.containerManager is not None:
                supportedBrowserLayers = (WindowLayer.WINDOW,
                                          WindowLayer.FULLSCREEN_WINDOW,
                                          WindowLayer.TOP_WINDOW,
                                          WindowLayer.OVERLAY,
                                          WindowLayer.TOP_SUB_VIEW)
                browserWindow = None
                for layer in supportedBrowserLayers:
                    browserWindow = app.containerManager.getView(
                        layer, criteria=BrowserSearchCriteria(windowAlias))
                    if browserWindow is not None:
                        break

                if not browserWindow:
                    for layer in supportedBrowserLayers:
                        browserWindow = app.containerManager.getView(
                            layer,
                            criteria={
                                POP_UP_CRITERIA.UNIQUE_NAME: windowAlias
                            })
                        if browserWindow is not None:
                            break

                if browserWindow is not None:
                    browserWindow.destroy()
                else:
                    raise WebCommandException(
                        'Browser window could not be found! May be alias "{}" is wrong or probably browser has unsupported layer.'
                        .format(windowAlias))
        self._onBrowserClose()
        return
Esempio n. 32
0
 def dropSkills(self):
     self.fireEvent(LoadViewEvent(VIEW_ALIAS.TANKMAN_SKILLS_DROP_WINDOW, getViewName(VIEW_ALIAS.TANKMAN_SKILLS_DROP_WINDOW, self.tmanInvID), {'tankmanID': self.tmanInvID}), EVENT_BUS_SCOPE.LOBBY)
Esempio n. 33
0
def showModuleInfo(itemCD, vehicleDescr):
    g_eventBus.handleEvent(events.LoadViewEvent(VIEW_ALIAS.MODULE_INFO_WINDOW, getViewName(VIEW_ALIAS.MODULE_INFO_WINDOW, itemCD), {'moduleCompactDescr': itemCD,
     'vehicleDescr': vehicleDescr}), EVENT_BUS_SCOPE.LOBBY)
Esempio n. 34
0
def _showBattleResults(arenaUniqueID, dataProvider):
    g_eventBus.handleEvent(events.LoadViewEvent(VIEW_ALIAS.BATTLE_RESULTS, getViewName(VIEW_ALIAS.BATTLE_RESULTS, str(arenaUniqueID)), ctx={'dataProvider': dataProvider}), EVENT_BUS_SCOPE.LOBBY)
Esempio n. 35
0
def showPremiumCongratulationWindow(award):
    g_eventBus.handleEvent(events.LoadViewEvent(VIEW_ALIAS.PREMIUM_CONGRATULATION_WINDOW, getViewName(VIEW_ALIAS.PREMIUM_CONGRATULATION_WINDOW), ctx={'award': award}), EVENT_BUS_SCOPE.LOBBY)
Esempio n. 36
0
 def __showBrowser(self, browserID, ctx):
     g_eventBus.handleEvent(LoadViewEvent(VIEW_ALIAS.BROWSER_WINDOW, getViewName(VIEW_ALIAS.BROWSER_WINDOW, browserID), ctx=ctx), EVENT_BUS_SCOPE.LOBBY)
Esempio n. 37
0
 def __showLazyChannelWindow(self, event):
     alias = MESSENGER_VIEW_ALIAS.LAZY_CHANNEL_WINDOW
     self.loadViewWithDefName(
         alias,
         getViewName(MESSENGER_VIEW_ALIAS.LAZY_CHANNEL_WINDOW,
                     event.ctx.get('clientID')), event.ctx)
Esempio n. 38
0
 def __onVehicleBecomeElite(self, vehTypeCompDescr):
     self.fireEvent(
         events.LoadViewEvent(
             VIEW_ALIAS.ELITE_WINDOW,
             getViewName(VIEW_ALIAS.ELITE_WINDOW, vehTypeCompDescr),
             {'vehTypeCompDescr': vehTypeCompDescr}), EVENT_BUS_SCOPE.LOBBY)
Esempio n. 39
0
 def openPersonalCase(self, value, tabNumber):
     self.fireEvent(events.LoadViewEvent(VIEW_ALIAS.PERSONAL_CASE, getViewName(VIEW_ALIAS.PERSONAL_CASE, value), {'tankmanID': int(value),
      'page': int(tabNumber)}))
Esempio n. 40
0
 def __showAutoInviteWindow(self, event):
     alias = PREBATTLE_ALIASES.AUTO_INVITE_WINDOW_PY
     name = getViewName(PREBATTLE_ALIASES.AUTO_INVITE_WINDOW_PY, event.ctx.get('prbID'))
     self.loadViewWithDefName(alias, name, event.ctx)
Esempio n. 41
0
def showConnectToSecureChannelWindow(channel):
    g_eventBus.handleEvent(events.LoadViewEvent(
        MESSENGER_VIEW_ALIAS.CONNECT_TO_SECURE_CHANNEL_WINDOW,
        getViewName(MESSENGER_VIEW_ALIAS.CONNECT_TO_SECURE_CHANNEL_WINDOW,
                    channel.getClientID()), {'channel': channel}),
                           scope=EVENT_BUS_SCOPE.LOBBY)
Esempio n. 42
0
 def __showLobbyChannelWindow(self, event):
     alias = MESSENGER_VIEW_ALIAS.LOBBY_CHANNEL_WINDOW
     self.app.loadView(alias, getViewName(MESSENGER_VIEW_ALIAS.LOBBY_CHANNEL_WINDOW, event.ctx['clientID']), event.ctx)
Esempio n. 43
0
 def __showAutoInviteWindow(self, event):
     alias = PREBATTLE_ALIASES.AUTO_INVITE_WINDOW_PY
     name = getViewName(PREBATTLE_ALIASES.AUTO_INVITE_WINDOW_PY,
                        event.ctx.get('prbID'))
     self.loadViewWithDefName(alias, name, event.ctx)
Esempio n. 44
0
def showClubProfile(clubDbID, viewIdx = 0):
    raise clubDbID or AssertionError
    alias = CYBER_SPORT_ALIASES.CYBER_SPORT_STATIC_PROFILE_PY
    g_eventBus.handleEvent(events.LoadViewEvent(alias, getViewName(alias, int(clubDbID)), ctx={'clubDbID': clubDbID,
     'viewIdx': viewIdx}), scope=EVENT_BUS_SCOPE.LOBBY)
Esempio n. 45
0
def showClanProfileWindow(clanDbID):
    alias = CLANS_ALIASES.CLAN_PROFILE_MAIN_WINDOW_PY
    g_eventBus.handleEvent(events.LoadViewEvent(alias, getViewName(alias, clanDbID), ctx={'clanDbID': clanDbID}), EVENT_BUS_SCOPE.LOBBY)
Esempio n. 46
0
 def dropSkills(self):
     self.fireEvent(
         LoadViewEvent(
             VIEW_ALIAS.TANKMAN_SKILLS_DROP_WINDOW,
             getViewName(VIEW_ALIAS.TANKMAN_SKILLS_DROP_WINDOW,
                         self.tmanInvID), {'tankmanID': self.tmanInvID}))
Esempio n. 47
0
 def __showBrowser(self, browserID, ctx):
     g_eventBus.handleEvent(LoadViewEvent(VIEW_ALIAS.BROWSER_WINDOW, getViewName(VIEW_ALIAS.BROWSER_WINDOW, browserID), ctx=ctx), EVENT_BUS_SCOPE.LOBBY)
Esempio n. 48
0
 def __showLobbyChannelWindow(self, event):
     alias = MESSENGER_VIEW_ALIAS.LOBBY_CHANNEL_WINDOW
     self.loadViewWithDefName(
         alias,
         getViewName(MESSENGER_VIEW_ALIAS.LOBBY_CHANNEL_WINDOW,
                     event.ctx['clientID']), event.ctx)
Esempio n. 49
0
 def showPersonalCase(self):
     self.fireEvent(events.LoadViewEvent(VIEW_ALIAS.PERSONAL_CASE, functions.getViewName(VIEW_ALIAS.PERSONAL_CASE, self._itemId), {'tankmanID': int(self._itemId),
      'page': 0}))
Esempio n. 50
0
def showPersonalCase(tankmanInvID, tabIndex, scope = EVENT_BUS_SCOPE.DEFAULT):
    g_eventBus.handleEvent(events.LoadViewEvent(VIEW_ALIAS.PERSONAL_CASE, getViewName(VIEW_ALIAS.PERSONAL_CASE, tankmanInvID), {'tankmanID': tankmanInvID,
     'page': tabIndex}), scope)
Esempio n. 51
0
def showPremiumWindow():
    g_eventBus.handleEvent(events.LoadViewEvent(VIEW_ALIAS.PREMIUM_WINDOW, getViewName(VIEW_ALIAS.PREMIUM_WINDOW), ctx=None))
    return
Esempio n. 52
0
def showPremiumWindow(arenaUniqueID = 0):
    g_eventBus.handleEvent(events.LoadViewEvent(VIEW_ALIAS.PREMIUM_WINDOW, getViewName(VIEW_ALIAS.PREMIUM_WINDOW), ctx={'arenaUniqueID': arenaUniqueID}), EVENT_BUS_SCOPE.LOBBY)
Esempio n. 53
0
def showPersonalCase(tankmanInvID, tabIndex):
    g_eventBus.handleEvent(events.LoadViewEvent(VIEW_ALIAS.PERSONAL_CASE, getViewName(VIEW_ALIAS.PERSONAL_CASE, tankmanInvID), {'tankmanID': tankmanInvID,
     'page': tabIndex}))
Esempio n. 54
0
def showVehicleInfo(vehTypeCompDescr):
    g_eventBus.handleEvent(events.LoadViewEvent(VIEW_ALIAS.VEHICLE_INFO_WINDOW, getViewName(VIEW_ALIAS.VEHICLE_INFO_WINDOW, vehTypeCompDescr), ctx={'vehicleCompactDescr': int(vehTypeCompDescr)}), EVENT_BUS_SCOPE.LOBBY)
Esempio n. 55
0
 def __showLazyChannelWindow(self, event):
     alias = MESSENGER_VIEW_ALIAS.LAZY_CHANNEL_WINDOW
     self.app.loadView(alias, getViewName(MESSENGER_VIEW_ALIAS.LAZY_CHANNEL_WINDOW, event.ctx.get('clientID')), event.ctx)
Esempio n. 56
0
def showProfileWindow(databaseID, userName):
    alias = VIEW_ALIAS.PROFILE_WINDOW
    g_eventBus.handleEvent(events.LoadViewEvent(alias, getViewName(alias, databaseID), ctx={'userName': userName,
     'databaseID': databaseID}), EVENT_BUS_SCOPE.LOBBY)
Esempio n. 57
0
 def openExchangeFreeToTankmanXpWindow(self):
     self.fireEvent(events.LoadViewEvent(VIEW_ALIAS.EXCHANGE_FREE_TO_TANKMAN_XP_WINDOW, getViewName(VIEW_ALIAS.EXCHANGE_FREE_TO_TANKMAN_XP_WINDOW, self.tmanInvID), {'tankManId': self.tmanInvID}), EVENT_BUS_SCOPE.LOBBY)
Esempio n. 58
0
def showClanSendInviteWindow(clanDbID):
    alias = CLANS_ALIASES.CLAN_PROFILE_SEND_INVITES_WINDOW_PY
    g_eventBus.handleEvent(events.LoadViewEvent(alias, getViewName(alias, clanDbID), ctx={'clanDbID': clanDbID,
     'ctrlType': CTRL_ENTITY_TYPE.UNIT}), scope=EVENT_BUS_SCOPE.LOBBY)
Esempio n. 59
0
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)