careerPortalTitle.py (1582B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\careerPortal\careerPortalTitle.py 2 from carbonui import TextAlign, uiconst 3 from carbonui.primitives.container import Container 4 from carbonui.uianimations import animations 5 from eve.client.script.ui import eveColor 6 from eve.client.script.ui.control.eveLabel import CaptionLabel 7 from eve.client.script.ui.shared.careerPortal import careerConst 8 from localization import GetByLabel 9 10 class CareerPortalTitle(Container): 11 12 def ApplyAttributes(self, attributes): 13 super(CareerPortalTitle, self).ApplyAttributes(attributes) 14 self.PrepareUI() 15 careerConst.CAREER_WINDOW_STATE_SETTING.on_change.connect(self.OnCareerWindowStateChanged) 16 self.OnCareerWindowStateChanged(careerConst.CAREER_WINDOW_STATE_SETTING.get()) 17 18 def PrepareUI(self): 19 self.title = CaptionLabel(parent=self, name='titleLabel', align=uiconst.TOBOTTOM, textAlign=TextAlign.CENTER, glowBrightness=0.6, bold=True, text=GetByLabel('UI/CareerPortal/CareersViewTitle'), color=eveColor.AIR_TURQUOISE, outputMode=uiconst.OUTPUT_COLOR_AND_GLOW, uppercase=True, fontsize=28) 20 21 def Close(self): 22 careerConst.CAREER_WINDOW_STATE_SETTING.on_change.disconnect(self.OnCareerWindowStateChanged) 23 super(CareerPortalTitle, self).Close() 24 25 def OnCareerWindowStateChanged(self, state): 26 if state != careerConst.CareerWindowState.CAREERS_VIEW: 27 animations.FadeOut(self.title, duration=0.5) 28 return 29 animations.FadeIn(self.title, duration=0.5)