moreIcon.py (2227B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\control\moreIcon.py 2 from carbonui import uiconst 3 from carbonui.primitives.container import Container 4 from carbonui.primitives.frame import Frame 5 from carbonui.primitives.sprite import Sprite 6 from carbonui.uianimations import animations 7 from carbonui.util.color import Color 8 from eve.client.script.ui import eveColor 9 10 class BaseMoreIcon(Container): 11 default_width = 27 12 default_height = 27 13 default_state = uiconst.UI_NORMAL 14 iconPath = 'res:/UI/Texture/Shared/DarkStyle/buttonIconQuestion.png' 15 16 def ApplyAttributes(self, attributes): 17 super(BaseMoreIcon, self).ApplyAttributes(attributes) 18 self.tooltipPanelClassInfo = attributes.Get('tooltipPanelClassInfo', None) 19 self.ConstructLayout() 20 21 def ConstructLayout(self): 22 Sprite(name='', parent=self, align=uiconst.CENTER, pos=(0, 0, 16, 16), texturePath=self.iconPath, color=eveColor.CRYO_BLUE, state=uiconst.UI_DISABLED) 23 self.backgroundSprite = Frame(name='backgroundColorSprite', bgParent=self, texturePath='res:/UI/Texture/Shared/DarkStyle/buttonSmall_Solid.png', color=Color.BLACK, padding=(1, 1, 1, 1), cornerSize=9) 24 self.frame = Frame(name='borderFrame', bgParent=self, texturePath='res:/UI/Texture/Shared/DarkStyle/buttonSmall_Stroke.png', opacity=0.1) 25 26 def AnimEnter(self, offsetValue): 27 timeOffset = 0.05 * offsetValue 28 duration = 0.3 29 animations.FadeIn(self, duration=2 * duration, timeOffset=timeOffset) 30 31 def OnMouseEnter(self, *args): 32 animations.SpColorMorphTo(self.backgroundSprite, self.backgroundSprite.GetRGBA(), (0.1, 0.1, 0.1, 1), duration=0.1) 33 animations.FadeTo(self.frame, self.frame.opacity, 0.2, duration=0.1) 34 35 def OnMouseExit(self, *args): 36 animations.SpColorMorphTo(self.backgroundSprite, self.backgroundSprite.GetRGBA(), Color.BLACK, duration=0.1) 37 animations.FadeTo(self.frame, self.frame.opacity, 0.1, duration=0.1) 38 39 40 class DescriptionIcon(BaseMoreIcon): 41 iconPath = 'res:/UI/Texture/Shared/DarkStyle/buttonIconQuestion.png' 42 43 44 class MoreIcon(BaseMoreIcon): 45 iconPath = 'res:/UI/Texture/Shared/DarkStyle/buttonIconPlus.png'