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

infoPanelDungeonProgression.py (2405B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\infoPanels\infoPanelDungeonProgression.py
      2 from carbon.client.script.environment.AudioUtil import PlaySound
      3 from carbonui import uiconst
      4 from eve.client.script.ui.shared.infoPanels.InfoPanelBase import InfoPanelBase
      5 from eve.client.script.ui.shared.infoPanels.const import infoPanelConst
      6 from progression.client.objectivesContainer import ObjectivesContainer
      7 
      8 class InfoPanelDungeonProgression(InfoPanelBase):
      9     default_name = 'InfoPanelDungeonProgression'
     10     hasSettings = False
     11     panelTypeID = infoPanelConst.PANEL_DUNGEON_PROGRESSION
     12     label = 'Dungeon Progression'
     13     default_iconTexturePath = 'res:/UI/Texture/Classes/DungeonMessaging/InfoPanelIcon.png'
     14     default_height = 120
     15     __notifyevents__ = ['OnProgressionAdvancedUpdateInfoPanel',
     16      'OnProgressionTaskCompleteUpdateInfoPanel',
     17      'OnProgressionTaskWidgetUpdateInfoPanel',
     18      'OnProgressionRoomJoinedUpdateInfoPanel']
     19 
     20     def ApplyAttributes(self, attributes):
     21         InfoPanelBase.ApplyAttributes(self, attributes)
     22         sm.RegisterNotify(self)
     23         self.progressionSvc = sm.GetService('progressionSvc')
     24         self.objectivesCont = None
     25         self._ConstructHeader()
     26 
     27     def ConstructNormal(self):
     28         self.mainCont.Flush()
     29         self.objectivesCont = ObjectivesContainer(parent=self.mainCont, align=uiconst.TOTOP, progressionSvc=self.progressionSvc, state=uiconst.UI_NORMAL)
     30 
     31     def ConstructCompact(self):
     32         pass
     33 
     34     def _ConstructHeader(self):
     35         PlaySound('messaging_system_conduit_play')
     36         self.header = self.headerCls(name='title', parent=self.headerCont, align=uiconst.CENTERLEFT, text=self.progressionSvc.get_progression_name())
     37 
     38     def OnProgressionRoomJoinedUpdateInfoPanel(self):
     39         if self.objectivesCont:
     40             self.objectivesCont.UpdateEntryRoomJoined()
     41 
     42     def OnProgressionAdvancedUpdateInfoPanel(self):
     43         self.objectivesCont.CompleteObjective(self.GetLastTaskCompleted())
     44 
     45     def OnProgressionTaskCompleteUpdateInfoPanel(self):
     46         pass
     47 
     48     def OnProgressionTaskWidgetUpdateInfoPanel(self):
     49         self.objectivesCont.UpdateWidgetObjective()
     50 
     51     def GetLastTaskCompleted(self):
     52         return self.progressionSvc.GetLastTaskCompleted()
     53 
     54     @staticmethod
     55     def IsAvailable():
     56         return sm.GetService('progressionSvc').IsInDungeon()