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()
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('')
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()
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)
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
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
def Startup(self, slimItem, ball=None, transform=None): InSpaceBracket.Startup(self, slimItem, ball=ball, transform=transform) self.SetUnlocking(slimItem)
def Startup(self, slimItem, ball=None, transform=None): InSpaceBracket.Startup(self, slimItem, ball=ball, transform=transform)
def OnClickSelect(self): if not uicore.uilib.Key( uiconst.VK_CONTROL) and not uicore.cmd.IsCombatCommandLoaded( 'CmdApproachItem'): InSpaceBracket.OnClickSelect(self)
def OnTacticalItemClick(self): if uicore.uilib.Key(uiconst.VK_CONTROL): movementFunctions.ToggleSelectForNavigation(self.itemID) else: InSpaceBracket.OnTacticalItemClick(self)
def Select(self, status): if bool(status) != self.Showing(): InSpaceBracket.Select(self, status) self.Update()