NovaBryan/EVE_Dump
Log | Files | 📦 下载最新源码 (.zip) | Refs | README

lapseNotifyWindow.py (3912B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\cloneGrade\lapseNotifyWindow.py
      2 from carbonui.primitives.container import Container
      3 from carbonui.primitives.containerAutoSize import ContainerAutoSize
      4 from carbonui.primitives.fill import Fill
      5 from carbonui.primitives.sprite import Sprite
      6 from carbonui.util.color import Color
      7 from clonegrade.const import COLOR_OMEGA_GOLD, COLOR_OMEGA_BG
      8 from eve.client.script.ui.control.eveLabel import EveCaptionMedium, Label
      9 from eve.client.script.ui.shared.cloneGrade import ORIGIN_LAPSENOTIFYWINDOW, REASON_DEFAULT
     10 from eve.client.script.ui.shared.cloneGrade.upgradeButton import UpgradeButton
     11 from eve.client.script.ui.shared.cloneGrade.baseClonesStateWindow import BaseCloneStateWindow
     12 import carbonui.const as uiconst
     13 from eve.client.script.ui.shared.cloneGrade.util import upgrade_clone_action
     14 from localization import GetByLabel
     15 PADTOP = 10
     16 ICONSIZE = 40
     17 
     18 class LapseNotifyWindow(BaseCloneStateWindow):
     19     default_windowID = 'LapseNotifyWindow'
     20     default_width = 540
     21     default_fixedWidth = 540
     22     default_height = 680
     23     default_fixedHeight = 680
     24     default_analyticID = 'omega_lapsed_window_old'
     25 
     26     def ConstructLayout(self):
     27         self.outerCont = ContainerAutoSize(name='cont', parent=self.sr.main, align=uiconst.CENTER, pos=(0, 60, 450, 0))
     28         self.mainCont = ContainerAutoSize(name='bottomCont', parent=self.outerCont, padding=(PADTOP,
     29          0,
     30          PADTOP,
     31          PADTOP), align=uiconst.TOTOP)
     32         Fill(bgParent=self.mainCont, color=(0, 0, 0, 0.7), padding=(-15, -10, -15, -25))
     33         self.AddCaption(GetByLabel('UI/CloneState/LapseWindow/Caption'))
     34         self.AddLabel(GetByLabel('UI/CloneState/LapseWindow/SubCaption'), bold=True)
     35         self.AddIcon('res:/UI/Texture/classes/cloneGrade/benefits/allSkills.png', padTop=20)
     36         self.AddLabel(GetByLabel('UI/CloneState/LapseWindow/SkillLevelsRestriction'))
     37         self.AddIcon('res:/UI/Texture/classes/cloneGrade/benefits/allShipsAndModules.png')
     38         self.AddLabel(GetByLabel('UI/CloneState/LapseWindow/ActiveShipRestriction'))
     39         self.AddIcon('res:/UI/Texture/classes/cloneGrade/benefits/longerQueue.png')
     40         self.AddLabel(GetByLabel('UI/CloneState/LapseWindow/SkillQueueRestriction'))
     41         self.ConstructButtons()
     42 
     43     def ConstructButtons(self):
     44         buttonCont = Container(name='buttonCont', parent=self.outerCont, align=uiconst.TOTOP, height=50, padding=(0, 30, 0, 60))
     45         _buttonCont = ContainerAutoSize(parent=buttonCont, align=uiconst.CENTER, height=41)
     46         UpgradeButton(parent=_buttonCont, align=uiconst.TOLEFT, width=150, onClick=self.OnUpgradeButtonClick, text=GetByLabel('UI/CloneState/Upgrade'), analyticID='upgrade_omega_lapsed_secure_old')
     47         UpgradeButton(parent=_buttonCont, align=uiconst.TOLEFT, width=150, onClick=self.CloseByUser, text=GetByLabel('UI/Agents/Dialogue/Buttons/Continue'), padLeft=20, labelColor=Color.GRAY7)
     48 
     49     def OnUpgradeButtonClick(self, *args):
     50         self.CloseByUser()
     51         upgrade_clone_action(ORIGIN_LAPSENOTIFYWINDOW, REASON_DEFAULT)
     52 
     53     def ConstructBackground(self):
     54         BaseCloneStateWindow.ConstructBackground(self)
     55         self.bgSprite.effectOpacity = -0.7
     56 
     57     def AddLabel(self, text, bold = False):
     58         Label(parent=self.mainCont, align=uiconst.TOTOP, text='<center>' + text, fontsize=15, bold=bold, padTop=2, color=(1.0, 1.0, 1.0, 0.9))
     59 
     60     def AddCaption(self, text):
     61         EveCaptionMedium(parent=self.mainCont, align=uiconst.TOTOP, color=COLOR_OMEGA_GOLD, text='<center>' + text, padTop=PADTOP)
     62 
     63     def AddIcon(self, texturePath, padTop = PADTOP):
     64         cont = Container(parent=self.mainCont, align=uiconst.TOTOP, height=ICONSIZE, padTop=padTop)
     65         Sprite(parent=cont, align=uiconst.CENTER, texturePath=texturePath, pos=(0,
     66          0,
     67          ICONSIZE,
     68          ICONSIZE), color=COLOR_OMEGA_BG)