def ConstructLayout(self): topCont = uiprimitives.Container(name='topCont', parent=self.sr.main, align=uiconst.TOTOP, height=135, clipChildren=True, padding=(const.defaultPadding, 0, const.defaultPadding, 0)) self.loadingCont = uiprimitives.Container(name='loadingCont', parent=self.sr.main, align=uiconst.TOALL) self.loadingText = uicontrols.EveCaptionMedium(text='', parent=self.loadingCont, align=uiconst.CENTER) self.loadingCont.display = True self.historyCont = uiprimitives.Container(name='historyCont', parent=self.sr.main, align=uiconst.TOALL, padding=(const.defaultPadding, const.defaultPadding * 2, const.defaultPadding, const.defaultPadding)) self.historyCont.display = False textCont = uiprimitives.Container(name='textCont', parent=topCont, align=uiconst.TOTOP, height=35) self.warDateLabel = uicontrols.EveLabelMedium(text='', parent=textCont, align=uiconst.CENTER) self.mutualWarLabel = uicontrols.EveLabelMedium(text=localization.GetByLabel('UI/Corporations/Wars/MutualWar'), parent=textCont, align=uiconst.CENTER) self.mutualWarLabel.display = False warInfoCont = uiprimitives.Container(name='buttonCont', parent=topCont, align=uiconst.TOBOTTOM, height=33) self.surrenderBtn = uicontrols.ButtonIcon(name='surrenderBtn', parent=warInfoCont, align=uiconst.TOLEFT, width=24, iconSize=24, texturePath='res:/UI/Texture/Icons/Surrender_64.png', func=self.OpenSurrenderWnd) self.surrenderBtn.display = False self.allyBtn = uicontrols.ButtonIcon(name='allyBtn', parent=warInfoCont, align=uiconst.TORIGHT, width=24, iconSize=24, texturePath='res:/UI/Texture/Icons/Mercenary_64.png', func=self.OpenAllyWnd) warCont = uiprimitives.Container(name='warCont', parent=topCont, align=uiconst.TOALL) attackerCont = uiprimitives.Container(name='attackerCont', parent=warCont, align=uiconst.TOLEFT_PROP, width=0.45) attackerLogoCont = uiprimitives.Container(name='attackerLogoCont', parent=attackerCont, align=uiconst.TORIGHT, width=64) self.attackerLogoDetailed = uiprimitives.Container(name='attackerLogoDetailed', parent=attackerLogoCont, align=uiconst.TOPRIGHT, width=64, height=64) attackerTextCont = uiprimitives.Container(name='attackerTextCont', parent=attackerCont, align=uiconst.TOALL, padding=(4, 0, 8, 4)) self.attackerNameLabel = uicontrols.EveLabelLarge(text='', parent=attackerTextCont, align=uiconst.TOPRIGHT, state=uiconst.UI_NORMAL) self.attackerISKLostLabel = uicontrols.EveLabelMedium(text='', parent=attackerTextCont, align=uiconst.CENTERRIGHT, height=16) self.attackerShipsLostLabel = uicontrols.EveLabelMedium(text='', parent=attackerTextCont, align=uiconst.BOTTOMRIGHT) centerCont = uiprimitives.Container(name='centerCont', parent=warCont, align=uiconst.TOLEFT_PROP, width=0.1) swords = uicontrols.Icon(name='warIcon', parent=centerCont, align=uiconst.CENTER, size=32, ignoreSize=True, state=uiconst.UI_NORMAL, opacity=0.3) swords.LoadIcon('res:/UI/Texture/WindowIcons/wars.png') swords.hint = localization.GetByLabel('UI/Corporations/Wars/Vs') defenderCont = uiprimitives.Container(name='defenderCont', parent=warCont, align=uiconst.TOLEFT_PROP, width=0.45) defenderLogoCont = uiprimitives.Container(name='defenderLogoCont', parent=defenderCont, align=uiconst.TOLEFT, width=64) self.defenderLogoDetailed = uiprimitives.Container(name='defenderLogoDetailed', parent=defenderLogoCont, align=uiconst.TOPLEFT, width=64, height=64) defenderTextCont = uiprimitives.Container(name='defenderTextCont', parent=defenderCont, align=uiconst.TOALL, padding=(8, 0, 4, 4)) self.defenderNameLabel = uicontrols.EveLabelLarge(text='', parent=defenderTextCont, state=uiconst.UI_NORMAL) self.defenderISKKilledLabel = uicontrols.EveLabelMedium(text='', parent=defenderTextCont, align=uiconst.CENTERLEFT, height=16) self.defenderShipsKilledLabel = uicontrols.EveLabelMedium(text='', parent=defenderTextCont, align=uiconst.BOTTOMLEFT) killsFilterCont = uiprimitives.Container(name='killsFilterCont', parent=self.historyCont, align=uiconst.TOTOP, height=24) killOptions = [(localization.GetByLabel('UI/Corporations/Wars/ShowAllKills'), None), (localization.GetByLabel('UI/Corporations/Wars/ShowAggressorKills'), 'attacker'), (localization.GetByLabel('UI/Corporations/Wars/ShowDefenderKills'), 'defender')] comboSetting = settings.user.ui.Get('killComboValue', 0) self.killsFilterCombo = uicontrols.Combo(name='killsFilterCombo', parent=killsFilterCont, options=killOptions, adjustWidth=True, select=comboSetting, callback=self.OnKillComboChange) showGraph = settings.user.ui.Get('killShowGraph', 0) self.showGraph = uicontrols.Checkbox(text=localization.GetByLabel('UI/Corporations/Wars/ShowGraph'), parent=killsFilterCont, padLeft=self.killsFilterCombo.width + const.defaultPadding, checked=showGraph, callback=self.ShowGraph) self.killsParent = uiprimitives.Container(name='killsParent', parent=self.historyCont, align=uiconst.TOALL) self.killsScroll = uicontrols.Scroll(name='killsScroll', parent=self.killsParent) self.killsByGroupParent = uiprimitives.Container(name='killsByGroupParent', parent=self.historyCont, align=uiconst.TOALL) killGroupsCont = uiprimitives.Container(name='killsFilterCont', parent=self.killsByGroupParent, align=uiconst.TOTOP, height=188) self.killGroupsTextCont = uiprimitives.Container(name='killGroupsTextCont', parent=killGroupsCont, align=uiconst.TOLEFT, width=90) self.killGroupsLegendCont = uiprimitives.Container(name='killGroupsTextCont', parent=killGroupsCont, align=uiconst.TOBOTTOM, height=20) self.killGroupsDataCont = uiprimitives.Container(name='killGroupsDataCont', parent=killGroupsCont, align=uiconst.TOALL, padding=(const.defaultPadding, 0, 0, const.defaultPadding), bgColor=util.Color.GetGrayRGBA(0.4, 0.2)) self.killGroupsScroll = uicontrols.Scroll(name='killGroupsScroll', parent=self.killsByGroupParent) self.LoadInfo(self.warID)
def ApplyAttributes(self, attributes): uicontrols.ContainerAutoSize.ApplyAttributes(self, attributes) charactersTrainingCount = attributes.messageData[ 'charactersTrainingCount'] if charactersTrainingCount == 1: mainText = localization.GetByLabel( 'UI/DualTraining/TrainingOnAnotherCharacter', characterName=attributes.messageData['charName1'], loggedInCharacterName=cfg.eveowners.Get( session.charid).ownerName) else: mainText = localization.GetByLabel( 'UI/DualTraining/TrainingOnThirdCharacter', characterName=attributes.messageData['charName1'], characterName2=attributes.messageData['charName2'], loggedInCharacterName=cfg.eveowners.Get( session.charid).ownerName) uicontrols.Label(parent=self, align=uiconst.TOTOP, text=mainText, padLeft=10, padRight=10) text = '<center>' + localization.GetByLabel( 'UI/DualTraining/ToAcquirePLEX') uicontrols.EveCaptionMedium(parent=self, align=uiconst.TOTOP, text=text, padTop=10) cont = uiprimitives.Container(parent=self, align=uiconst.TOTOP, height=40, padTop=15) btn = BigButton(parent=cont, width=180, height=40, align=uiconst.CENTER) btn.SetSmallCaption( localization.GetByLabel('UI/DualTraining/BuyOnEveMarket'), inside=1) btn.OnClick = self.OpenMarketWindow btn.Startup(180, 40, 0) cont2 = uiprimitives.Container(parent=self, align=uiconst.TOTOP, height=40, padTop=15) btn2 = BigButton(parent=cont2, width=180, height=40, align=uiconst.CENTER) btn2.SetSmallCaption( localization.GetByLabel('UI/DualTraining/BuyOnline'), inside=1) btn2.OnClick = uicore.cmd.BuyPlexOnline btn2.Startup(180, 40, 0)
def ApplyAttributes(self, attributes): uicontrols.Window.ApplyAttributes(self, attributes) self.currWidth = 600 self.inited = False self.contentItemList = [] self.SetTopparentHeight(0) self.MakeUnstackable() self.width = self.currWidth self.left = 0 leftpush, rightpush = uicore.layer.sidePanels.GetSideOffset() self.left += leftpush self.top = 0 self.SetCaption(localization.GetByLabel('UI/Tutorial/CareerFunnel')) self.height = 500 self.SetMinSize([self.currWidth, self.height]) self.headerText = uicontrols.EveCaptionMedium(text=localization.GetByLabel('UI/Tutorial/CareerFunnelHeader'), parent=self.sr.main, align=uiconst.TOTOP, padding=const.defaultPadding * 2, state=uiconst.UI_DISABLED) self.textObject = uicontrols.EveLabelMedium(text=localization.GetByLabel('UI/Tutorial/CareerFunnelIntro'), parent=self.sr.main, padLeft=const.defaultPadding * 2, padRight=const.defaultPadding * 2, padBottom=const.defaultPadding, state=uiconst.UI_DISABLED, align=uiconst.TOTOP) self.sr.contentList = uicontrols.Scroll(parent=self.sr.main, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) noContentHint = localization.GetByLabel('UI/Generic/Unknown') if not len(self.contentItemList): careerAgents = self.GetAgents() agentNodes = None pathfinder = sm.GetService('clientPathfinderService') for career in careerAgents: agentToUse = None jumps = 999 for agentID in careerAgents[career]['agent']: agent = careerAgents[career]['agent'][agentID] station = careerAgents[career]['station'][agentID] jumpsToAgent = pathfinder.GetJumpCountFromCurrent(station.solarSystemID) if jumpsToAgent < jumps: agentToUse = agentID jumps = jumpsToAgent if agentToUse: data = {'agent': careerAgents[career]['agent'][agentToUse], 'career': career, 'agentStation': careerAgents[career]['station'][agentToUse]} self.contentItemList.append(listentry.GetFromClass(CareerAgentEntry, data)) else: noContentHint = localization.GetByLabel('UI/Generic/NoRouteCanBeFound') self.sr.contentList.Startup() self.sr.contentList.ShowHint() self.sr.contentList.Load(None, self.contentItemList, headers=None, noContentHint=noContentHint) height = self.headerText.textheight + self.headerText.padTop + self.headerText.padBottom height += self.textObject.textheight + self.textObject.padTop + self.textObject.padBottom height += 440 self.height = height self.inited = True
def ApplyAttributes(self, attributes): Transform.ApplyAttributes(self, attributes) borderColor = attributes.get('borderColor', redeemColors.REDEEM_BUTTON_BORDER_COLOR) backgroundColor = attributes.get( 'backgroundColor', redeemColors.REDEEM_BUTTON_BACKGROUND_COLOR) fillColor = attributes.get('fillColor', redeemColors.REDEEM_BUTTON_FILL_COLOR) textColor = attributes.get('textColor', redeemColors.TEXT_COLOR) uiprimitives.Line(parent=self, color=borderColor, align=uiconst.TOTOP, weight=1) uiprimitives.Fill(bgParent=self, color=backgroundColor) borderFillColor = fillColor[:3] self.borderFill = uicontrols.GradientSprite(bgParent=self, rgbData=[ (0, borderFillColor), (0.5, borderFillColor), (1.0, borderFillColor) ], alphaData=[(0.3, 0.1), (0.5, 0.4), (0.7, 0.1)], idx=0, state=uiconst.UI_DISABLED) self.OnClick = attributes.get('OnClick', self.DefaultOnClick) self.captionCont = Container(parent=self, name='captionCont', align=uiconst.CENTERTOP) self.expanderIcon = uiprimitives.Sprite( parent=self.captionCont, texturePath='res:/UI/Texture/Icons/105_32_5.png', align=uiconst.CENTERRIGHT, pos=(0, 0, 32, 32), state=uiconst.UI_DISABLED, color=textColor) self.availableLabel = uicontrols.EveCaptionMedium( parent=self.captionCont, align=uiconst.CENTERLEFT, text=localization.GetByLabel('UI/RedeemWindow/RedeemableItems'), state=uiconst.UI_DISABLED, color=textColor, bold=False) self.availableLabel.letterspace = 1 self.captionCont.width = self.availableLabel.textwidth + 10 + self.expanderIcon.width self.captionCont.height = max(self.availableLabel.textheight + 10, self.expanderIcon.height) self.height = self.captionCont.height
def _SetCaption(self, title): if self.sr.Get('loading_caption', None) is None: self.sr.loading_caption = uicontrols.EveCaptionMedium( text=['<center>', title], parent=self.sr.main, align=uiconst.CENTERTOP, width=self.width - 50, top=12, idx=0, state=uiconst.UI_DISABLED, name='caption') self.sr.loading_title = title elif self.sr.Get('loading_title', None) != title: self.sr.loading_caption.text = ['<center>', title] self.sr.loading_title = title
def ShowNoSelectedHint(self, hint=None): if self.sr.noSelectedHint is None and hint: self.sr.noSelectedHint = uicontrols.EveCaptionMedium( text=hint, parent=self.sr.main, align=uiconst.RELATIVE, left=16, top=18, width=256) self.sr.noSelectedHint.SetAlpha(0.5) elif self.sr.noSelectedHint: if hint: self.sr.noSelectedHint.text = hint self.sr.noSelectedHint.state = uiconst.UI_DISABLED else: self.sr.noSelectedHint.state = uiconst.UI_HIDDEN
def ApplyAttributes(self, attributes): uicontrols.Window.ApplyAttributes(self, attributes) self.itemID = attributes.Get('itemID') lpPool = sm.GetService('facwar').GetSolarSystemLPs() topCont = uiprimitives.Container(name='topCont', parent=self.sr.main, align=uiconst.TOTOP, height=40, padding=(self.PADSIDE, self.PADTOP, self.PADSIDE, self.PADSIDE)) mainCont = uicontrols.ContainerAutoSize(name='mainCont', parent=self.sr.main, align=uiconst.TOTOP) bottomCont = uiprimitives.Container(name='bottomCont', parent=self.sr.main, align=uiconst.TOBOTTOM, height=100, padTop=self.PADTOP) uicontrols.EveLabelLarge(parent=topCont, text=localization.GetByLabel('UI/FactionWarfare/IHub/SystemUpgradePanel', systemName=cfg.evelocations.Get(session.solarsystemid2).name), align=uiconst.TOPLEFT, top=5) uicontrols.EveLabelLarge(parent=topCont, text=localization.GetByLabel('UI/FactionWarfare/IHub/TotalLP'), align=uiconst.TOPRIGHT, top=5) self.lpPoolLabel = uicontrols.EveCaptionSmall(parent=topCont, align=uiconst.TOPRIGHT, top=25) limits = [0] + const.facwarSolarSystemUpgradeThresholds + [const.facwarSolarSystemMaxLPPool] self.upgradeBars = [] for i in xrange(1, 7): bar = uicls.FWUpgradeLevelCont(parent=mainCont, align=uiconst.TOTOP, padding=(self.PADSIDE, 0, 10, 10), lowerLimit=limits[i - 1], upperLimit=limits[i], lpAmount=lpPool, level=i, idx=0) self.upgradeBars.append(bar) self.bottomGradient = uicontrols.GradientSprite(bgParent=bottomCont, rotation=-pi / 2, rgbData=[(0, (0.3, 0.3, 0.3))], alphaData=[(0, 0.3), (0.9, 0.0)]) self.bottomFlashEffect = uicontrols.GradientSprite(bgParent=bottomCont, rotation=-pi / 2, rgbData=[(0, (0.6, 0.6, 0.6))], alphaData=[(0, 0.3), (0.9, 0.0)], opacity=0.0) uiprimitives.Line(parent=bottomCont, align=uiconst.TOTOP, color=(0.3, 0.3, 0.3, 0.3)) bottomMainCont = uiprimitives.Container(name='bottomMainCont', parent=bottomCont, align=uiconst.CENTER, width=450, height=100) self.myLPLabel = uicontrols.Label(parent=bottomMainCont, text=self.GetLPOwnedLabel(), align=uiconst.TOPLEFT, left=self.PADSIDE, top=self.PADTOP) self.bottomBottomCont = uiprimitives.Container(name='bottomBottom', align=uiconst.TOPLEFT, pos=(self.PADSIDE, 40, 450, 25), parent=bottomMainCont) self.donateAmountEdit = uicontrols.SinglelineEdit(parent=self.bottomBottomCont, name='donateAmountEdit', align=uiconst.TOLEFT, setvalue=0, width=155, OnReturn=self.OnDonateLPBtn, OnChange=self.OnDonateValueChanged) self.donateBtn = uicontrols.Button(parent=self.bottomBottomCont, align=uiconst.TOLEFT, func=self.OnDonateLPBtn, label=localization.GetByLabel('UI/FactionWarfare/IHub/DonateLPs'), padLeft=4) self.donationReceivedLabel = uicontrols.EveCaptionMedium(name='donationReceivedLabel', parent=bottomMainCont, align=uiconst.TOPLEFT, text=localization.GetByLabel('UI/FactionWarfare/IHub/DonationReceived'), left=self.PADSIDE, top=50, opacity=0.0) self.bottomTaxCont = uiprimitives.Container(name='bottomTax', align=uiconst.TOPLEFT, pos=(self.PADSIDE, 73, 400, 25), parent=bottomMainCont) self.myLPToIhubLabel = None factionID = sm.GetService('facwar').GetSystemOccupier(session.solarsystemid) self.myLPTaxLabel = uicontrols.Label(name='myLPTaxLabel', parent=self.bottomTaxCont, text=localization.GetByLabel('UI/FactionWarfare/IHub/maintenanceTax', tax=int(facwarCommon.GetDonationTax(factionID) * 100)), align=uiconst.TOLEFT, state=uiconst.UI_NORMAL, left=5) self.SetLPPoolAmount(lpPool) self.UpdateMyLPAmount() self.UpdateMyLPToIHubLabel() uthread.new(self.CheckOpenThread)
def ConstructExistingFWPlayerHeader(self): self.topCont.Flush() iconSize = 50 rightCont = uiprimitives.Container(name='rightCont', parent=self.topCont, align=uiconst.TORIGHT, width=200, padLeft=2) leftCont = uiprimitives.Container(name='leftCont', parent=self.topCont, clipChildren=True) firstLine = uiprimitives.Container(parent=leftCont, align=uiconst.TOTOP_PROP, height=0.4, padLeft=20) uiprimitives.Sprite(parent=firstLine, align=uiconst.CENTERLEFT, pos=(0, 0, iconSize, iconSize), texturePath='res:/UI/Texture/Icons/FactionalWarfare_64.png') enemyID = facwarCommon.GetFactionMainEnemy(self.factionID) enemyAllyID = facwarCommon.GetFactionSecondaryEnemy(self.factionID) text = localization.GetByLabel('UI/FactionWarfare/FWPlayerHeader1', typeID=const.typeFaction, factionID=self.factionID, factionName=self.factionName, enemyID=enemyID, enemyName=cfg.eveowners.Get(enemyID).name, enemyAllyID=enemyAllyID, enemyAllyName=cfg.eveowners.Get(enemyAllyID).name) uicontrols.EveLabelLarge(parent=firstLine, align=uiconst.CENTERLEFT, state=uiconst.UI_NORMAL, left=iconSize + 20, text=text) secondLine = uiprimitives.Container(parent=leftCont, align=uiconst.TOTOP_PROP, height=0.6, padLeft=20) logo = uicls.LogoIcon(itemID=self.factionID, parent=secondLine, align=uiconst.CENTERLEFT, size=iconSize, ignoreSize=True) enemyID = facwarCommon.GetFactionMainEnemy(self.factionID) labelCont = uicontrols.ContainerAutoSize(parent=secondLine, align=uiconst.CENTERLEFT, left=iconSize + 20) rank, rankDesc = self.GetCurrentRank() timeServed = self.GetTimeServed() text = localization.GetByLabel('UI/FactionWarfare/FWPlayerHeader2', rank=rank, corp=cfg.eveowners.Get(session.corpid).name, faction=self.factionName, time=timeServed) uicontrols.EveLabelMedium(parent=labelCont, text=text, tabs=[100]) firstLine = uiprimitives.Container(name='firstLine', parent=rightCont, align=uiconst.TOTOP, height=80) secondLine = uiprimitives.Container(name='secondLine', parent=rightCont, align=uiconst.TOTOP, height=40, top=3) totalPointsCont = uiprimitives.Container(parent=firstLine, pos=(0, 30, 55, 30), align=uiconst.TOPLEFT, state=uiconst.UI_NORMAL, hint=localization.GetByLabel('UI/FactionWarfare/WarzoneProgress', points=self.warZoneInfo.factionPoints, pointsTotal=int(self.warZoneInfo.maxWarZonePoints))) uicontrols.EveLabelSmall(parent=totalPointsCont, text=localization.GetByLabel('UI/FactionWarfare/Points'), align=uiconst.CENTERTOP, top=-15) uicontrols.Frame(bgParent=totalPointsCont, color=(0.392, 0.635, 0.212, 0.2)) uicontrols.GradientSprite(bgParent=totalPointsCont, rotation=-pi / 2, rgbData=[(0, (0.239, 0.42, 0.235)), (1, (0.075, 0.157, 0.086))], alphaData=[(0, 1.0), (1, 0.9)]) self.totalPointsLabel = uicontrols.EveCaptionMedium(parent=totalPointsCont, align=uiconst.CENTER, text=self.warZoneInfo.factionPoints) systemsCont = uiprimitives.Container(parent=firstLine, align=uiconst.TOPLEFT, pos=(65, 5, 50, 100), state=uiconst.UI_NORMAL, hint=localization.GetByLabel('UI/FactionWarfare/NumConqueredSystems')) uiprimitives.Sprite(parent=systemsCont, align=uiconst.CENTERTOP, state=uiconst.UI_DISABLED, pos=(0, 0, 32, 32), texturePath='res:/UI/Texture/WindowIcons/systems.png') numSystems = len(sm.GetService('facwar').GetSolarSystemsOccupiedByFactions([self.factionID])) self.numSystemsLabel = uicontrols.EveHeaderLarge(parent=systemsCont, align=uiconst.CENTERTOP, top=30, text=numSystems) numUpgrades = self.GetSystemUpgradeNumbers() for i, num in enumerate(numUpgrades): if num: bgColor = util.Color.GetGrayRGBA(0.5, 0.5) else: bgColor = util.Color.GetGrayRGBA(0.2, 0.5) cont = uiprimitives.Container(parent=secondLine, bgColor=bgColor, align=uiconst.TOLEFT, state=uiconst.UI_NORMAL, width=35, padTop=15, padRight=4, hint=localization.GetByLabel('UI/FactionWarfare/UpgradeLevelHint', level=util.IntToRoman(i + 1))) uicontrols.EveLabelMedium(parent=cont, align=uiconst.CENTERTOP, text=util.IntToRoman(i + 1), top=-20) uicontrols.EveHeaderLarge(parent=cont, align=uiconst.CENTER, text=num)
def ApplyAttributes(self, attributes): uicontrols.Window.ApplyAttributes(self, attributes) transmission = attributes.transmission self.isDockWnd = 0 caption = getattr(transmission, 'caption', None) or localization.GetByLabel('UI/Generic/Information') hasDungeonWarp = getattr(transmission, 'hasDungeonWarp', False) self.scope = 'inflight' self.sr.main = uiutil.GetChild(self, 'main') uiprimitives.Line(parent=self.sr.topParent, align=uiconst.TOBOTTOM) uiprimitives.Container(name='push', parent=self.sr.topParent, align=uiconst.TOLEFT, width=70) self.sr.header = uicontrols.EveCaptionMedium(text=' ', parent=self.sr.topParent, align=uiconst.TOTOP, padTop=8) self.sr.messageArea = uicls.EditPlainText(parent=self.sr.main, padding=const.defaultPadding, readonly=1) self.sr.messageArea.HideBackground() self.sr.messageArea.RemoveActiveFrame() self.NoSeeThrough() self.SetMinSize([360, 240], 1) self.SetCaption(caption) self.MakeUnResizeable() self.MakeUnKillable() self.SetTopparentHeight(58) if not hasDungeonWarp: self.DefineButtons(uiconst.OK, okLabel=localization.GetByLabel('UI/Generic/Close'), okFunc=self.Close) else: self.sr.instanceID = getattr(transmission.rec.rec, 'instanceID', 0) self.sr.solarSystemID = getattr(transmission.rec.rec, 'solarSystemID', 0) if self.sr.solarSystemID == eve.session.solarsystemid: okLabel = localization.GetByLabel('UI/Commands/WarpTo') okFunc = self.WarpToEPLocation else: inFleet = bool(eve.session.fleetid) isLeader = sm.GetService('menu').ImFleetLeaderOrCommander() if inFleet and isLeader: okLabel = localization.GetByLabel('UI/Fleet/FleetBroadcast/Commands/BroadcastTravelTo') okFunc = self.SetFleetDestination else: okLabel = localization.GetByLabel('UI/Inflight/SetDestination') okFunc = self.SetDestination if self.sr.instanceID and self.sr.solarSystemID: self.DefineButtons(uiconst.OKCANCEL, okLabel=okLabel, okFunc=okFunc, cancelLabel=localization.GetByLabel('UI/Generic/Close'), cancelFunc=self.Close) else: self.DefineButtons(uiconst.OK, okLabel=localization.GetByLabel('UI/Generic/Close'), okFunc=self.Close)
def SetupStuff(self): options = [ (localization.GetByLabel( 'UI/Fleet/FleetRegistry/MyAvailableFleets'), INVITE_ALL), (localization.GetByLabel('UI/Fleet/FleetRegistry/MyCorpFleets'), INVITE_CORP) ] selected = settings.user.ui.Get('fleetfinder_scopeFilter', None) if session.allianceid is not None: options.append((localization.GetByLabel( 'UI/Fleet/FleetRegistry/MyAllianceFleets'), INVITE_ALLIANCE)) elif selected == INVITE_ALLIANCE: selected = None if session.warfactionid is not None: options.append((localization.GetByLabel( 'UI/Fleet/FleetRegistry/MyMilitiaFleets'), INVITE_MILITIA)) elif selected == INVITE_MILITIA: selected = None options.append(( localization.GetByLabel('UI/Fleet/FleetRegistry/BasedOnStandings'), INVITE_PUBLIC)) l = 1 combo = self.sr.scopeCombo = uicontrols.Combo( label=localization.GetByLabel('UI/Fleet/FleetRegistry/Scope'), parent=self.sr.filterCont, options=options, name='fleetfinder_scopeFilter', select=selected, pos=(l, 14, 0, 0), width=COMBO_SIZES[0]) self.sr.scopeCombo.OnChange = self.OnComboChange l += combo.width + 3 selected = settings.user.ui.Get('fleetfinder_rangeFilter', None) options = [ (localization.GetByLabel('UI/Common/Any'), None), (localization.GetByLabel('UI/Fleet/FleetRegistry/NumberOfJumps', numJumps=5), 5), (localization.GetByLabel('UI/Fleet/FleetRegistry/NumberOfJumps', numJumps=10), 10), (localization.GetByLabel('UI/Common/LocationTypes/Region'), -1) ] combo = self.sr.rangeCombo = uicontrols.Combo( label=localization.GetByLabel('UI/Fleet/FleetRegistry/Range'), parent=self.sr.filterCont, options=options, name='fleetfinder_rangeFilter', select=selected, pos=(l, 14, 0, 0), width=COMBO_SIZES[1]) self.sr.rangeCombo.OnChange = self.OnComboChange l += combo.width + 3 selected = settings.user.ui.Get('fleetfinder_standingFilter', None) options = [(localization.GetByLabel('UI/Common/Any'), None), (localization.GetByLabel('UI/Standings/Good'), const.contactGoodStanding), (localization.GetByLabel('UI/Standings/Excellent'), const.contactHighStanding)] combo = self.sr.standingCombo = uicontrols.Combo( label=localization.GetByLabel( 'UI/Fleet/FleetRegistry/RequireStanding'), parent=self.sr.filterCont, options=options, name='fleetfinder_standingFilter', select=selected, pos=(l, 14, 0, 0), width=COMBO_SIZES[2]) self.sr.standingCombo.OnChange = self.OnComboChange l += combo.width + 3 self.sr.getFleetsBtn = btn = uicontrols.Button( parent=self.sr.filterCont, label=localization.GetByLabel('UI/Fleet/FleetRegistry/FindFleets'), pos=(0, 14, 0, 0), func=self.GetFleetsClick, align=uiconst.TOPRIGHT) self.sr.scroll = uicontrols.Scroll(parent=self.sr.scrollCont) self.sr.scroll.sr.id = 'fleetfinderScroll' self.sr.scroll.multiSelect = 0 self.sr.scroll.Load(contentList=[], headers=[], scrolltotop=0, noContentHint=localization.GetByLabel( 'UI/Fleet/FleetRegistry/SearchHint')) self.sr.caption = uicontrols.EveLabelMediumBold( text='', parent=self.sr.topInfoCont, align=uiconst.RELATIVE, left=4, top=2, state=uiconst.UI_NORMAL) self.sr.detailsText = uicls.EditPlainText(name='detailsText', parent=self.sr.descrCont, padTop=2, padBottom=4, state=uiconst.UI_NORMAL, readonly=1) self.sr.detailsText.HideBackground() self.sr.detailsText.RemoveActiveFrame() FrameUnderlay(parent=self.sr.detailsText, colorType=uiconst.COLORTYPE_UIHILIGHT) tabs = [110, 540] self.sr.infoText = uicontrols.EveLabelMedium(name='infoText', text='', parent=self.sr.descrCont, top=const.defaultPadding, idx=0, tabs=tabs, state=uiconst.UI_NORMAL) self.sr.joinBtn = btn = uicontrols.Button( parent=self.sr.topInfoCont, label=localization.GetByLabel('UI/Fleet/FleetRegistry/JoinFleet'), pos=(0, 1, 0, 0), func=self.JoinFleet, align=uiconst.CENTERRIGHT) self.sr.joinRequestBtn = btn = uicontrols.Button( parent=self.sr.topInfoCont, label=localization.GetByLabel( 'UI/Fleet/FleetRegistry/RequestJoinFleet'), pos=(0, 1, 0, 0), func=self.JoinFleet, align=uiconst.CENTERRIGHT) self.sr.myAdvertMainCont = uiprimitives.Container( name='myAdvertMainCont', parent=self.sr.myAdvertCont, align=uiconst.TOALL, pos=(0, 0, 0, 0)) self.myAdvertButtons = [ (localization.GetByLabel('UI/Fleet/FleetWindow/EditAdvert'), sm.GetService('fleet').OpenRegisterFleetWindow, (), 84), (localization.GetByLabel('UI/Fleet/FleetWindow/RemoveAdvert'), sm.GetService('fleet').UnregisterFleet, (), 84) ] self.sr.myAdvertButtonWnd = uicontrols.ButtonGroup( btns=self.myAdvertButtons, parent=self.sr.myAdvertButtons, unisize=1) self.sr.myAdvertCaption = uicontrols.EveCaptionMedium( text='', parent=self.sr.myAdvertCont, align=uiconst.TOTOP, left=0, top=7, state=uiconst.UI_DISABLED) self.sr.myAdvertDescCont = uiprimitives.Container( name='myAdvertDescCont', parent=self.sr.myAdvertCont, align=uiconst.TOALL, pos=(0, 0, 0, 0)) self.sr.myAdvertText = uicontrols.EveLabelMedium( text='', parent=self.sr.myAdvertCont, top=const.defaultPadding, tabs=tabs, align=uiconst.TOTOP, state=uiconst.UI_NORMAL) self.sr.myAdvertDesc = uicls.EditPlainText( parent=self.sr.myAdvertDescCont, padTop=2, state=uiconst.UI_NORMAL, readonly=1) self.myAdvertButtons_Register = [ (localization.GetByLabel('UI/Fleet/FleetWindow/CreateAdvert'), sm.GetService('fleet').OpenRegisterFleetWindow, (), 84) ] self.sr.myAdvertButtonWnd_Register = uicontrols.ButtonGroup( btns=self.myAdvertButtons_Register, parent=self.sr.myAdvertButtons, unisize=1) self.sr.myAdvertButtonWnd_Register.state = uiconst.UI_HIDDEN
def ConstructLayout(self): self.leftCont = uiprimitives.Container(name='leftCont', parent=self.sr.main, align=uiconst.TOLEFT, width=SEARCH_WIDTH, clipChildren=True) self.rightCont = uiprimitives.Container(name='rightCont', parent=self.sr.main, align=uiconst.TOALL) topCont = uiprimitives.Container(name='topCont', parent=self.rightCont, align=uiconst.TOTOP, height=90) uicontrols.EveLabelMedium( text=localization.GetByLabel('UI/AgentFinder/AgentLevel'), parent=topCont, align=uiconst.CENTERTOP, top=4) self.sliderCont = uiprimitives.Container(name='sliderCont', parent=topCont, align=uiconst.TOTOP, pos=(0, 28, 0, 20), padding=(SLIDER_PADDING, 0, SLIDER_PADDING, 0)) self.sliderAdjusterCont = uiprimitives.Container( name='sliderAdjusterCont', parent=topCont, align=uiconst.TOTOP, pos=(0, 0, 0, ADJUSTER_WIDTH), padding=(SLIDER_PADDING, 0, SLIDER_PADDING, 0)) browseCont = uiprimitives.Container(name='browseCont', parent=self.rightCont, align=uiconst.TOBOTTOM, height=22, padding=(const.defaultPadding, 0, const.defaultPadding, 0), state=uiconst.UI_NORMAL) self.prevBtn = uicls.BrowseButton(parent=browseCont, prev=True, state=uiconst.UI_NORMAL, func=self.BrowseAgents) self.nextBtn = uicls.BrowseButton(parent=browseCont, prev=False, state=uiconst.UI_NORMAL, align=uiconst.TOPRIGHT, func=self.BrowseAgents) self.pageNumText = uicontrols.EveLabelMedium(text='', parent=browseCont, align=uiconst.CENTERTOP, state=uiconst.UI_HIDDEN) self.noAgentsCont = uiprimitives.Container( name='noAgentsCont', parent=self.rightCont, align=uiconst.TOALL, padding=(const.defaultPadding * 3, const.defaultPadding, const.defaultPadding * 3, const.defaultPadding), state=uiconst.UI_HIDDEN) self.noAgentsOrLoadingText = uicontrols.EveCaptionMedium( text='', parent=self.noAgentsCont, align=uiconst.TOTOP, width=self.noAgentsCont.width) self.noAgentsOrLoadingText.SetAlpha(0.5) self.mainCont = uicls.GridContainer( name='mainCont', parent=self.rightCont, align=uiconst.TOALL, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.mainCont.lines = AGENT_LINES self.mainCont.columns = AGENT_COLUMNS self.expanderCont = uiprimitives.Container(parent=topCont, align=uiconst.BOTTOMLEFT, height=16, width=60, top=8, state=uiconst.UI_NORMAL, left=6) self.expanderIcon = uicontrols.Icon(parent=self.expanderCont, idx=0, size=16, state=uiconst.UI_DISABLED, icon='ui_1_16_100') l = uicontrols.EveLabelMedium( text=localization.GetByLabel('UI/AgentFinder/FilterOptions'), parent=self.expanderCont, left=16) self.expanderCont.SetOpacity(NORMAL_ALPHA) self.expanderCont.width = l.width + 16 self.expanderCont.OnClick = self.OnChangeSize self.expanderCont.OnMouseEnter = (self.OnContMouseEnter, self.expanderCont) self.expanderCont.OnMouseExit = (self.OnContMouseExit, self.expanderCont) self.GetStandings() self.GetAllAgentInfo() self.ConstructSearchUI() self.agentLevel = settings.user.ui.Get('agentFinderLevel', self.bestCorpStanding) self.ConstructSlider() expanded = settings.user.ui.Get('agentFinderExpanded', None) if expanded is None: settings.user.ui.Set('agentFinderExpanded', False) if expanded: self.ExpandSearch() else: self.CollapseSearch() self.GetAgents()
def ConstructHeader(self): if self.loadingHeader: return self.loadingHeader = True self.topCont.Flush() characterName = cfg.eveowners.Get(session.charid).name if not getattr(self, 'charMgr', None): self.charMgr = sm.RemoteSvc('charMgr') if not getattr(self, 'cc', None): self.charsvc = sm.GetService('cc') self.sr.charinfo = charinfo = self.charMgr.GetPublicInfo( session.charid) if settings.user.ui.Get('charsheetExpanded', 1): parent = self.topCont self.sr.picParent = Container(name='picpar', parent=parent, align=uiconst.TOPLEFT, width=200, height=200, left=const.defaultPadding, top=16) self.sr.pic = Sprite(parent=self.sr.picParent, align=uiconst.TOALL, left=1, top=1, height=1, width=1) self.sr.pic.OnClick = self.OpenPortraitWnd self.sr.pic.cursor = uiconst.UICURSOR_MAGNIFIER uicontrols.Frame(parent=self.sr.picParent, opacity=0.2) sm.GetService('photo').GetPortrait(session.charid, 256, self.sr.pic) infoTextPadding = self.sr.picParent.width + const.defaultPadding * 4 characterLink = GetByLabel( 'UI/Contracts/ContractsWindow/ShowInfoLink', showInfoName=characterName, info=('showinfo', const.typeCharacterAmarr, session.charid)) self.sr.nameText = uicontrols.EveCaptionMedium( text=characterLink, parent=self.topCont, left=infoTextPadding, top=12, state=uiconst.UI_NORMAL) self.sr.raceinfo = raceinfo = cfg.races.Get(charinfo.raceID) self.sr.bloodlineinfo = bloodlineinfo = cfg.bloodlines.Get( charinfo.bloodlineID) self.sr.schoolinfo = schoolinfo = self.charsvc.GetData( 'schools', ['schoolID', charinfo.schoolID]) self.sr.ancestryinfo = ancestryinfo = self.charsvc.GetData( 'ancestries', ['ancestryID', charinfo.ancestryID]) if self.destroyed: self.loadingHeader = False return securityStatus = sm.GetService( 'crimewatchSvc').GetMySecurityStatus() roundedSecurityStatus = localization.formatters.FormatNumeric( securityStatus, decimalPlaces=1) cloneLocationRow = sm.RemoteSvc('charMgr').GetHomeStationRow() if cloneLocationRow: stationID = cloneLocationRow.stationID cloneLocationSystemID = cloneLocationRow.solarSystemID if cloneLocationSystemID: labelPath = 'UI/CharacterSheet/CharacterSheetWindow/CloneLocationHint' cloneLocationHint = GetByLabel( labelPath, locationId=stationID, systemId=cloneLocationSystemID) cloneLocation = cfg.evelocations.Get( cloneLocationSystemID).name else: cloneLocationHint = cfg.evelocations.Get(stationID).name cloneLocation = GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/UnknownSystem') else: cloneLocation = GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/UnknownSystem') cloneLocationHint = '' alliance = '' if session.allianceid: cfg.eveowners.Prime([session.allianceid]) alliance = (GetByLabel('UI/Common/Alliance'), cfg.eveowners.Get(session.allianceid).name, '') faction = '' if session.warfactionid: fac = sm.StartService('facwar').GetFactionalWarStatus() faction = (GetByLabel('UI/Common/Militia'), cfg.eveowners.Get(fac.factionID).name, '') bounty = '' bountyOwnerIDs = (session.charid, session.corpid, session.allianceid) bountyAmount = sm.GetService('bountySvc').GetBounty( *bountyOwnerIDs) bountyAmounts = sm.GetService('bountySvc').GetBounties( *bountyOwnerIDs) charBounty = 0 corpBounty = 0 allianceBounty = 0 if len(bountyAmounts): for ownerID, value in bountyAmounts.iteritems(): if util.IsCharacter(ownerID): charBounty = value elif util.IsCorporation(ownerID): corpBounty = value elif util.IsAlliance(ownerID): allianceBounty = value bountyHint = GetByLabel('UI/Station/BountyOffice/BountyHint', charBounty=util.FmtISK(charBounty, 0), corpBounty=util.FmtISK(corpBounty, 0), allianceBounty=util.FmtISK( allianceBounty, 0)) bounty = (GetByLabel('UI/Station/BountyOffice/Bounty'), util.FmtISK(bountyAmount, 0), bountyHint) skillPoints = int(sm.GetService('skills').GetSkillPoints()) textList = [ (GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/SkillPoints'), localization.formatters.FormatNumeric(skillPoints, useGrouping=True), ''), (GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/HomeSystem'), cloneLocation, cloneLocationHint), (GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/CharacterBackground' ), GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/CharacterBackgroundInformation', raceName=localization.GetByMessageID(raceinfo.raceNameID), bloodlineName=localization.GetByMessageID( bloodlineinfo.bloodlineNameID), ancestryName=localization.GetByMessageID( ancestryinfo.ancestryNameID)), GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/CharacterBackgroundHint' )), (GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/DateOfBirth'), localization.formatters.FormatDateTime( charinfo.createDateTime, dateFormat='long', timeFormat='long'), ''), (GetByLabel('UI/CharacterSheet/CharacterSheetWindow/School'), localization.GetByMessageID(schoolinfo.schoolNameID), ''), (GetByLabel('UI/Common/Corporation'), cfg.eveowners.Get(session.corpid).name, ''), (GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/SecurityStatus'), roundedSecurityStatus, localization.formatters.FormatNumeric(securityStatus, decimalPlaces=4)) ] if faction: textList.insert(len(textList) - 1, faction) if alliance: textList.insert(len(textList) - 1, alliance) if bounty: textList.insert(len(textList), bounty) numLines = len(textList) + 2 mtext = 'Xg<br>' * numLines mtext = mtext[:-4] th = GetTextHeight(mtext) topParentHeight = max(220, th + const.defaultPadding * 2 + 2) top = max(34, self.sr.nameText.top + self.sr.nameText.height) leftContainer = Container(parent=self.topCont, left=infoTextPadding, top=top, align=uiconst.TOPLEFT) rightContainer = Container(parent=self.topCont, top=top, align=uiconst.TOPLEFT) subTop = 0 for label, value, hint in textList: label = uicontrols.EveLabelMedium(text=label, parent=leftContainer, idx=0, state=uiconst.UI_NORMAL, align=uiconst.TOPLEFT, top=subTop) label.hint = hint label._tabMargin = 0 display = uicontrols.EveLabelMedium(text=value, parent=rightContainer, idx=0, state=uiconst.UI_NORMAL, align=uiconst.TOPLEFT, top=subTop) display.hint = hint display._tabMargin = 0 subTop += label.height leftContainer.AutoFitToContent() rightContainer.left = leftContainer.left + leftContainer.width + 20 rightContainer.AutoFitToContent() self.topCont.EnableAutoSize() else: self.topCont.DisableAutoSize() self.topCont.height = 18 charsheetExpanded = settings.user.ui.Get('charsheetExpanded', 1) if not charsheetExpanded: uicontrols.EveLabelMedium(text=characterName, parent=self.topCont, left=8, top=1, state=uiconst.UI_DISABLED) expandOptions = [ GetByLabel('UI/CharacterSheet/CharacterSheetWindow/Expand'), GetByLabel('UI/CharacterSheet/CharacterSheetWindow/Collapse') ] a = uicontrols.EveLabelSmall(text=expandOptions[charsheetExpanded], parent=self.topCont, left=15, top=3, state=uiconst.UI_NORMAL, align=uiconst.TOPRIGHT, bold=True) a.OnClick = self.ToggleGeneral expander = Sprite(parent=self.topCont, pos=(3, 2, 11, 11), name='expandericon', state=uiconst.UI_NORMAL, texturePath=[ 'res:/UI/Texture/Shared/expanderDown.png', 'res:/UI/Texture/Shared/expanderUp.png' ][charsheetExpanded], align=uiconst.TOPRIGHT) expander.OnClick = self.ToggleGeneral self.loadingHeader = False
def Load(self, node): agent = node.agent agentID = agent.agentID career = node.career agentStation = node.agentStation agentStationID = agentStation.stationID agentSystemID = agentStation.solarSystemID agentConstellationID = sm.GetService( 'map').GetConstellationForSolarSystem(agentSystemID) agentRegionID = sm.GetService('map').GetRegionForSolarSystem( agentSystemID) agentNameText = cfg.eveowners.Get(agentID).name self.sr.agentContainer.Flush() agentSprite = uiprimitives.Sprite(name='AgentSprite', parent=self.sr.agentContainer, align=uiconst.RELATIVE, width=128, height=128, state=uiconst.UI_NORMAL, top=6) agentTextContainer = uiprimitives.Container( name='TextContainer', parent=self.sr.agentContainer, align=uiconst.TOPLEFT, width=190, height=77, left=140) uicontrols.EveLabelLarge(text=agentNameText, parent=agentTextContainer, state=uiconst.UI_DISABLED, align=uiconst.TOTOP, padTop=const.defaultPadding) self.photoSvc.GetPortrait(agentID, 128, agentSprite) menuContainer = agentSprite menuContainer.GetMenu = lambda *args: self.GetAgentMenu( agent, agentStation) menuContainer.id = agentID menuContainer.OnClick = self.TalkToAgent menuContainer.cursor = uiconst.UICURSOR_SELECT agentButton = uicontrols.Button( parent=self.sr.agentContainer, align=uiconst.BOTTOMRIGHT, label=localization.GetByLabel('UI/Generic/Unknown'), fixedwidth=196, left=const.defaultPadding, top=const.defaultPadding) agentButton.func = self.SetDestination agentButton.args = (agentStationID, ) agentButton.SetLabel( localization.GetByLabel('UI/Commands/SetDestination')) agentButton.state = uiconst.UI_NORMAL if session.stationid is None and agentSystemID == session.solarsystemid: hint = menuContainer.hint = localization.GetByLabel( 'UI/Tutorial/AgentInSameSystem') agentButton.func = self.DockAtStation agentButton.args = (agentStationID, ) agentButton.SetLabel( localization.GetByLabel('UI/Tutorial/WarpToAgentStation')) elif session.stationid == agentStationID: hint = menuContainer.hint = localization.GetByLabel( 'UI/Tutorial/AgentInSameStation') agentButton.func = self.TalkToAgent agentButton.args = (agentID, ) agentButton.SetLabel( localization.GetByLabel('UI/Commands/StartConversation')) elif session.stationid is not None: hint = menuContainer.hint = localization.GetByLabel( 'UI/Tutorial/YouNeedToExitTheStation') else: hint = localization.GetByLabel( 'UI/Tutorial/ThisStationIsInADifferentSolarSystem', setDestination=localization.GetByLabel( 'UI/Commands/SetDestination')) if session.constellationid == agentConstellationID: menuContainer.hint = localization.GetByLabel( 'UI/Tutorial/AgentInSameConstellation') elif session.regionid == agentRegionID: menuContainer.hint = localization.GetByLabel( 'UI/Tutorial/AgentInSameRegion') else: menuContainer.hint = localization.GetByLabel( 'UI/Tutorial/AgentNotInSameRegion') linktext = "<url=showinfo:%d//%d alt='%s'>%s</url>" % ( agentStation.stationTypeID, agentStationID, hint, agentStation.stationName) linkObject = uicontrols.EveLabelMedium(text=linktext, parent=agentTextContainer, state=uiconst.UI_NORMAL, align=uiconst.TOTOP, padTop=const.defaultPadding, padLeft=const.defaultPadding, padRight=const.defaultPadding) uiutil.Flush(self.sr.careerContainer) careerText = localization.GetByLabel('UI/Generic/Unknown') careerDesc = localization.GetByLabel('UI/Generic/Unknown') if career == const.agentDivisionBusiness: careerText = localization.GetByLabel('UI/Tutorial/Business') careerDesc = localization.GetByLabel('UI/Tutorial/BusinessDesc') elif career == const.agentDivisionExploration: careerText = localization.GetByLabel('UI/Tutorial/Exploration') careerDesc = localization.GetByLabel('UI/Tutorial/ExplorationDesc') elif career == const.agentDivisionIndustry: careerText = localization.GetByLabel('UI/Tutorial/Industry') careerDesc = localization.GetByLabel('UI/Tutorial/IndustryDesc') elif career == const.agentDivisionMilitary: careerText = localization.GetByLabel('UI/Tutorial/Military') careerDesc = localization.GetByLabel('UI/Tutorial/MilitaryDesc') elif career == const.agentDivisionAdvMilitary: careerText = localization.GetByLabel('UI/Tutorial/AdvMilitary') careerDesc = localization.GetByLabel('UI/Tutorial/AdvMilitaryDesc') uicontrols.EveCaptionMedium(text=careerText, parent=self.sr.careerContainer, state=uiconst.UI_DISABLED, align=uiconst.TOTOP) uicontrols.EveLabelMedium(text=careerDesc, parent=self.sr.careerContainer, state=uiconst.UI_DISABLED, align=uiconst.TOTOP)