Beispiel #1
0
 def OnStateChange(self, itemID, flag, status, *args):
     InSpaceBracket.OnStateChange(self, itemID, flag, status, *args)
     if flag == states.selectedForNavigation and itemID == self.itemID:
         if status:
             self.ShowNavigationHilite()
         else:
             self.HideNavigationHilite()
Beispiel #2
0
 def Select(self, status):
     InSpaceBracket.Select(self, status)
     if status:
         self.SetCapacityBarPercentage(self.GetSiphonCapacityUsage())
         self.capacityBar.state = uiconst.UI_NORMAL
     else:
         self.capacityBar.state = uiconst.UI_HIDDEN
         self.SetHint('')
Beispiel #3
0
 def ApplyAttributes(self, attributes):
     InSpaceBracket.ApplyAttributes(self, attributes)
     self.damage = DamageRing(name='DamageRing', parent=self)
     self.timer = CountdownTimer(
         name='StructureCounter',
         parent=self,
         countsDown=True,
         timerFunc=blue.os.GetWallclockTime,
         timerRunningOutAnimation=TIMER_RUNNING_OUT_NO_ANIMATION)
     self.timer.Hide()
Beispiel #4
0
 def ApplyAttributes(self, attributes):
     InSpaceBracket.ApplyAttributes(self, attributes)
     self.width = self.height = 32
     container = Container(parent=self,
                           align=uiconst.CENTER,
                           top=12,
                           height=30,
                           width=64)
     self.timer = Timer(parent=container,
                        align=uiconst.TOTOP,
                        height=12,
                        state=uiconst.UI_HIDDEN)
Beispiel #5
0
 def ApplyAttributes(self, attributes):
     InSpaceBracket.ApplyAttributes(self, attributes)
     self.width = 32
     self.height = 40
     container = Container(parent=self,
                           align=uiconst.BOTTOMLEFT,
                           height=8,
                           width=32)
     inner = Container(parent=container, padding=(2, 2, 2, 2))
     self.frame = Frame(parent=container)
     container.fill = Fill(parent=inner,
                           align=uiconst.TOLEFT_PROP,
                           width=0,
                           padding=(0, 0, 0, 0))
     self.capacityBar = container
Beispiel #6
0
 def ApplyAttributes(self, attributes):
     InSpaceBracket.ApplyAttributes(self, attributes)
     self.navSelectHilight = Container(name='navSelectHilight',
                                       parent=self,
                                       align=uiconst.CENTER,
                                       state=uiconst.UI_DISABLED,
                                       width=86,
                                       height=86)
     self.ringSprite = Sprite(
         bgParent=self.navSelectHilight,
         texturePath=
         'res:/UI/Texture/classes/ShipUI/Fighters/selectionRingInSpace.png')
     self.bracketSprite = Sprite(
         bgParent=self.navSelectHilight,
         texturePath=
         'res:/UI/Texture/classes/ShipUI/Fighters/selectionBracketInSpace.png'
     )
     isSelected = self.itemID in movementFunctions.GetFightersSelectedForNavigation(
     )
     self.navSelectHilight.display = isSelected
Beispiel #7
0
 def Startup(self, slimItem, ball=None, transform=None):
     InSpaceBracket.Startup(self, slimItem, ball=ball, transform=transform)
     self.SetUnlocking(slimItem)
Beispiel #8
0
 def Startup(self, slimItem, ball=None, transform=None):
     InSpaceBracket.Startup(self, slimItem, ball=ball, transform=transform)
Beispiel #9
0
 def OnClickSelect(self):
     if not uicore.uilib.Key(
             uiconst.VK_CONTROL) and not uicore.cmd.IsCombatCommandLoaded(
                 'CmdApproachItem'):
         InSpaceBracket.OnClickSelect(self)
Beispiel #10
0
 def OnTacticalItemClick(self):
     if uicore.uilib.Key(uiconst.VK_CONTROL):
         movementFunctions.ToggleSelectForNavigation(self.itemID)
     else:
         InSpaceBracket.OnTacticalItemClick(self)
Beispiel #11
0
 def Select(self, status):
     if bool(status) != self.Showing():
         InSpaceBracket.Select(self, status)
         self.Update()