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

interactionsPanel.py (2703B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\neocom\charsheet\interactionsPanel.py
      2 from carbonui.primitives.container import Container
      3 from carbonui.control.tabGroup import TabGroup, GetTabData
      4 import carbonui.const as uiconst
      5 from eve.client.script.ui.shared.neocom.charsheet import GetPanelDescription, GetPanelName, PANEL_COMBATLOG, PANEL_KILLRIGHTS, PANEL_SECURITYSTATUS, PANEL_STANDINGS, GetPanelUniqueName
      6 from eve.client.script.ui.shared.neocom.charsheet.combatLogPanel import CombatLogPanel
      7 from eve.client.script.ui.shared.neocom.charsheet.killRightsPanel import KillRightsPanel
      8 from eve.client.script.ui.shared.neocom.charsheet.securityStatusPanel import SecurityStatusPanel
      9 from eve.client.script.ui.shared.neocom.charsheet.standingsPanel.standingsPanel import StandingsPanel
     10 
     11 class InteractionsPanel(Container):
     12     default_name = 'InteractionsPanel'
     13 
     14     def ApplyAttributes(self, attributes):
     15         Container.ApplyAttributes(self, attributes)
     16         self.isConstructed = False
     17 
     18     def ConstructLayout(self):
     19         if self.isConstructed:
     20             return
     21         self.isConstructed = True
     22         self.panelCont = Container(name='panelCont', parent=self, align=uiconst.TOALL)
     23         self.killRightsPanel = KillRightsPanel(parent=self.panelCont, state=uiconst.UI_HIDDEN)
     24         self.standingsPanel = StandingsPanel(parent=self.panelCont, state=uiconst.UI_HIDDEN, toID=session.charid, padTop=8)
     25         self.securityStatusPanel = SecurityStatusPanel(parent=self.panelCont, state=uiconst.UI_HIDDEN)
     26         self.combatLogPanel = CombatLogPanel(parent=self.panelCont, state=uiconst.UI_HIDDEN)
     27         self.tabs = TabGroup(parent=self, align=uiconst.TOTOP, padding=0, groupID='InteractionsPanelTabs', idx=0, autoselecttab=False, tabs=self.GetTabs())
     28 
     29     def GetTabs(self):
     30         return (self.GetTabEntry(self.standingsPanel, PANEL_STANDINGS),
     31          self.GetTabEntry(self.killRightsPanel, PANEL_KILLRIGHTS),
     32          self.GetTabEntry(self.securityStatusPanel, PANEL_SECURITYSTATUS),
     33          self.GetTabEntry(self.combatLogPanel, PANEL_COMBATLOG))
     34 
     35     def GetTabEntry(self, panel, panelID):
     36         return GetTabData(label=GetPanelName(panelID), panel=panel, code=self, tabID=panelID, hint=GetPanelDescription(panelID), uniqueName=GetPanelUniqueName(panelID))
     37 
     38     def LoadPanel(self):
     39         self.ConstructLayout()
     40         self.tabs.AutoSelect()
     41 
     42     def LoadSubPanel(self, panelID):
     43         if self.isConstructed and self.tabs.GetSelectedID() == panelID:
     44             return
     45         self.ConstructLayout()
     46         self.tabs.SelectByID(panelID)
     47 
     48     def GetActivePanelID(self):
     49         return self.tabs.GetSelectedID()