def __processBackClick(self, ctx=None):
     if self._previewBackCb:
         self._previewBackCb()
     elif self._backAlias == VIEW_ALIAS.LOBBY_RESEARCH:
         event_dispatcher.showResearchView(self._vehicleCD)
     elif self._backAlias == VIEW_ALIAS.VEHICLE_PREVIEW:
         entity = ctx.get('entity', None) if ctx else None
         if entity:
             descriptor = entity.typeDescriptor
             event_dispatcher.showVehiclePreview(
                 descriptor.type.compactDescr,
                 previewAlias=self._previousBackAlias)
         else:
             event_dispatcher.showHangar()
     elif self._backAlias == VIEW_ALIAS.LOBBY_STORE:
         if isIngameShopEnabled():
             showWebShop(url=getBuyVehiclesUrl())
         else:
             showOldShop(
                 ctx={
                     'tabId': STORE_TYPES.SHOP,
                     'component': STORE_CONSTANTS.VEHICLE
                 })
     else:
         event = g_entitiesFactories.makeLoadEvent(self._backAlias,
                                                   {'isBackEvent': True})
         self.fireEvent(event, scope=EVENT_BUS_SCOPE.LOBBY)
     return
Пример #2
0
 def navigateToStore(self):
     if isIngameShopEnabled():
         showWebShop(getBuyVehiclesUrl())
     else:
         showOldShop(ctx={
             'tabId': STORE_TYPES.SHOP,
             'component': STORE_CONSTANTS.VEHICLE
         })
Пример #3
0
 def onOpenShop(self):
     if isIngameShopEnabled():
         url = getBonsUrl()
         showWebShop(url)
     else:
         showOldShop(
             ctx={
                 'tabId': STORE_CONSTANTS.SHOP,
                 'component': STORE_CONSTANTS.BATTLE_BOOSTER
             })
     self.destroy()
Пример #4
0
 def navigateToStore(self):
     if self.__currentTabId == STORAGE_CONSTANTS.INVENTORY_TAB_ALL:
         showWebShop()
     if self.__currentTabId == STORAGE_CONSTANTS.INVENTORY_TAB_EQUIPMENT:
         showWebShop(getBuyOptionalDevicesUrl())
     elif self.__currentTabId == STORAGE_CONSTANTS.INVENTORY_TAB_CONSUMABLE:
         showWebShop(getBuyEquipmentUrl())
Пример #5
0
 def __getReturnCallback(self, backUrl):
     return (lambda: showWebShop(backUrl)) if backUrl is not None else None
 def navigateToStore(self):
     showWebShop(getWebShopURL())
 def navigateToStore(self):
     showWebShop(getBuyBoostersUrl())
Пример #8
0
 def openShop(self, cmd):
     if isIngameShopEnabled():
         event_dispatcher.showWebShop(url=None, customPath=cmd.path)
     else:
         event_dispatcher.showOldShop()
     return