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

milestoneIndicatorHeader.py (2891B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\skillPlan\controls\milestoneIndicatorHeader.py
      2 from carbonui import uiconst
      3 from carbonui.primitives.container import Container
      4 from carbonui.primitives.containerAutoSize import ContainerAutoSize
      5 from carbonui.primitives.fill import Fill
      6 from eve.client.script.ui import eveColor
      7 from eve.client.script.ui.control.eveLabel import EveLabelLarge, EveCaptionLarge, EveLabelMedium
      8 from localization import GetByLabel
      9 
     10 class LegendEntry(Container):
     11     default_height = 18
     12     default_padTop = 4
     13 
     14     def ApplyAttributes(self, attributes):
     15         super(LegendEntry, self).ApplyAttributes(attributes)
     16         color = attributes.color
     17         text = attributes.text
     18         Fill(parent=self, align=uiconst.TOLEFT, width=self.default_height, color=color)
     19         EveLabelMedium(parent=self, align=uiconst.CENTERLEFT, left=self.default_height + 8, text=text)
     20 
     21 
     22 def LoadMilestonesTooltipPanel(tooltipPanel, *args):
     23     tooltipPanel.LoadStandardSpacing()
     24     tooltipPanel.columns = 1
     25     tooltipPanel.AddMediumHeader(text=GetByLabel('UI/SkillPlan/Milestones'))
     26     tooltipPanel.AddLabelMedium(text=GetByLabel('UI/SkillPlan/SkillMilestonesDescText'), wrapWidth=300)
     27 
     28 
     29 class MilestoneIndicatorHeader(ContainerAutoSize):
     30     default_state = uiconst.UI_NORMAL
     31 
     32     def ApplyAttributes(self, attributes):
     33         super(MilestoneIndicatorHeader, self).ApplyAttributes(attributes)
     34         captionText = attributes.captionText
     35         self.highlightNotInTraining = attributes.highlightNotInTraining
     36         self.captionLabel = EveLabelLarge(parent=self, align=uiconst.TOTOP, state=uiconst.UI_DISABLED, text=captionText)
     37         self.skillPlanNameCaption = EveCaptionLarge(parent=self, align=uiconst.TOTOP, state=uiconst.UI_DISABLED)
     38 
     39     def SetCaption(self, text):
     40         self.captionLabel.SetText(text)
     41 
     42     def SetSkillPlanName(self, name):
     43         self.skillPlanNameCaption.SetText(name)
     44 
     45     def LoadTooltipPanel(self, tooltipPanel, *args):
     46         tooltipPanel.LoadStandardSpacing()
     47         tooltipPanel.columns = 1
     48         tooltipPanel.AddMediumHeader(text=GetByLabel('UI/SkillPlan/SkillPlansAndMilestonesHeader'))
     49         tooltipPanel.AddLabelMedium(text=GetByLabel('UI/SkillPlan/SkillPlansDescText'), wrapWidth=300)
     50         tooltipPanel.AddLabelMedium(text=GetByLabel('UI/SkillPlan/SkillMilestonesDescText'), wrapWidth=300)
     51         tooltipPanel.AddCell(LegendEntry(color=eveColor.WHITE, text=GetByLabel('UI/SkillPlan/TrainedSkills'), align=uiconst.TOTOP))
     52         tooltipPanel.AddCell(LegendEntry(color=eveColor.CRYO_BLUE, text=GetByLabel('UI/SkillPlan/SkillsInTrainingQueue'), align=uiconst.TOTOP))
     53         if self.highlightNotInTraining:
     54             tooltipPanel.AddCell(LegendEntry(color=eveColor.WARNING_ORANGE, text=GetByLabel('UI/SkillPlan/SkillsMissingFromTrainingQueue'), align=uiconst.TOTOP))