headerButton.py (873B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\vgs\headerButton.py 2 import carbonui.const as uiconst 3 from carbonui.primitives.container import Container 4 from carbonui.primitives.sprite import Sprite 5 from eve.client.script.ui.util.uiComponents import Component, ButtonEffect 6 7 @Component(ButtonEffect()) 8 9 class HeaderButton(Container): 10 default_width = 16 11 default_height = 16 12 default_state = uiconst.UI_NORMAL 13 14 def ApplyAttributes(self, attributes): 15 Container.ApplyAttributes(self, attributes) 16 self.onClick = attributes.onClick 17 Sprite(parent=self, texturePath=attributes.texturePath, width=self.width, height=self.height, align=uiconst.CENTER, state=uiconst.UI_DISABLED, color=(0.8, 0.8, 0.8, 1.0)) 18 19 def OnClick(self): 20 if not self.disabled: 21 self.onClick()