infoNotice.py (1609B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\control\infoNotice.py 2 from carbonui import uiconst 3 from carbonui.primitives.container import Container 4 from carbonui.primitives.containerAutoSize import ContainerAutoSize 5 from carbonui.primitives.fill import Fill 6 from carbonui.primitives.sprite import Sprite 7 from eve.client.script.ui import eveColor 8 from eve.client.script.ui.control.eveLabel import EveLabelMedium 9 10 class InfoNotice(ContainerAutoSize): 11 default_labelText = '' 12 13 def ApplyAttributes(self, attributes): 14 super(InfoNotice, self).ApplyAttributes(attributes) 15 self._labelText = None 16 self.ConstructLayout() 17 self.labelText = attributes.get('labelText', self.default_labelText) 18 19 def ConstructLayout(self): 20 self.cornerTagWrapper = Container(name='cornerTagWrapper', parent=self, align=uiconst.TOTOP, width=10, height=10) 21 self.cornerTag = Sprite(name='cornerTag', parent=self.cornerTagWrapper, align=uiconst.TOPLEFT, texturePath='res:/UI/Texture/Shared/notice/notice_corner.png', width=10, height=10, color=eveColor.CRYO_BLUE) 22 Fill(bgParent=self, color=eveColor.SMOKE_BLUE, opacity=0.2) 23 self.noticeLabel = EveLabelMedium(name='noticeLabel', parent=self, align=uiconst.TOTOP, state=uiconst.UI_NORMAL, text=self.labelText, color=eveColor.PLATINUM_GREY, padding=(24, 1, 24, 11)) 24 25 @property 26 def labelText(self): 27 return self._labelText 28 29 @labelText.setter 30 def labelText(self, value): 31 self._labelText = value 32 self.noticeLabel.text = self._labelText