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

cloneStateIcon.py (1557B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\cloneGrade\cloneStateIcon.py
      2 import clonegrade
      3 from eve.client.script.ui.shared.cloneGrade.omegaCloneIcon import OmegaCloneIcon
      4 from localization import GetByLabel
      5 from omega.client.clone_grade_svc import get_clone_grade_svc
      6 
      7 class CloneStateIcon(OmegaCloneIcon):
      8     default_name = 'CloneStateIcon'
      9     __notifyevents__ = ['OnSubscriptionChanged']
     10 
     11     def ApplyAttributes(self, attributes):
     12         OmegaCloneIcon.ApplyAttributes(self, attributes)
     13         sm.RegisterNotify(self)
     14 
     15     def UpdateIcon(self):
     16         if get_clone_grade_svc().is_omega_with_grace_period():
     17             if self.width <= 24:
     18                 texturePath = clonegrade.TEXTUREPATH_OMEGA_24
     19             elif self.width <= 32:
     20                 texturePath = clonegrade.TEXTUREPATH_OMEGA_32
     21             else:
     22                 texturePath = clonegrade.TEXTUREPATH_OMEGA_64
     23         elif self.width <= 32:
     24             texturePath = clonegrade.TEXTUREPATH_ALPHA_32
     25         else:
     26             texturePath = clonegrade.TEXTUREPATH_ALPHA_64
     27         self.icon.texturePath = texturePath
     28 
     29     def OnSubscriptionChanged(self):
     30         self.UpdateIcon()
     31 
     32     def GetTooltipText(self):
     33         if get_clone_grade_svc().is_omega_with_grace_period():
     34             return GetByLabel('UI/CharacterSheet/CharacterSheetWindow/SkillTabs/CurrentCloneStateOmegaDescription')
     35         else:
     36             return GetByLabel('UI/CharacterSheet/CharacterSheetWindow/SkillTabs/CurrentCloneStateAlphaDescription')