empireThemedButtons.py (20274B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\login\charcreation\empireui\empireThemedButtons.py 2 import carbonui.const as uiconst 3 from carbonui.primitives.container import Container 4 from carbonui.primitives.sprite import Sprite, StreamingVideoSprite 5 from carbonui.primitives.transform import Transform 6 from carbonui.uicore import uicore 7 from charactercreator.client.empireSelectionData import GetEmpireButtonLogo 8 from charactercreator.client.scalingUtils import GetScaleFactor 9 from collections import defaultdict 10 from eve.client.script.ui.control.themeColored import SpriteThemeColored 11 from eve.client.script.ui.login.charcreation.label import CCLabel 12 from eve.client.script.ui.login.charcreation.technologyViewUtils import LineDecoration 13 from eve.common.lib.appConst import raceAmarr, raceCaldari, raceGallente, raceMinmatar 14 from trinity import TR2_SBM_BLEND, TR2_SFX_COPY 15 16 class EmpireThemedButtonState: 17 DISABLED = 0 18 DARKENED = 1 19 NORMAL = 2 20 21 22 class MouseState: 23 UP = 0 24 OVER = 1 25 DOWN = 2 26 27 28 BG_TEXTURE_OUTLINE = 'res:/UI/Texture/Classes/EmpireSelection/largeButton_Outline.png' 29 BG_TEXTURE_UP = 'res:/UI/Texture/Classes/EmpireSelection/largeButton_Up.png' 30 BG_TEXTURE_OVER = 'res:/UI/Texture/Classes/EmpireSelection/largeButton_Over.png' 31 BG_TEXTURE_DOWN = 'res:/UI/Texture/Classes/EmpireSelection/largeButton_Down.png' 32 BG_TEXTURE_DISABLED = 'res:/UI/Texture/Classes/EmpireSelection/largeButton_Disabled.png' 33 SIDE_DECO_TEXTURE_BY_RACE = {raceAmarr: 'res:/UI/Texture/Classes/EmpireSelection/sideDecoAmarr.png', 34 raceCaldari: 'res:/UI/Texture/Classes/EmpireSelection/sideDecoCaldari.png', 35 raceGallente: 'res:/UI/Texture/Classes/EmpireSelection/sideDecoGallente.png', 36 raceMinmatar: 'res:/UI/Texture/Classes/EmpireSelection/sideDecoMinmatar.png'} 37 CURVED_GRADIENT_TEXTURE_BY_RACE = {raceAmarr: 'res:/UI/Texture/Classes/EmpireSelection/curvedGradientAmarr.png', 38 raceCaldari: 'res:/UI/Texture/Classes/EmpireSelection/curvedGradientCaldari.png', 39 raceGallente: 'res:/UI/Texture/Classes/EmpireSelection/curvedGradientGallente.png', 40 raceMinmatar: 'res:/UI/Texture/Classes/EmpireSelection/curvedGradientMinmatar.png'} 41 HIGHLIGHT_TINT_BY_RACE = {raceAmarr: (1.0, 0.89, 0.7), 42 raceCaldari: (0.77, 0.92, 1.0), 43 raceGallente: (0.7, 1.0, 1.0), 44 raceMinmatar: (1.0, 0.8, 0.7)} 45 BUTTON_TINT_BY_STATE_AND_RACE = {EmpireThemedButtonState.NORMAL: {raceAmarr: (0.82, 0.7, 0.51), 46 raceCaldari: (0.46, 0.68, 0.8), 47 raceGallente: (0.42, 0.8, 0.8), 48 raceMinmatar: (0.8, 0.44, 0.41)}, 49 EmpireThemedButtonState.DARKENED: {raceAmarr: (0.61, 0.52, 0.38), 50 raceCaldari: (0.29, 0.43, 0.5), 51 raceGallente: (0.21, 0.4, 0.4), 52 raceMinmatar: (0.4, 0.22, 0.2)}, 53 EmpireThemedButtonState.DISABLED: {raceAmarr: (0.45, 0.45, 0.45), 54 raceCaldari: (0.45, 0.45, 0.45), 55 raceGallente: (0.45, 0.45, 0.45), 56 raceMinmatar: (0.45, 0.45, 0.45)}} 57 TEXT_TINT_BY_STATE_AND_RACE = {EmpireThemedButtonState.NORMAL: {raceAmarr: (1.0, 0.94, 0.84), 58 raceCaldari: (0.85, 0.95, 1.0), 59 raceGallente: (0.75, 1.0, 1.0), 60 raceMinmatar: (1.0, 0.85, 0.8)}, 61 EmpireThemedButtonState.DARKENED: {raceAmarr: (0.7, 0.61, 0.47), 62 raceCaldari: (0.42, 0.6, 0.7), 63 raceGallente: (0.42, 0.7, 0.7), 64 raceMinmatar: (0.7, 0.48, 0.42)}, 65 EmpireThemedButtonState.DISABLED: {raceAmarr: (0.55, 0.55, 0.55), 66 raceCaldari: (0.55, 0.55, 0.55), 67 raceGallente: (0.55, 0.55, 0.55), 68 raceMinmatar: (0.55, 0.55, 0.55)}} 69 BUTTON_GRADIENT_BY_STATES = {EmpireThemedButtonState.DISABLED: defaultdict(lambda : BG_TEXTURE_DISABLED), 70 EmpireThemedButtonState.DARKENED: defaultdict(lambda : BG_TEXTURE_UP), 71 EmpireThemedButtonState.NORMAL: {MouseState.UP: BG_TEXTURE_UP, 72 MouseState.OVER: BG_TEXTURE_OVER, 73 MouseState.DOWN: BG_TEXTURE_DOWN}} 74 IS_TINTED_BY_STATE = {EmpireThemedButtonState.DISABLED: False, 75 EmpireThemedButtonState.DARKENED: True, 76 EmpireThemedButtonState.NORMAL: True} 77 IS_DECORATED_BY_STATE = {EmpireThemedButtonState.DISABLED: False, 78 EmpireThemedButtonState.DARKENED: False, 79 EmpireThemedButtonState.NORMAL: True} 80 DOES_REACT_TO_MOUSE_BY_STATE = {EmpireThemedButtonState.DISABLED: False, 81 EmpireThemedButtonState.DARKENED: True, 82 EmpireThemedButtonState.NORMAL: True} 83 BG_TEXTURE_OUTLINE_OPACITY_BY_MOUSE_STATE = {MouseState.UP: 0.5, 84 MouseState.OVER: 0.75, 85 MouseState.DOWN: 1.0} 86 BUTTON_TEXT_OPACITY_BY_MOUSE_STATE = {MouseState.UP: 0.75, 87 MouseState.OVER: 1.0, 88 MouseState.DOWN: 1.0} 89 SIDE_DECO_OPACITY_BY_STATES = {EmpireThemedButtonState.DISABLED: defaultdict(lambda : 0.15), 90 EmpireThemedButtonState.DARKENED: {MouseState.UP: 0.25, 91 MouseState.OVER: 0.5, 92 MouseState.DOWN: 0.5}, 93 EmpireThemedButtonState.NORMAL: {MouseState.UP: 0.25, 94 MouseState.OVER: 0.5, 95 MouseState.DOWN: 0.5}} 96 CURVED_GRADIENT_OPACITY_BY_STATE = {EmpireThemedButtonState.DISABLED: 0.0, 97 EmpireThemedButtonState.DARKENED: 0.5, 98 EmpireThemedButtonState.NORMAL: 0.5} 99 MOUSE_STATE_CHANGE_ANIMATION_DURATION = 0.2 100 DECORATION_ANIMATION_DURATION_FADE_IN = 0.5 101 DECORATION_ANIMATION_DURATION_FADE_OUT = 0.5 102 BUTTON_TEXT_FONTSIZE_MIN_RES = 14 103 LINE_WIDTH_MIN_RES = 166 104 LINE_HEIGHT = 4 105 LINE_DECO_WIDTH_MIN_RES = 41 106 SIDE_DECO_WIDTH_MIN_RES = 77 107 SIDE_DECO_HEIGHT_MIN_RES = 46 108 CURVED_GRADIENT_WIDTH_MIN_RES = 135 109 CURVED_GRADIENT_HEIGHT_MIN_RES = 17 110 LOGO_WIDTH_MIN_RES = 82 111 LOGO_HEIGHT_MIN_RES = 82 112 LOGO_TOP_PADDING = 18 113 BURST_WIDTH_MIN_RES = 300 114 BURST_HEIGHT_MIN_RES = 169 115 SEAL_WIDTH_MIN_RES = 166 116 SEAL_HEIGHT_MIN_RES = 78 117 SEAL_TEXTURE_BY_RACE = {raceAmarr: 'res:/UI/Texture/Classes/EmpireSelection/logoButtonSealAmarr.png', 118 raceCaldari: 'res:/UI/Texture/Classes/EmpireSelection/logoButtonSealCaldari.png', 119 raceGallente: 'res:/UI/Texture/Classes/EmpireSelection/logoButtonSealGallente.png', 120 raceMinmatar: 'res:/UI/Texture/Classes/EmpireSelection/logoButtonSealMinmatar.png'} 121 FLARE_VIDEO_BY_RACE = {raceAmarr: 'res:/UI/Texture/Classes/EmpireSelection/Flare_Amarr.webm', 122 raceCaldari: 'res:/UI/Texture/Classes/EmpireSelection/Flare_Caldari.webm', 123 raceGallente: 'res:/UI/Texture/Classes/EmpireSelection/Flare_Gallente.webm', 124 raceMinmatar: 'res:/UI/Texture/Classes/EmpireSelection/Flare_Minmatar.webm'} 125 126 class EmpireThemedButton(Container): 127 default_state = uiconst.UI_NORMAL 128 129 def ApplyAttributes(self, attributes): 130 Container.ApplyAttributes(self, attributes) 131 self.buttonOutline = None 132 self.buttonGradient = None 133 self.buttonLabel = None 134 self.lineDecoration = None 135 self.curvedGradient = None 136 self.sideDecorationLeft = None 137 self.sideDecorationRight = None 138 self.mouseState = MouseState.UP 139 self.buttonState = attributes.Get('buttonState', None) 140 self.raceID = attributes.Get('raceID', None) 141 self.label = attributes.Get('label', None) 142 self.audioSvc = sm.GetService('audio') 143 self.mouseOverSound = attributes.Get('mouseOverSound', None) 144 self.mouseExitSound = attributes.Get('mouseExitSound', None) 145 if self.buttonState == EmpireThemedButtonState.DISABLED: 146 self.state = uiconst.UI_DISABLED 147 self.buttonContainer = Container(name='EmpireThemedButton_ButtonContainer', parent=self, align=uiconst.TOALL, state=uiconst.UI_DISABLED) 148 self.AddButtonLabel() 149 self.AddButtonOutline() 150 self.AddLineDecoration() 151 self.AddCurvedGradient() 152 self.AddButtonGradient() 153 self.AddSideDecoration() 154 self.UpdateMouseState() 155 156 def AddLineDecoration(self): 157 self.lineDecoration = LineDecoration(name='EmpireThemedButton_LineDecoration', parent=self.buttonContainer, align=uiconst.TOBOTTOM_NOPUSH, width=self.width, height=LINE_HEIGHT, lineWidth=LINE_WIDTH_MIN_RES * GetScaleFactor(), lineDecorationWidth=LINE_DECO_WIDTH_MIN_RES * GetScaleFactor(), invert=True, lineColor=HIGHLIGHT_TINT_BY_RACE[self.raceID] if IS_TINTED_BY_STATE[self.buttonState] else None, opacity=0.0) 158 159 def AddCurvedGradient(self): 160 self.curvedGradient = Sprite(name='EmpireThemedButton_CurvedGradient', parent=self.buttonContainer, align=uiconst.TOBOTTOM_NOPUSH, width=CURVED_GRADIENT_WIDTH_MIN_RES * GetScaleFactor(), height=CURVED_GRADIENT_HEIGHT_MIN_RES * GetScaleFactor(), texturePath=CURVED_GRADIENT_TEXTURE_BY_RACE[self.raceID], opacity=0.0) 161 162 def AddButtonOutline(self): 163 r, g, b = HIGHLIGHT_TINT_BY_RACE[self.raceID] 164 color = (r, 165 g, 166 b, 167 0.0) if IS_TINTED_BY_STATE[self.buttonState] else None 168 self.buttonOutline = Sprite(name='EmpireThemedButton_Button_Outline', parent=self.buttonContainer, align=uiconst.TOTOP_NOPUSH, width=self.width, height=self.height, texturePath=BG_TEXTURE_OUTLINE, opacity=0.0, color=color) 169 170 def AddButtonGradient(self): 171 gradientTexture = BUTTON_GRADIENT_BY_STATES[self.buttonState][self.mouseState] 172 if IS_TINTED_BY_STATE[self.buttonState]: 173 r, g, b = BUTTON_TINT_BY_STATE_AND_RACE[self.buttonState][self.raceID] 174 self.buttonGradient = SpriteThemeColored(name='EmpireThemedButton_Button_TintedGradient', parent=self.buttonContainer, align=uiconst.TOTOP_NOPUSH, width=self.width, height=self.height, texturePath=gradientTexture, color=(r, 175 g, 176 b, 177 0.0)) 178 else: 179 self.buttonGradient = Sprite(name='EmpireThemedButton_Button_Gradient', parent=self.buttonContainer, align=uiconst.TOTOP_NOPUSH, width=self.width, height=self.height, texturePath=gradientTexture, opacity=0.0) 180 181 def AddButtonLabel(self): 182 self.buttonLabel = CCLabel(text=self.label, name='EmpireThemedButton_Button_Label', parent=self.buttonContainer, align=uiconst.CENTER, uppercase=1, letterspace=0, bold=False, fontsize=BUTTON_TEXT_FONTSIZE_MIN_RES * GetScaleFactor(), color=TEXT_TINT_BY_STATE_AND_RACE[self.buttonState][self.raceID], opacity=0.0) 183 184 def AddSideDecoration(self): 185 sideDecorationTexture = SIDE_DECO_TEXTURE_BY_RACE[self.raceID] 186 sideDecorationWidth = SIDE_DECO_WIDTH_MIN_RES * GetScaleFactor() 187 sideDecorationHeight = SIDE_DECO_HEIGHT_MIN_RES * GetScaleFactor() 188 sideDecorationLeftTransform = Transform(name='EmpireThemedButton_SideDecoration_TransformLeft', parent=self.buttonContainer, align=uiconst.TOLEFT_NOPUSH, width=-sideDecorationWidth, height=sideDecorationHeight, scale=(-1, 1)) 189 if IS_TINTED_BY_STATE[self.buttonState]: 190 r, g, b = HIGHLIGHT_TINT_BY_RACE[self.raceID] 191 self.sideDecorationLeft = SpriteThemeColored(name='EmpireThemedButton_SideDecoration_TintedLeft', parent=sideDecorationLeftTransform, align=uiconst.TOLEFT_NOPUSH, width=sideDecorationWidth, height=sideDecorationHeight, texturePath=sideDecorationTexture, color=(r, 192 g, 193 b, 194 0.0)) 195 self.sideDecorationRight = SpriteThemeColored(name='EmpireThemedButton_SideDecoration_TintedRight', parent=self.buttonContainer, align=uiconst.TORIGHT_NOPUSH, width=sideDecorationWidth, height=sideDecorationHeight, texturePath=sideDecorationTexture, color=(r, 196 g, 197 b, 198 0.0), left=-sideDecorationWidth) 199 else: 200 self.sideDecorationLeft = Sprite(name='EmpireThemedButton_SideDecoration_Left', parent=sideDecorationLeftTransform, align=uiconst.TOLEFT_NOPUSH, width=sideDecorationWidth, height=sideDecorationHeight, texturePath=sideDecorationTexture, opacity=0.0) 201 self.sideDecorationRight = Sprite(name='EmpireThemedButton_SideDecoration_Right', parent=self.buttonContainer, align=uiconst.TORIGHT_NOPUSH, width=sideDecorationWidth, height=sideDecorationHeight, texturePath=sideDecorationTexture, left=-sideDecorationWidth, opacity=0.0) 202 203 def OnMouseEnter(self, *args): 204 newMouseState = MouseState.OVER if DOES_REACT_TO_MOUSE_BY_STATE[self.buttonState] else MouseState.UP 205 self.ChangeMouseState(newMouseState) 206 207 def OnMouseExit(self, *args): 208 newMouseState = MouseState.UP 209 self.ChangeMouseState(newMouseState) 210 211 def OnMouseDown(self, *args): 212 newMouseState = MouseState.DOWN if DOES_REACT_TO_MOUSE_BY_STATE[self.buttonState] else MouseState.UP 213 self.ChangeMouseState(newMouseState) 214 215 def ChangeMouseState(self, mouseState): 216 if self.mouseState == mouseState: 217 return 218 self.mouseState = mouseState 219 if self.mouseOverSound and self.mouseState == MouseState.OVER: 220 self.audioSvc.SendUIEvent(self.mouseOverSound) 221 if self.mouseExitSound and self.mouseState == MouseState.UP: 222 self.audioSvc.SendUIEvent(self.mouseExitSound) 223 self.UpdateMouseState() 224 225 def UpdateMouseState(self): 226 self.SetButtonLabelMouseState() 227 self.SetButtonOutlineMouseState() 228 self.SetLineDecorationMouseState() 229 self.SetCurvedGradientMouseState() 230 self.SetButtonGradientMouseState() 231 self.SetSideDecorationMouseState() 232 233 def SetButtonOutlineMouseState(self): 234 if self.buttonOutline: 235 newButtonOutlineOpacity = BG_TEXTURE_OUTLINE_OPACITY_BY_MOUSE_STATE[self.mouseState] 236 uicore.animations.MorphScalar(self.buttonOutline, 'opacity', self.buttonOutline.opacity, newButtonOutlineOpacity, duration=MOUSE_STATE_CHANGE_ANIMATION_DURATION) 237 238 def SetButtonGradientMouseState(self): 239 if self.buttonGradient: 240 uicore.animations.MorphScalar(self.buttonGradient, 'opacity', self.buttonGradient.opacity, 1.0, duration=MOUSE_STATE_CHANGE_ANIMATION_DURATION) 241 242 def SetButtonLabelMouseState(self): 243 if self.buttonLabel: 244 newButtonLabelOpacity = BUTTON_TEXT_OPACITY_BY_MOUSE_STATE[self.mouseState] 245 uicore.animations.MorphScalar(self.buttonLabel, 'opacity', self.buttonLabel.opacity, newButtonLabelOpacity, duration=MOUSE_STATE_CHANGE_ANIMATION_DURATION) 246 247 def SetLineDecorationMouseState(self): 248 if self.lineDecoration: 249 newLineDecorationOpacity = 1.0 250 uicore.animations.MorphScalar(self.lineDecoration, 'opacity', self.lineDecoration.opacity, newLineDecorationOpacity, duration=MOUSE_STATE_CHANGE_ANIMATION_DURATION) 251 252 def SetCurvedGradientMouseState(self): 253 if self.curvedGradient: 254 newCurvedGradientOpacity = CURVED_GRADIENT_OPACITY_BY_STATE[self.buttonState] 255 uicore.animations.MorphScalar(self.curvedGradient, 'opacity', self.curvedGradient.opacity, newCurvedGradientOpacity, duration=MOUSE_STATE_CHANGE_ANIMATION_DURATION) 256 257 def SetSideDecorationMouseState(self): 258 newSideDecorationOpacity = SIDE_DECO_OPACITY_BY_STATES[self.buttonState][self.mouseState] 259 if self.sideDecorationLeft: 260 uicore.animations.MorphScalar(self.sideDecorationLeft, 'opacity', self.sideDecorationLeft.opacity, newSideDecorationOpacity, duration=MOUSE_STATE_CHANGE_ANIMATION_DURATION) 261 if self.sideDecorationRight: 262 uicore.animations.MorphScalar(self.sideDecorationRight, 'opacity', self.sideDecorationRight.opacity, newSideDecorationOpacity, duration=MOUSE_STATE_CHANGE_ANIMATION_DURATION) 263 264 265 class EmpireThemedDecoration(Container): 266 default_state = uiconst.UI_NORMAL 267 268 def ApplyAttributes(self, attributes): 269 Container.ApplyAttributes(self, attributes) 270 self.audioSvc = sm.GetService('audio') 271 self.flareSoundIntro = attributes.Get('flareSoundIntro', None) 272 self.flareSoundOutro = attributes.Get('flareSoundOutro', None) 273 self.flare = None 274 self.seal = None 275 self.logo = None 276 self.buttonState = None 277 self.raceID = None 278 self.mainContainer = Container(name='EmpireThemedDecoration_MainContainer', parent=self, align=uiconst.TOALL, state=uiconst.UI_DISABLED) 279 280 def Close(self): 281 self.RemoveLogo() 282 self.RemoveSeal() 283 self.RemoveFlare() 284 Container.Close(self) 285 286 def UpdateDecoration(self, raceID, buttonState): 287 shouldUpdate = self.raceID != raceID or self.buttonState != buttonState 288 if not shouldUpdate: 289 return 290 self.buttonState = buttonState 291 self.raceID = raceID 292 self.RemoveLogo() 293 self.RemoveFlare() 294 self.RemoveSeal() 295 if self.buttonState == EmpireThemedButtonState.NORMAL: 296 self.AddLogo() 297 self.AddFlare() 298 self.AddSeal() 299 300 def RemoveLogo(self): 301 if self.logo and not self.logo.destroyed: 302 uicore.animations.MorphScalar(self.logo, 'opacity', self.logo.opacity, 0.0, duration=DECORATION_ANIMATION_DURATION_FADE_OUT) 303 self.logo.Close() 304 305 def RemoveSeal(self): 306 if self.seal and not self.seal.destroyed: 307 uicore.animations.MorphScalar(self.seal, 'opacity', self.seal.opacity, 0.0, duration=DECORATION_ANIMATION_DURATION_FADE_OUT) 308 self.seal.Close() 309 310 def RemoveFlare(self): 311 if self.flare and not self.flare.destroyed: 312 if self.flareSoundOutro: 313 self.audioSvc.SendUIEvent(self.flareSoundOutro) 314 uicore.animations.MorphScalar(self.flare, 'opacity', self.flare.opacity, 0.0, duration=DECORATION_ANIMATION_DURATION_FADE_OUT) 315 self.flare.Close() 316 317 def AddLogo(self): 318 logoWidth = LOGO_WIDTH_MIN_RES * GetScaleFactor() 319 logoHeight = LOGO_HEIGHT_MIN_RES * GetScaleFactor() 320 self.logo = Container(name='EmpireThemedDecoration_LogoContainer', parent=self.mainContainer, align=uiconst.TOTOP_NOPUSH, top=LOGO_TOP_PADDING * GetScaleFactor(), width=self.width, height=self.height, opacity=0.0) 321 Sprite(name='EmpireThemedDecoration_LogoSprite', parent=self.logo, align=uiconst.CENTERTOP, width=logoWidth, height=logoHeight, texturePath=GetEmpireButtonLogo(self.raceID)) 322 uicore.animations.MorphScalar(self.logo, 'opacity', self.logo.opacity, 1.0, duration=DECORATION_ANIMATION_DURATION_FADE_IN) 323 324 def AddSeal(self): 325 sealWidth = SEAL_WIDTH_MIN_RES * GetScaleFactor() 326 sealHeight = SEAL_HEIGHT_MIN_RES * GetScaleFactor() 327 self.seal = Container(name='EmpireThemedDecoration_SealContainer', parent=self.mainContainer, align=uiconst.TOTOP_NOPUSH, width=self.width, height=self.height, opacity=0.0) 328 Sprite(name='EmpireThemedDecoration_SealSprite', parent=self.seal, align=uiconst.CENTERTOP, width=sealWidth, height=sealHeight, texturePath=SEAL_TEXTURE_BY_RACE[self.raceID]) 329 uicore.animations.MorphScalar(self.seal, 'opacity', self.seal.opacity, 1.0, duration=DECORATION_ANIMATION_DURATION_FADE_IN) 330 331 def AddFlare(self): 332 flareWidth = BURST_WIDTH_MIN_RES * GetScaleFactor() 333 flareHeight = BURST_HEIGHT_MIN_RES * GetScaleFactor() 334 sealHeight = SEAL_HEIGHT_MIN_RES * GetScaleFactor() 335 self.flare = Container(name='EmpireThemedDecoration_FlareContainer', parent=self.mainContainer, align=uiconst.TOTOP_NOPUSH, width=self.width, height=self.height, opacity=0.0, top=sealHeight - flareHeight / 2) 336 StreamingVideoSprite(name='EmpireThemedDecoration_Flare', parent=self.flare, align=uiconst.CENTERTOP, width=flareWidth, height=flareHeight, videoPath=FLARE_VIDEO_BY_RACE[self.raceID], state=uiconst.UI_DISABLED, blendMode=TR2_SBM_BLEND, spriteEffect=TR2_SFX_COPY, videoLoop=True, disableAudio=True) 337 if self.flareSoundIntro: 338 self.audioSvc.SendUIEvent(self.flareSoundIntro) 339 uicore.animations.MorphScalar(self.flare, 'opacity', self.flare.opacity, 1.0, duration=DECORATION_ANIMATION_DURATION_FADE_IN) 340 341 342 def GetEmpireThemedDecorationSize(): 343 return (BURST_WIDTH_MIN_RES * GetScaleFactor(), BURST_HEIGHT_MIN_RES * GetScaleFactor()) 344 345 346 def GetSealHeight(): 347 return SEAL_HEIGHT_MIN_RES * GetScaleFactor()