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

omegaRestrictedEntryInfoPanel.py (2021B)


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