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

SkillPlanContentsSkillEntry.py (1824B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\skillPlan\contents\SkillPlanContentsSkillEntry.py
      2 from carbonui import uiconst
      3 from eve.client.script.ui.shared.tooltip.skill import LoadSkillEntryTooltipInfoOnly
      4 from eve.client.script.ui.skillPlan.contents.skillEntryPrimaryButton import SkillLevelEntryPrimaryButton
      5 from eve.client.script.ui.skillPlan.contents.skillPlanSkillEntry import SkillPlanSkillEntry
      6 from signals import Signal
      7 
      8 class SkillPlanContentsSkillEntry(SkillPlanSkillEntry):
      9 
     10     def ApplyAttributes(self, attributes):
     11         super(SkillPlanContentsSkillEntry, self).ApplyAttributes(attributes)
     12         self.onSkillAddedToQueue = Signal('SkillPlanSkillEntry_onSkillAddedToQueue')
     13         self.primaryButton = SkillLevelEntryPrimaryButton(parent=self, align=uiconst.TORIGHT, iconAlign=uiconst.CENTER, iconLeft=0, fixedwidth=36, padRight=2, skillController=self.controller, skillLevel=self.level, onAddToQueueActionCallback=self.OnAddToQueuePrimaryAction, onDefaultActionCallback=self.OnDefaultPrimaryAction, idx=0)
     14         self.primaryButton.UpdateState()
     15 
     16     def OnAddToQueuePrimaryAction(self):
     17         sm.GetService('skillqueue').AddSkillToQueue(self.typeID, skillLevel=self.level)
     18         self.onSkillAddedToQueue(self.typeID, self.level)
     19 
     20     def OnDefaultPrimaryAction(self):
     21         sm.GetService('skillqueue').AddSkillAndRequirementsToQueue(self.typeID, skillLevel=self.level)
     22         self.onSkillAddedToQueue(self.typeID, self.level)
     23 
     24     def LoadTooltipPanel(self, tooltipPanel, *args):
     25         LoadSkillEntryTooltipInfoOnly(tooltipPanel, self.typeID)
     26 
     27     def GetTooltipPointer(self):
     28         return uiconst.POINT_RIGHT_2
     29 
     30     def Refresh(self):
     31         super(SkillPlanContentsSkillEntry, self).Refresh()
     32         self.primaryButton.UpdateState()