mapViewSettingButton.py (1360B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\mapView\controls\mapViewSettingButton.py 2 from carbonui import const as uiconst 3 from carbonui.uicore import uicore 4 from carbonui.control.buttonIcon import ButtonIcon 5 from eve.client.script.ui.shared.mapView.mapViewSettings import GetMapViewSetting, ICON_MAP_BY_ID 6 7 class MapViewSettingButton(ButtonIcon): 8 default_iconSize = 24 9 default_width = 26 10 default_height = 26 11 settingGroupKey = None 12 callback = None 13 mapViewID = None 14 15 def ApplyAttributes(self, attributes): 16 ButtonIcon.ApplyAttributes(self, attributes) 17 self.settingGroupKey = attributes.settingGroupKey 18 self.mapViewID = attributes.mapViewID 19 self.callback = attributes.callback 20 self.ReloadSettingValue() 21 22 def ReloadSettingValue(self): 23 currentActive = GetMapViewSetting(self.settingGroupKey, self.mapViewID) 24 self.SetTexturePath(ICON_MAP_BY_ID[currentActive]) 25 uicore.animations.BlinkOut(self.icon, startVal=1.0, endVal=0.0, duration=0.2, loops=2, curveType=uiconst.ANIM_BOUNCE) 26 27 def Close(self, *args): 28 ButtonIcon.Close(self, *args) 29 self.callback = None 30 31 def LoadTooltipPanel(self, tooltipPanel, *args): 32 pass 33 34 def GetTooltipPointer(self): 35 return uiconst.POINT_TOP_1