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
def navigateToStore(self): if isIngameShopEnabled(): showWebShop(getBuyVehiclesUrl()) else: showOldShop(ctx={ 'tabId': STORE_TYPES.SHOP, 'component': STORE_CONSTANTS.VEHICLE })
def onOpenShop(self): if isIngameShopEnabled(): url = getBonsUrl() showWebShop(url) else: showOldShop( ctx={ 'tabId': STORE_CONSTANTS.SHOP, 'component': STORE_CONSTANTS.BATTLE_BOOSTER }) self.destroy()
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())
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())
def openShop(self, cmd): if isIngameShopEnabled(): event_dispatcher.showWebShop(url=None, customPath=cmd.path) else: event_dispatcher.showOldShop() return