profileEntry.py (2134B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\structure\structureSettings\profileEntry.py 2 import carbonui.control.contextMenu.contextMenu 3 from carbonui import const as uiconst 4 import carbonui 5 from carbonui.primitives.fill import Fill 6 from carbonui.control.buttonIcon import ButtonIcon 7 from sovDashboard.sovStatusEntries import MouseInsideScrollEntry 8 from carbonui.uicore import uicore 9 10 class ProfileEntryBase(MouseInsideScrollEntry): 11 default_align = uiconst.TOTOP 12 default_state = uiconst.UI_NORMAL 13 rightBtnTexturePath = 'res:/UI/Texture/Icons/73_16_50.png' 14 15 def ApplyAttributes(self, attributes): 16 MouseInsideScrollEntry.ApplyAttributes(self, attributes) 17 self.blinkBG = None 18 if self.rightBtnTexturePath: 19 self.rightBtn = ButtonIcon(name='optionIcon', parent=self, align=uiconst.CENTERRIGHT, pos=(2, 0, 16, 16), iconSize=16, texturePath=self.rightBtnTexturePath, func=self.OnRightBtnClicked, opacity=0.0) 20 self.rightBtn.OnMouseEnter = self.OnRightBtnMouseEnter 21 else: 22 self.rightBtn = None 23 24 def OnRightBtnClicked(self, *args): 25 carbonui.control.contextMenu.contextMenu.ShowMenu(self) 26 27 def OnRightBtnMouseEnter(self, *args): 28 ButtonIcon.OnMouseEnter(self.rightBtn, *args) 29 self.OnMouseEnter(*args) 30 31 def OnMouseEnter(self, *args): 32 MouseInsideScrollEntry.OnMouseEnter(self, *args) 33 self.FadeSprites(1.0) 34 self.ChangeRightContDisplay(True) 35 36 def OnMouseNoLongerInEntry(self): 37 MouseInsideScrollEntry.OnMouseNoLongerInEntry(self) 38 self.FadeSprites(0.0) 39 self.ChangeRightContDisplay(False) 40 41 def FadeSprites(self, toValue): 42 if self.rightBtn: 43 uicore.animations.FadeTo(self.rightBtn, startVal=self.rightBtn.opacity, endVal=toValue, duration=0.1, loops=1) 44 45 def ChangeRightContDisplay(self, show = False): 46 pass 47 48 def GetMenu(self, *args): 49 pass 50 51 def CheckConstructBlinkBG(self): 52 if self.blinkBG is None: 53 self.blinkBG = Fill(bgParent=self, color=(1.0, 1.0, 1.0, 0.0))