예제 #1
0
 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
예제 #2
0
 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
예제 #3
0
 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)
예제 #4
0
 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)
예제 #5
0
 def OnClick(self, *args):
     ListGroup.OnClick(self, *args)
     if self.OnToggle is not None:
         self.OnToggle()
예제 #6
0
 def Load(self, node):
     ListGroup.Load(self, node)
     self.OnToggle = node.OnToggle
예제 #7
0
파일: drone.py 프로젝트: connoryang/1v1dec
 def Startup(self, *args):
     Group.Startup(self, args)
     if self.sr.fill:
         self.sr.fill.opacity = 0.9 * self.sr.fill.color.a
예제 #8
0
 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))