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

systemMenuSlider.py (1326B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\systemMenu\systemMenuSlider.py
      2 from carbonui import uiconst
      3 from carbonui.control.slider import Slider
      4 from carbonui.primitives.container import Container
      5 from carbonui.primitives.containerAutoSize import ContainerAutoSize
      6 from eve.client.script.ui.control import eveLabel
      7 from eve.client.script.ui.shared.systemMenu import systemMenuConst
      8 from localization import GetByLabel
      9 
     10 class SystemMenuSlider(ContainerAutoSize):
     11     default_align = uiconst.TOTOP
     12     default_state = uiconst.UI_NORMAL
     13     default_padding = (0, 4, 0, 8)
     14     default_alignMode = uiconst.TOTOP
     15 
     16     def ApplyAttributes(self, attributes):
     17         callback = attributes.pop('callback', None)
     18         super(SystemMenuSlider, self).ApplyAttributes(attributes)
     19         label = attributes.pop('label')
     20         labelWidth = attributes.pop('labelWidth', 120)
     21         attributes.pop('parent')
     22         labelParent = Container(name='labelparent', parent=self, align=uiconst.TOLEFT, width=systemMenuConst.LABEL_WIDTH)
     23         eveLabel.EveLabelSmall(text=GetByLabel(label), parent=labelParent, state=uiconst.UI_PICKCHILDREN, align=uiconst.VERTICALLY_CENTERED, lineSpacing=-0.1)
     24         Slider(parent=self, callback=callback, mouseWheelEnabled=False, **attributes)