indication_message_base.py (1281B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\inflight\shipHud\action_indication\indication_message_base.py 2 from carbonui.primitives.containerAutoSize import ContainerAutoSize 3 from carbonui.uianimations import animations 4 ANIM_CURVE = ((0.0, 0.0), 5 (0.1, 0.7), 6 (0.2, 0.0), 7 (0.3, 0.7), 8 (0.4, 0)) 9 10 class IndicationMessageBase(ContainerAutoSize): 11 caption = None 12 13 def __init__(self, **kwargs): 14 super(IndicationMessageBase, self).__init__(**kwargs) 15 self.construct_layout() 16 17 def construct_layout(self): 18 pass 19 20 def _apply_indication_data(self, indication_data): 21 pass 22 23 def update(self, indication_data): 24 self._apply_indication_data(indication_data) 25 26 def blink(self): 27 self.anim_blink_caption() 28 29 def anim_blink_caption(self): 30 animations.MorphScalar(self, 'caption_glow_brightness', 1.0, 0.0, duration=0.5, curveType=ANIM_CURVE) 31 32 @property 33 def caption_glow_brightness(self): 34 return self.caption.glowBrightness 35 36 @caption_glow_brightness.setter 37 def caption_glow_brightness(self, value): 38 self.caption.glowBrightness = value 39 40 def appear(self): 41 self.opacity = 1.0 42 43 def disappear(self): 44 self.opacity = 0.0