warningContainer.py (1528B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\agencyNew\ui\controls\warningContainer.py 2 from carbonui import uiconst 3 from carbonui.primitives.containerAutoSize import ContainerAutoSize 4 from carbonui.primitives.frame import Frame 5 from carbonui.primitives.sprite import Sprite 6 from eve.client.script.ui.control.eveLabel import EveLabelMedium 7 8 class WarningContainer(ContainerAutoSize): 9 default_name = 'WarningContainer' 10 default_height = 40 11 default_width = 390 12 default_alignMode = uiconst.TOTOP 13 14 def ApplyAttributes(self, attributes): 15 super(WarningContainer, self).ApplyAttributes(attributes) 16 text = attributes.text 17 color = attributes.color 18 Frame(bgParent=self, texturePath='res:/UI/Texture/Shared/DarkStyle/panel2Corner_Solid.png', cornerSize=9, color=color, opacity=0.15) 19 Sprite(name='cornerSprite', parent=self, align=uiconst.TOPLEFT, texturePath='res:/UI/Texture/Shared/DarkStyle/cornerTriSmall.png', width=5, height=5, color=color, opacity=0.5, state=uiconst.UI_DISABLED) 20 Sprite(name='warningIcon', parent=self, align=uiconst.CENTERLEFT, width=32, height=32, left=10, texturePath='res:/UI/Texture/classes/agency/iconExclamation.png', color=color, state=uiconst.UI_DISABLED) 21 self.label = EveLabelMedium(name='warningLabel', parent=self, align=uiconst.TOTOP, padding=(52, 8, 8, 8), text=text, color=color, state=uiconst.UI_NORMAL) 22 23 def SetText(self, text): 24 self.label.SetText(text)