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

characterPanel.py (3588B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\neocom\charsheet\characterPanel.py
      2 import expertSystems.client
      3 import homestation.client
      4 from carbonui import uiconst
      5 from carbonui.primitives.container import Container
      6 from carbonui.control.tabGroup import TabGroup, GetTabData
      7 from eve.client.script.ui.shared.neocom.charsheet import GetPanelName, PANEL_IMPLANTSBOOTERS, PANEL_JUMPCLONES, PANEL_ATTRIBUTES, PANEL_BIO, PANEL_DECORATIONS, GetPanelDescription, PANEL_EXPERTSYSTEMS, PANEL_HOME_STATION, GetPanelUniqueName
      8 from eve.client.script.ui.shared.neocom.charsheet.attributesPanel import AttributesPanel
      9 from eve.client.script.ui.shared.neocom.charsheet.bioPanel import BioPanel
     10 from eve.client.script.ui.shared.neocom.charsheet.decorationsPanel import DecorationsPanel
     11 from eve.client.script.ui.shared.neocom.charsheet.implantsBoostersPanel import ImplantsBoostersPanel
     12 from eve.client.script.ui.shared.neocom.charsheet.jumpClonesPanel import JumpClonesPanel
     13 
     14 class CharacterPanel(Container):
     15     default_name = 'CharacterPanel'
     16 
     17     def ApplyAttributes(self, attributes):
     18         Container.ApplyAttributes(self, attributes)
     19         self.isConstructed = False
     20 
     21     def ConstructLayout(self):
     22         if self.isConstructed:
     23             return
     24         self.isConstructed = True
     25         self.panelCont = Container(name='panelCont', parent=self, align=uiconst.TOALL, padTop=8)
     26         self.jumpClonesPanel = JumpClonesPanel(parent=self.panelCont, state=uiconst.UI_HIDDEN)
     27         self.attributesPanel = AttributesPanel(parent=self.panelCont, state=uiconst.UI_HIDDEN)
     28         self.decorationsPanel = DecorationsPanel(parent=self.panelCont, state=uiconst.UI_HIDDEN)
     29         self.bioPanel = BioPanel(parent=self.panelCont, state=uiconst.UI_HIDDEN)
     30         self.implantsBoostersPanel = ImplantsBoostersPanel(parent=self.panelCont, state=uiconst.UI_HIDDEN)
     31         self.expertSystemsPanel = expertSystems.ExpertSystemsPanel(parent=self.panelCont, state=uiconst.UI_HIDDEN)
     32         self.homeStationPanel = homestation.HomeStationPanel(parent=self.panelCont, state=uiconst.UI_HIDDEN)
     33         tabs = []
     34         tabs.append(self.GetTabEntry(self.homeStationPanel, PANEL_HOME_STATION))
     35         tabs.append(self.GetTabEntry(self.implantsBoostersPanel, PANEL_IMPLANTSBOOTERS))
     36         tabs.append(self.GetTabEntry(self.jumpClonesPanel, PANEL_JUMPCLONES))
     37         tabs.append(self.GetTabEntry(self.attributesPanel, PANEL_ATTRIBUTES))
     38         tabs.append(self.GetTabEntry(self.bioPanel, PANEL_BIO))
     39         tabs.append(self.GetTabEntry(self.decorationsPanel, PANEL_DECORATIONS))
     40         if expertSystems.is_expert_systems_enabled():
     41             tabs.append(self.GetTabEntry(self.expertSystemsPanel, PANEL_EXPERTSYSTEMS))
     42         self.tabs = TabGroup(parent=self, align=uiconst.TOTOP, padding=0, groupID='CharacterPanelTabs', autoselecttab=False, idx=0, tabs=tabs)
     43 
     44     def LoadPanel(self):
     45         self.ConstructLayout()
     46         self.tabs.AutoSelect()
     47 
     48     def UnloadPanel(self):
     49         if not self.isConstructed:
     50             return
     51         panel = self.tabs.GetSelectedPanel()
     52         if hasattr(panel, 'UnloadPanel'):
     53             panel.UnloadPanel()
     54 
     55     def LoadSubPanel(self, panelID):
     56         self.ConstructLayout()
     57         self.tabs.SelectByID(panelID)
     58 
     59     def GetTabEntry(self, panel, panelID):
     60         return GetTabData(label=GetPanelName(panelID), panel=panel, code=self, tabID=panelID, hint=GetPanelDescription(panelID), uniqueName=GetPanelUniqueName(panelID))
     61 
     62     def GetActivePanelID(self):
     63         return self.tabs.GetSelectedID()