Beispiel #1
0
 def ApplyAttributes(self, attributes):
     self.iconCont = None
     TreeViewEntry.ApplyAttributes(self, attributes)
     self.iconCont = ContainerAutoSize(parent=self.topRightCont,
                                       align=uiconst.CENTERLEFT,
                                       height=16)
     self.fleetAccessBtn = ButtonIcon(
         name='fleetAccessBtn',
         parent=self.iconCont,
         align=uiconst.TOLEFT,
         width=14,
         iconSize=14,
         texturePath='res:/UI/Texture/classes/Inventory/fleetAccess.png',
         func=self.OnFleetAccessBtn,
         colorSelected=COLOR_SELECTED)
     self.corpAccessBtn = ButtonIcon(
         name='corpAccessBtn',
         parent=self.iconCont,
         align=uiconst.TOLEFT,
         width=14,
         padLeft=1,
         iconSize=12,
         texturePath='res:/UI/Texture/classes/Inventory/corpAccess.png',
         func=self.OnCorpAccessBtn,
         colorSelected=COLOR_SELECTED)
     self.UpdateFleetIcon()
     self.UpdateCorpIcon()
 def PopulateScroll(self):
     self.controlScroll.Flush()
     for data in controlData.GetControlData():
         TreeViewEntry(parent=self.controlScroll,
                       data=data,
                       eventListener=self)
         if self.currClassData and self.currClassData.GetID() == data.GetID(
         ):
             self.currClassData = data
Beispiel #3
0
 def ApplyAttributes(self, attributes):
     TreeViewEntry.ApplyAttributes(self, attributes)
     if hasattr(self.data, 'settings'):
         self.settings = self.data.settings
         if self.settings:
             self.GetMenuCallback = self.settings[NotificationSettingEntityDeco.GETMENU_CALLBACK]
             visibilityChecked = self.settings[NotificationSettingEntityDeco.VISIBILITY_CHECKED_KEY]
             showPopupChecked = self.settings[NotificationSettingEntityDeco.POPUP_CHECKED_KEY]
             self.visibilityCallBack = self.settings[NotificationSettingEntityDeco.VISIBILITY_CHANGED_CALLBACK_KEY]
             self.showPopupCallBack = self.settings[NotificationSettingEntityDeco.POPUP_CHANGED_CALLBACK_KEY]
             self.popupCheckBox = Checkbox(name='UsepopupNotifications', text='', parent=self.topRightCont, align=uiconst.TORIGHT, checked=showPopupChecked, callback=self.OnPopupNotificationToggle, hint=localization.GetByLabel('Notifications/NotificationSettings/PopupVisibilityCheckboxTooltip'))
             self.visibilityChckbox = Checkbox(name='visibilityNotification', text='', parent=self.topRightCont, align=uiconst.TORIGHT, checked=visibilityChecked, callback=self.OnVisibiltyToggle, hint=localization.GetByLabel('Notifications/NotificationSettings/HistoryVisibilityCheckboxTooltip'))
             self.isGroup = self.settings['isGroup']
             self.id = self.settings['id']
 def ApplyAttributes(self, attributes):
     self.iconCont = None
     TreeViewEntry.ApplyAttributes(self, attributes)
     canTake = self.data.CheckCanTake()
     canQuery = self.data.CheckCanQuery()
     if not canQuery:
         texturePath = 'res:/UI/Texture/classes/Inventory/restricted.png'
         hint = localization.GetByLabel('UI/Inventory/DropAccessOnly')
         color = self.COLOR_RED
     else:
         texturePath = 'res:/UI/Texture/classes/Inventory/readOnly.png'
         hint = localization.GetByLabel('UI/Inventory/ViewAccessOnly')
         color = self.COLOR_YELLOW
     if not canTake or not canQuery:
         self.iconCont = ContainerAutoSize(parent=self.topRightCont, align=uiconst.CENTERLEFT, height=self.ICONSIZE)
         Sprite(name='restrictedIcon', parent=self.iconCont, align=uiconst.TOLEFT, texturePath=texturePath, width=self.ICONSIZE, color=color, hint=hint)
Beispiel #5
0
 def UpdateLabel(self):
     TreeViewEntry.UpdateLabel(self)
     if self.iconCont:
         self.iconCont.left = self.topRightCont.width + self.label.left + self.label.width + 3