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

cosmeticLicenseErrorScreen.py (2169B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\cosmetics\structure\cosmeticLicenseErrorScreen.py
      2 from carbonui import Density, TextAlign, uiconst
      3 from carbonui.primitives.containerAutoSize import ContainerAutoSize
      4 from carbonui.uianimations import animations
      5 from carbonui.primitives.container import Container
      6 from carbonui.primitives.fill import Fill
      7 from eve.client.script.ui import eveColor
      8 from eve.client.script.ui.control.eveLabel import EveCaptionLarge, EveLabelMedium
      9 from carbonui.control.button import Button
     10 
     11 class CosmeticLicenseErrorScreen(Container):
     12 
     13     def ApplyAttributes(self, attributes):
     14         super(CosmeticLicenseErrorScreen, self).ApplyAttributes(attributes)
     15         self._CreateLayout()
     16 
     17     def _CreateLayout(self):
     18         self.centralCont = ContainerAutoSize(name='centralCont', parent=self, align=uiconst.CENTER, padding=(16, 0, 16, 0))
     19         self.errorMessage = EveCaptionLarge(name='errorMessage', parent=self.centralCont, align=uiconst.TOTOP, textAlign=TextAlign.CENTER)
     20         self.errorSubtext = EveLabelMedium(name='errorSubtext', parent=self.centralCont, align=uiconst.TOTOP, textAlign=TextAlign.CENTER, state=uiconst.UI_NORMAL, padTop=5)
     21         btnCont = Container(name='btnCont', parent=self.centralCont, align=uiconst.TOTOP, height=32, padTop=32)
     22         self.actionBtn = Button(name='actionBtn', parent=btnCont, align=uiconst.CENTER, density=Density.EXPANDED)
     23         Fill(name='blackFill', parent=self, color=eveColor.BLACK)
     24 
     25     def AdjustWidth(self, width):
     26         self.centralCont.width = width
     27 
     28     def ShowScreen(self, errorMsg, errorSubtext, buttonText, buttonCallback):
     29         animations.FadeTo(self, startVal=self.opacity, endVal=1.0, duration=0.25)
     30         self.errorMessage.text = errorMsg
     31         self.errorSubtext.text = errorSubtext
     32         self.actionBtn.label = buttonText
     33         self.actionBtn.OnClick = buttonCallback
     34         self.Enable()
     35 
     36     def CloseScreen(self, animate):
     37         if animate:
     38             animations.FadeTo(self, startVal=self.opacity, endVal=0.0, duration=0.25)
     39         else:
     40             self.opacity = 0.0
     41         self.Disable()