NovaBryan/EVE_Dump
Log | Files | 📦 下载最新源码 (.zip) | Refs | README

vgsHelper.py (868B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\view\aurumstore\vgsHelper.py
      2 import localization
      3 from evephotosvc.const import NONE_PATH
      4 
      5 def FormatAUR(amount):
      6     return localization.GetByLabel('UI/VirtualGoodsStore/FormatAUR', amount=amount)
      7 
      8 
      9 def FormatPLEX(amount):
     10     return localization.GetByLabel('UI/VirtualGoodsStore/FormatPlex', amount=amount)
     11 
     12 
     13 def LoadImageToSprite(sprite, imageUrl, defaultImageUrl = 'res:/UI/Texture/Vgs/missing_image.png'):
     14     texture, w, h = (None, 0, 0)
     15     if imageUrl:
     16         texture, w, h = sm.GetService('photo').GetTextureFromURL(imageUrl, retry=False)
     17     if texture is None or texture.resPath == NONE_PATH:
     18         texture, w, h = sm.GetService('photo').GetTextureFromURL(defaultImageUrl, retry=False)
     19     sprite.texture = texture
     20     sprite.width = w
     21     sprite.height = h