def GetMenu(self): m = ListGroup.GetMenu(self) quickbar = settings.user.ui.Get('quickbar', {}) parentID = self.sr.node.id[1] buyDict = GetTypesUnderFolder(parentID, quickbar) if buyDict: m += [(localization.GetByLabel('UI/Market/MarketQuote/BuyAll'), BuyMultipleTypesWithQty, (buyDict,))] return m
def Load(self, node): Group.Load(self, node) typeID = node.typeID self.sr.icon.LoadIconByTypeID(typeID=typeID, size=self.iconSize, ignoreSize=True, isCopy=False) self.sr.icon.SetSize(self.iconSize, self.iconSize) techSprite = uix.GetTechLevelIcon(self.techIcon, 1, typeID) self.techIcon.left = self.sr.icon.left self.sr.label.left = self.sr.icon.left + self.sr.icon.width + 4
def Startup(self, *etc): ListGroup.Startup(self, *etc) self.overlayButton = ButtonIcon( name='overlayButton', parent=self.sr.labelClipper, align=uiconst.CENTERLEFT, width=14, height=14, iconSize=16, left=200, texturePath= 'res://UI/Texture/classes/SensorSuite/sensor_overlay_small.png', func=self.OnChangeSensorOverlayVisibility, colorSelected=COLOR_SELECTED, isSelectedBgUsed=False)
def Startup(self, *etc): Group.Startup(self, etc) self.sr.label.maxLines = 2 self.techIcon = Sprite(name='techIcon', parent=self, left=1, width=16, height=16, idx=0) texturePath = 'res:/UI/Texture/classes/Fitting/iconSimulatorToggle.png' iconSize = 24 switchCont = Container(name='switchCont', parent=self, align=uiconst.TORIGHT, width=iconSize, padRight=4) simulateBtn = ButtonIcon(texturePath=texturePath, parent=switchCont, align=uiconst.CENTERLEFT, pos=(0, 0, iconSize, iconSize), func=self.SimulateShip, iconSize=iconSize)
def OnClick(self, *args): ListGroup.OnClick(self, *args) if self.OnToggle is not None: self.OnToggle()
def Load(self, node): ListGroup.Load(self, node) self.OnToggle = node.OnToggle
def Startup(self, *args): Group.Startup(self, args) if self.sr.fill: self.sr.fill.opacity = 0.9 * self.sr.fill.color.a
def Load(self, node): ListGroup.Load(self, node) self.folderID = node.folderID self.overlayButton.left = self.sr.label.width + self.sr.label.left + 8 self.SetIsVisible( bookmarkVisibilityManager.IsFolderVisible(node.folderID))