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

neocom.py (1343B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\redeem\neocom.py
      2 from eve.client.script.ui.shared.neocom.neocom import neocomConst
      3 from eve.client.script.ui.shared.neocom.neocom.btnData.btnDataNodeNotification import BtnDataNodeNotification
      4 from eve.client.script.ui.shared.neocom.neocom.fixedButtonExtension import OnlyShowWhenAvailableExtension
      5 from eve.client.script.ui.shared.redeem.redeemUiConst import OPEN_REDEEM_WINDOW_COMMAND_NAME, REDEEM_ICON_PATH, REDEEM_NOTIFICATION_ID, NEW_TOKENS_UI_HIGHLIGHT
      6 from localization import GetByLabel
      7 
      8 class UnseenRedeemItemsBtnData(BtnDataNodeNotification):
      9     default_btnType = neocomConst.BTNTYPE_REDEEM
     10     default_cmdName = OPEN_REDEEM_WINDOW_COMMAND_NAME
     11     default_iconPath = REDEEM_ICON_PATH
     12     default_btnID = REDEEM_NOTIFICATION_ID
     13     __notifyevents__ = ['OnRedeemingTokensUpdated', 'OnRedeemWndOpened']
     14 
     15     @property
     16     def default_label(self):
     17         return GetByLabel('UI/Redeem/NewRedeemItemsNotificationDescription')
     18 
     19     def GetItemCount(self):
     20         return sm.GetService('redeem').GetUnseenTokensCount()
     21 
     22     def OnRedeemingTokensUpdated(self):
     23         self.OnBadgeCountChanged()
     24 
     25     def OnRedeemWndOpened(self):
     26         self.OnBadgeCountChanged()
     27 
     28 
     29 class RedeemIconExtension(OnlyShowWhenAvailableExtension):
     30     pass