Пример #1
0
def showMissionAwardWindow(award):
    name = getUniqueViewName(VIEW_ALIAS.MISSION_AWARD_WINDOW)
    g_eventBus.handleEvent(
        events.LoadViewEvent(VIEW_ALIAS.MISSION_AWARD_WINDOW,
                             name=getUniqueViewName(
                                 VIEW_ALIAS.MISSION_AWARD_WINDOW),
                             ctx={'award': award}), EVENT_BUS_SCOPE.LOBBY)
Пример #2
0
def showAwardWindow(award, isUniqueName=True):
    if isUniqueName:
        name = getUniqueViewName(VIEW_ALIAS.AWARD_WINDOW)
    else:
        name = VIEW_ALIAS.AWARD_WINDOW
    g_eventBus.handleEvent(
        events.LoadViewEvent(VIEW_ALIAS.AWARD_WINDOW,
                             name=name,
                             ctx={'award': award}), EVENT_BUS_SCOPE.LOBBY)
def showAwardWindow(award, isUniqueName=True):
    if isPopupsWindowsOpenDisabled():
        LOG_WARNING('Award popup disabled', award, isUniqueName)
        return
    if isUniqueName:
        name = getUniqueViewName(VIEW_ALIAS.AWARD_WINDOW)
    else:
        name = VIEW_ALIAS.AWARD_WINDOW
    g_eventBus.handleEvent(events.LoadViewEvent(VIEW_ALIAS.AWARD_WINDOW, name=name, ctx={'award': award}), EVENT_BUS_SCOPE.LOBBY)
Пример #4
0
def showMissionAwardWindow(award):
    """
    Shows modal dialog with award(s) and congratulations.
    :param award: AwardAbstract instance object
    """
    g_eventBus.handleEvent(
        events.LoadViewEvent(VIEW_ALIAS.MISSION_AWARD_WINDOW,
                             name=getUniqueViewName(
                                 VIEW_ALIAS.MISSION_AWARD_WINDOW),
                             ctx={'award': award}), EVENT_BUS_SCOPE.LOBBY)
def showPersonalMissionsQuestAwardScreen(quest, ctx, proxyEvent):
    alias = PERSONAL_MISSIONS_ALIASES.PERSONAL_MISSIONS_QUEST_AWARD_SCREEN_ALIAS
    g_eventBus.handleEvent(
        events.LoadViewEvent(alias,
                             name=getUniqueViewName(alias),
                             ctx={
                                 'quest': quest,
                                 'ctxData': ctx,
                                 'proxyEvent': proxyEvent
                             }), EVENT_BUS_SCOPE.LOBBY)
Пример #6
0
def showAwardWindow(award, isUniqueName = True):
    """
    :param award: AwardAbstract instance object
    :param isUniqueName:
    """
    if isUniqueName:
        name = getUniqueViewName(VIEW_ALIAS.AWARD_WINDOW)
    else:
        name = VIEW_ALIAS.AWARD_WINDOW
    g_eventBus.handleEvent(events.LoadViewEvent(VIEW_ALIAS.AWARD_WINDOW, name=name, ctx={'award': award}), EVENT_BUS_SCOPE.LOBBY)
Пример #7
0
 def __showVideo(self):
     webHandlers = webApiCollection(ui_web_api.CloseViewWebApi,
                                    sound_web_api.SoundWebApi,
                                    sound_web_api.HangarSoundWebApi)
     alias = VIEW_ALIAS.BROWSER_VIEW
     self.fireEvent(
         events.LoadViewEvent(SFViewLoadParams(alias,
                                               getUniqueViewName(alias)),
                              ctx={
                                  'url': getRankedBattlesIntroPageUrl(),
                                  'webHandlers': webHandlers,
                                  'returnAlias': self.alias
                              }), EVENT_BUS_SCOPE.LOBBY)
Пример #8
0
 def __showBrowserView(self, url):
     webHandlers = createBattleRoyaleWebHanlders()
     alias = VIEW_ALIAS.BROWSER_VIEW
     g_eventBus.handleEvent(
         events.LoadViewEvent(SFViewLoadParams(alias,
                                               getUniqueViewName(alias)),
                              ctx={
                                  'url':
                                  url,
                                  'webHandlers':
                                  webHandlers,
                                  'returnAlias':
                                  VIEW_ALIAS.LOBBY_HANGAR,
                                  'onServerSettingsChange':
                                  self.__serverSettingsChangeBrowserHandler
                              }), EVENT_BUS_SCOPE.LOBBY)
 def __showBrowserView(self, url):
     from gui.Scaleform.daapi.view.lobby.epicBattle.web_handlers import createFrontlineWebHandlers
     webHandlers = createFrontlineWebHandlers()
     alias = VIEW_ALIAS.BROWSER_VIEW
     g_eventBus.handleEvent(
         events.LoadViewEvent(SFViewLoadParams(alias,
                                               getUniqueViewName(alias)),
                              ctx={
                                  'url':
                                  url,
                                  'webHandlers':
                                  webHandlers,
                                  'returnAlias':
                                  VIEW_ALIAS.LOBBY_HANGAR,
                                  'onServerSettingsChange':
                                  self.__serverSettingsChangeBrowserHandler
                              }), EVENT_BUS_SCOPE.LOBBY)
Пример #10
0
def _showBrowserView(url, returnClb, soundSpaceID=None):
    webHandlers = webApiCollection(
        PromoWebApi, VehiclesWebApi, RequestWebApi, RankedBattlesWebApi,
        BattlePassWebApi, ui_web_api.OpenWindowWebApi,
        ui_web_api.CloseWindowWebApi, ui_web_api.OpenTabWebApi,
        ui_web_api.NotificationWebApi, ui_web_api.ContextMenuWebApi,
        ui_web_api.UtilWebApi, sound_web_api.SoundWebApi,
        sound_web_api.HangarSoundWebApi, ShopWebApi, SocialWebApi,
        BlueprintsConvertSaleWebApi, PlatformWebApi)
    ctx = {
        'url': url,
        'returnClb': returnClb,
        'webHandlers': webHandlers,
        'returnAlias': VIEW_ALIAS.LOBBY_HANGAR
    }
    if soundSpaceID is not None:
        ctx['soundSpaceID'] = soundSpaceID
    alias = VIEW_ALIAS.BROWSER_VIEW
    g_eventBus.handleEvent(
        events.LoadViewEvent(SFViewLoadParams(alias, getUniqueViewName(alias)),
                             ctx=ctx), EVENT_BUS_SCOPE.LOBBY)
    return
Пример #11
0
def showAwardWindow(award, isUniqueName = True):
    if isUniqueName:
        name = getUniqueViewName(VIEW_ALIAS.AWARD_WINDOW)
    else:
        name = VIEW_ALIAS.AWARD_WINDOW
    g_eventBus.handleEvent(events.LoadViewEvent(VIEW_ALIAS.AWARD_WINDOW, name=name, ctx={'award': award}), EVENT_BUS_SCOPE.LOBBY)
Пример #12
0
def showMissionAwardWindow(award):
    name = getUniqueViewName(VIEW_ALIAS.MISSION_AWARD_WINDOW)
    g_eventBus.handleEvent(events.LoadViewEvent(VIEW_ALIAS.MISSION_AWARD_WINDOW, name=getUniqueViewName(VIEW_ALIAS.MISSION_AWARD_WINDOW), ctx={'award': award}), EVENT_BUS_SCOPE.LOBBY)