baseClonesStateWindow.py (2586B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\cloneGrade\baseClonesStateWindow.py 2 import trinity 3 from carbonui import uiconst 4 from carbonui.control.window import Window 5 from carbonui.decorative.selectionIndicatorLine import SelectionIndicatorLine 6 from carbonui.primitives.sprite import StreamingVideoSprite, Sprite 7 from carbonui.util.color import Color 8 from carbonui.window.underlay import WindowUnderlay 9 from clonegrade.const import COLOR_OMEGA_ORANGE 10 x = 0.5 11 VIDEO_WIDTH = 1280 * x 12 VIDEO_HEIGHT = 720 * x 13 14 class CloneStateSelectionIndicatorLine(SelectionIndicatorLine): 15 default_color = COLOR_OMEGA_ORANGE 16 17 18 class CloneStateWindowUnderlay(WindowUnderlay): 19 default_clipChildren = True 20 21 def ConstructLayout(self): 22 super(CloneStateWindowUnderlay, self).ConstructLayout() 23 self.video = StreamingVideoSprite(parent=self, videoPath='res:/video/shared/SplashBGLoop.webm', videoLoop=True, align=uiconst.CENTER, pos=(0, 24 -86, 25 VIDEO_WIDTH, 26 VIDEO_HEIGHT), color=Color(*COLOR_OMEGA_ORANGE).SetSaturation(0.5).GetRGBA(), opacity=0.0, spriteEffect=trinity.TR2_SFX_COPY, blendMode=trinity.TR2_SBM_ADD) 27 self.background_image = Sprite(name='bgTexture', parent=self, align=uiconst.CENTER, pos=(0, 0, 547, 690), texturePath='res:/UI/Texture/Classes/CloneGrade/bgScene.png', spriteEffect=trinity.TR2_SFX_SOFTLIGHT, effectOpacity=0.0) 28 29 def ConstructAccentLine(self): 30 self.headerAccentLine = CloneStateSelectionIndicatorLine(parent=self, align=uiconst.TOTOP_NOPUSH, weight=self.ACCENT_LINE_THICKNESS) 31 32 def OnColorThemeChanged(self): 33 pass 34 35 36 class BaseCloneStateWindow(Window): 37 default_isCollapseable = False 38 default_isMinimizable = False 39 default_isLightBackgroundConfigurable = False 40 default_isStackable = False 41 default_isLockable = False 42 default_isOverlayable = False 43 default_extend_content_into_header = True 44 45 def ApplyAttributes(self, attributes): 46 self.hasWindowIcon = False 47 Window.ApplyAttributes(self, attributes) 48 self.ConstructLayout() 49 self.LoadContent(animate=False) 50 51 @property 52 def bgVideo(self): 53 return self.sr.underlay.video 54 55 @property 56 def bgSprite(self): 57 return self.sr.underlay.background_image 58 59 def ConstructBackground(self): 60 pass 61 62 def Prepare_Background_(self): 63 self.sr.underlay = CloneStateWindowUnderlay(parent=self, padding=1) 64 65 def ConstructLayout(self): 66 pass 67 68 def LoadContent(self, animate = True): 69 pass