def AddCQButton(self, parent): """ Creates the undock button at the bottom of the lobby """ scale = 1.0 self.cqCont = Container(name='cqCont', align=uiconst.TOLEFT_PROP, width=0.5, parent=parent, state=uiconst.UI_PICKCHILDREN, padding=3) width = 63 * scale height = 34 * scale self.cqSpriteCont = Container(name='cq', align=uiconst.CENTERTOP, width=width, height=height, top=3, parent=self.cqCont, state=uiconst.UI_NORMAL) self.cqSprites = [] spacing = 30 * scale for i in xrange(3): s = Sprite(parent=self.cqSpriteCont, texturePath='res:/UI/Texture/classes/Lobby/{0}.png'.format(i + 1), align=uiconst.CENTERTOP, width=-width, height=height, left=0, state=uiconst.UI_DISABLED) s.color = COLOR_CQ self.cqSprites.insert(0, s) self.cqLabel = EveLabelMedium(parent=self.cqCont, align=uiconst.CENTERTOP, top=8 + height, width=100) self.UpdateCQButton() if gfxsettings.Get(gfxsettings.MISC_LOAD_STATION_ENV): self.cqSpriteCont.OnClick = self.OnCQClicked self.cqSpriteCont.OnMouseEnter = self.OnCQMouseEnter self.cqSpriteCont.OnMouseExit = self.OnCQMouseExit else: self.cqSpriteCont.hint = localization.GetByLabel('UI/Station/CannotEnterCaptainsQuarters') for s in self.cqSprites: s.opacity = 0.2
def AddUndockButton(self, parent): scale = 1.0 self.undockCont = Container(name='undockCont', align=uiconst.TORIGHT_PROP, width=0.5, parent=parent, state=uiconst.UI_PICKCHILDREN, padding=3) width = 63 * scale height = 34 * scale self.undockSpriteCont = Container(name='undock', align=uiconst.CENTERTOP, width=width, height=height, top=3, parent=self.undockCont, state=uiconst.UI_NORMAL) self.undockSprites = [] spacing = 30 * scale for i in xrange(3): s = Sprite(parent=self.undockSpriteCont, texturePath='res:/UI/Texture/classes/Lobby/{0}.png'.format(i + 1), align=uiconst.CENTERTOP, width=width, height=height, left=0, state=uiconst.UI_DISABLED) s.color = COLOR_UNDOCK self.undockSprites.append(s) self.undockLabel = EveLabelMedium(parent=self.undockCont, align=uiconst.CENTERTOP, top=8 + height, width=100) self.UpdateUndockButton() self.undockCont.height = self.undockLabel.height + height + 6 self.undockSpriteCont.OnClick = self.OnUndockClicked self.undockSpriteCont.OnMouseEnter = self.OnUndockMouseEnter self.undockSpriteCont.OnMouseExit = self.OnUndockMouseExit if self.undock_button_is_locked: self._DisableUndockButton()
def AddUndockButton(self, parent): """ Creates the undock button at the bottom of the lobby """ scale = 1.0 self.undockCont = Container(name='undockCont', align=uiconst.TORIGHT_PROP, width=0.5, parent=parent, state=uiconst.UI_PICKCHILDREN, padding=3) width = 63 * scale height = 34 * scale self.undockSpriteCont = Container(name='undock', align=uiconst.CENTERTOP, width=width, height=height, top=3, parent=self.undockCont, state=uiconst.UI_NORMAL) self.undockSprites = [] spacing = 30 * scale for i in xrange(3): s = Sprite(parent=self.undockSpriteCont, texturePath='res:/UI/Texture/classes/Lobby/{0}.png'.format(i + 1), align=uiconst.CENTERTOP, width=width, height=height, left=0, state=uiconst.UI_DISABLED) s.color = COLOR_UNDOCK self.undockSprites.append(s) self.undockLabel = EveLabelMedium(parent=self.undockCont, align=uiconst.CENTERTOP, top=8 + height, width=100) self.UpdateUndockButton() self.undockCont.height = self.undockLabel.height + height + 6 self.undockSpriteCont.OnClick = self.OnUndockClicked self.undockSpriteCont.OnMouseEnter = self.OnUndockMouseEnter self.undockSpriteCont.OnMouseExit = self.OnUndockMouseExit
def AddCQButton(self, parent): scale = 1.0 self.cqCont = Container(name='cqCont', align=uiconst.TOLEFT_PROP, width=0.5, parent=parent, state=uiconst.UI_PICKCHILDREN, padding=3) width = 63 * scale height = 34 * scale self.cqSpriteCont = Container(name='cq', align=uiconst.CENTERTOP, width=width, height=height, top=3, parent=self.cqCont, state=uiconst.UI_NORMAL) self.cqSprites = [] spacing = 30 * scale for i in xrange(3): s = Sprite(parent=self.cqSpriteCont, texturePath='res:/UI/Texture/classes/Lobby/{0}.png'.format(i + 1), align=uiconst.CENTERTOP, width=-width, height=height, left=0, state=uiconst.UI_DISABLED) s.color = COLOR_CQ self.cqSprites.insert(0, s) self.cqLabel = EveLabelMedium(parent=self.cqCont, align=uiconst.CENTERTOP, top=8 + height, width=100) self.UpdateCQButton() if gfxsettings.Get(gfxsettings.MISC_LOAD_STATION_ENV): self.cqSpriteCont.OnClick = self.OnCQClicked self.cqSpriteCont.OnMouseEnter = self.OnCQMouseEnter self.cqSpriteCont.OnMouseExit = self.OnCQMouseExit else: self.cqSpriteCont.hint = localization.GetByLabel('UI/Station/CannotEnterCaptainsQuarters') for s in self.cqSprites: s.opacity = 0.2