infoPanelAbyss.py (2041B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\infoPanels\infoPanelAbyss.py 2 from carbonui import Align 3 from eve.client.script.ui.shared.infoPanels.InfoPanelBase import InfoPanelBase 4 from eve.client.script.ui.shared.infoPanels.const.infoPanelConst import PANEL_ABYSS 5 from eve.common.script.sys.idCheckers import IsAbyssalSpaceSystem 6 from localization import GetByLabel 7 from objectives.client.ui.objective_chain import ObjectiveChainEntry 8 from objectives.client.qa_tools import get_objective_chain_context_menu 9 SCROLL_CONTAINER_HEIGHT_MAX = 450 10 HEADER_BG_COLOR = (0, 0, 0, 0.35) 11 12 class InfoPanelAbyss(InfoPanelBase): 13 default_name = 'InfoPanelAbyss' 14 panelTypeID = PANEL_ABYSS 15 label = 'UI/Agency/ContentGroups/ContentGroupAbyssalDeadspace' 16 17 def ConstructLayout(self): 18 super(InfoPanelAbyss, self).ConstructLayout() 19 self.header = self.headerCls(parent=self.headerCont, align=Align.CENTERLEFT, text=GetByLabel(self.label)) 20 21 @staticmethod 22 def IsAvailable(): 23 if not IsAbyssalSpaceSystem(session.solarsystemid2): 24 return False 25 objective_chain = sm.GetService('abyss').objective_chain 26 if objective_chain: 27 return True 28 return False 29 30 def __init__(self, **kwargs): 31 super(InfoPanelAbyss, self).__init__(**kwargs) 32 33 def ConstructNormal(self): 34 if self.destroyed: 35 return 36 self.mainCont.Flush() 37 objective_chain = self.service.objective_chain 38 ObjectiveChainEntry(parent=self.mainCont, objective_chain=objective_chain) 39 self.headerButton.GetMenu = self.GetMenuHeaderMenu 40 41 def GetMenuHeaderMenu(self): 42 objective_chain = self.service.objective_chain 43 if objective_chain: 44 return get_objective_chain_context_menu(objective_chain, include_blackboard=True) 45 46 def ConstructHeaderButton(self): 47 return self.ConstructSimpleHeaderButton() 48 49 @property 50 def service(self): 51 return sm.GetService('abyss')