def __onImageLoaded(self, requestedTeaserID, image): if not self.__teaserData or self.__teaserData[ 'promoID'] != requestedTeaserID: return self.__imagePath = getTextureLinkByID( ImageHelper.getMemoryTexturePath(image)) self.__stopTimer() isShopPromo = self.__teaserData.get( 'promoType') == self._SALE_PROMO_TYPE self.__viewProxy.as_showTeaserS({ 'postTitle': i18n.makeString(MENU.PROMO_TEASER_TITLE), 'postCounter': self.__promoCount, 'descr': self.__teaserData['description'], 'title': self.__teaserData.get('version', ''), 'isVideo': bool(self.__teaserData.get('video')), 'isShopPromo': isShopPromo, 'image': self.__imagePath }) self.__viewProxy.soundManager.playSound( PROMO_SOUNDS.SALE_TEASER if isShopPromo else PROMO_SOUNDS. INFO_TEASER) if self.__teaserData.get('finishTime'): self.__startTimer() self.__showCallback(self.__teaserData.get('promoID'))
def onClanEmblem32x32Received(self, clanDbID, emblem): clanEmblem = getTextureLinkByID( self.getMemoryTexturePath(emblem)) if emblem else None self.__battleQueueVO['myClanIcon'] = clanEmblem or '' self.as_setTypeInfoS(self.__battleQueueVO) self.prbEntity.getMatchmakingInfo(callback=self.__onMatchmakingInfo) return
def _packImageBlock(imagePath): return '' if not imagePath else "<br/><br/><img src='{path}'/>".format( path=getTextureLinkByID(imagePath))
def __getIcon(self, level): texture = self.__item.getTextureByProgressionLevel(self.__item.texture, level) return getTextureLinkByID(texture)
def previewIconUrlByProgressionLevel(self, level): if not self.isProgressive: return self.previewIconUrl previewIcon = self.previewIconByProgressionLevel(level) return getTextureLinkByID(previewIcon)
def previewIconUrl(self): return getTextureLinkByID(self.previewIcon)
def iconUrlByProgressionLevel(self, progressionLevel): return getTextureLinkByID( self.getTextureByProgressionLevel( self.texture, progressionLevel)) if self.isProgressive else None
def iconUrl(self): return getTextureLinkByID(self.texture)
def icon(self): return getTextureLinkByID(self.previewIcon)