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

omegaRestrictedEntry.py (1748B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\cloneGrade\omegaRestrictedEntry.py
      2 from carbonui.primitives.container import Container
      3 import carbonui.const as uiconst
      4 from carbonui.uianimations import animations
      5 from clonegrade.const import COLOR_OMEGA_ORANGE
      6 from eve.client.script.ui.control.eveLabel import EveLabelMediumBold
      7 from eve.client.script.ui.control.themeColored import FillThemeColored
      8 from eve.client.script.ui.shared.cloneGrade.button import CloneGradeButtonMedium
      9 from localization import GetByLabel
     10 from carbonui.uicore import uicore
     11 
     12 class OmegaRestrictedEntry(Container):
     13     default_name = 'OmegaRestrictedEntry'
     14     default_state = uiconst.UI_NORMAL
     15     default_align = uiconst.NOALIGN
     16 
     17     def ApplyAttributes(self, attributes):
     18         Container.ApplyAttributes(self, attributes)
     19         text = attributes.text or GetByLabel('UI/CloneState/RequiresOmegaClone')
     20         self.origin = attributes.origin
     21         self.reason = attributes.reason
     22         self.bgFill = FillThemeColored(bgParent=self, colorType=uiconst.COLORTYPE_UIBASECONTRAST, opacity=0.5)
     23         EveLabelMediumBold(parent=self, align=uiconst.CENTERLEFT, text=text, color=COLOR_OMEGA_ORANGE, left=6)
     24         self.icon = CloneGradeButtonMedium(parent=self, align=uiconst.CENTERRIGHT, state=uiconst.UI_DISABLED, left=4)
     25 
     26     def OnClick(self):
     27         uicore.cmd.OpenCloneUpgradeWindow(self.origin, self.reason)
     28 
     29     def OnMouseEnter(self, *args):
     30         self.icon.OnMouseEnter()
     31         animations.FadeTo(self.bgFill, self.bgFill.opacity, 1.0, duration=0.3)
     32 
     33     def OnMouseExit(self, *args):
     34         self.icon.OnMouseExit()
     35         animations.FadeTo(self.bgFill, self.bgFill.opacity, 0.5, duration=0.3)