def ApplyAttributes(self, attributes): invCont._InvContBase.ApplyAttributes(self, attributes) ownerID = attributes.ownerID ownerName = cfg.eveowners.Get(ownerID).name self.topCont = uiprimitives.Container(parent=self, align=uiconst.TOTOP, height=65, idx=0) myImgCont = Sprite(parent=self.topCont, align=uiconst.TOLEFT, width=64, idx=0, texturePath='res:/UI/Texture/silhouette_64.png', left=2) sm.GetService('photo').GetPortrait(ownerID, 64, myImgCont) myImgCont.OnClick = (self.ShowCharInfo, ownerID) myImgCont.hint = ownerName ownerLink = GetByLabel('UI/Contracts/ContractsWindow/ShowInfoLink', showInfoName=ownerName, info=('showinfo', const.typeCharacterAmarr, ownerID)) uicontrols.EveLabelMedium(text=ownerLink, parent=self.topCont, left=72, top=2, bold=True, state=uiconst.UI_NORMAL) self.acceptIcon = uicontrols.Icon(icon='ui_38_16_193', parent=self.topCont, left=67, top=14) uicls.InvContViewBtns(parent=self.topCont, align=uiconst.BOTTOMLEFT, left=72, controller=self) self.moneyLabel = uicontrols.EveLabelMedium(parent=self.topCont, left=6, top=-2, align=uiconst.BOTTOMRIGHT)
def ApplyAttributes(self, attributes): invCont._InvContBase.ApplyAttributes(self, attributes) tradeItems = attributes.tradeItems ownerID = attributes.ownerID ownerName = cfg.eveowners.Get(ownerID).name self.topCont = uiprimitives.Container(parent=self, align=uiconst.TOTOP, height=65, idx=0) myImgCont = Sprite(parent=self.topCont, align=uiconst.TOLEFT, width=64, idx=0, texturePath='res:/UI/Texture/silhouette_64.png', left=2) sm.GetService('photo').GetPortrait(ownerID, 64, myImgCont) myImgCont.OnClick = (self.ShowCharInfo, ownerID) myImgCont.hint = ownerName ownerLink = GetByLabel('UI/Contracts/ContractsWindow/ShowInfoLink', showInfoName=ownerName, info=('showinfo', const.typeCharacterAmarr, ownerID)) uicontrols.EveLabelMedium(text=ownerLink, parent=self.topCont, left=72, top=2, bold=True, state=uiconst.UI_NORMAL) self.acceptIcon = uicontrols.Icon(icon='ui_38_16_193', parent=self.topCont, left=67, top=14) uicls.InvContViewBtns(parent=self.topCont, align=uiconst.BOTTOMLEFT, left=72, controller=self) self.moneyLabel = uicontrols.EveLabelMedium(parent=self.topCont, left=6, top=-2, align=uiconst.BOTTOMRIGHT) if tradeItems: self.invController.OnDropData(tradeItems)
def ApplyAttributes(self, attributes): Window.ApplyAttributes(self, attributes) self.SetTopparentHeight(0) self.bountyEscrow = attributes.bountyEscrow self.bountyAmount = attributes.bountyAmount self.component = attributes.component factionResPath = FACTIONPATHBYESSTYPEID[attributes.ESSTypeID] navyID = CORPIDBYFACTIONID[attributes.ESSTypeID] self.SetCaption(GetByLabel(CAPTIONBYESSTYPEID[attributes.ESSTypeID])) self.myContribution = 0 self.amountInTags = 0 mainCont = Container(name='mainCont', parent=self.sr.main, padding=const.defaultPadding) iconCont = Container(name='iconCont', parent=mainCont, align=uiconst.TOTOP, height=64) headerCont = Container(name='headerCont', parent=mainCont, align=uiconst.TOTOP, height=54, padBottom=6) buttonsCont = Container(name='buttonsCont', parent=mainCont, align=uiconst.TOBOTTOM, height=80, padTop=4, padBottom=4) listCont = Container(name='listCont', parent=mainCont, align=uiconst.TOALL, padBottom=14) factionLogo = Sprite(parent=iconCont, align=uiconst.CENTERTOP, width=64, height=64, texturePath=factionResPath) factionLogo.hint = cfg.eveowners.Get(navyID).name factionLogo.OnClick = (self.OpenNavyInfo, navyID) EveLabelLarge(text=GetByLabel('UI/Inflight/Brackets/TotalBounty'), parent=headerCont, maxLines=1, align=uiconst.CENTERTOP) EveCaptionMedium(text=FmtISK(self.bountyAmount, 0), parent=headerCont, maxLines=1, align=uiconst.CENTERTOP, state=uiconst.UI_NORMAL, top=16) contributorsCont = Container(name='contributorsCont', parent=listCont, align=uiconst.TOLEFT_PROP, width=0.45) self.tagsCont = Container(name='tagsCont', parent=listCont, align=uiconst.TORIGHT_PROP, width=0.45) topSpaceCont = Container(name='topSpaceCont', parent=listCont, align=uiconst.TOALL) self.contributersList = ScrollContainer(name='contributersList', parent=contributorsCont, align=uiconst.TOALL) shareCont = Container(name='shareCont', parent=buttonsCont, align=uiconst.TOLEFT_PROP, width=0.45) takeCont = Container(name='takeCont', parent=buttonsCont, align=uiconst.TORIGHT_PROP, width=0.45) spaceCont = Container(name='spaceCont', parent=buttonsCont, align=uiconst.TOALL) youGetLabel = EveLabelMedium(text=GetByLabel('UI/Inflight/Brackets/YouGet'), parent=shareCont, align=uiconst.CENTERTOP, top=1) myContribLabel = EveLabelLargeBold(text='', parent=shareCont, align=uiconst.CENTERTOP, top=16) shareLabel = EveLabelSmall(text=GetByLabel('UI/Inflight/Brackets/EveryoneGetsTheirShare'), parent=shareCont, align=uiconst.CENTERBOTTOM) shareBtn = Button(parent=shareCont, label=GetByLabel('UI/Inflight/Brackets/Share'), align=uiconst.TOBOTTOM, top=20, func=self.ShareContribution) orLabel = EveLabelLargeBold(text=GetByLabel('UI/Inflight/Brackets/Or'), parent=spaceCont, align=uiconst.CENTER, top=10) amountInTagsLabel = EveLabelLarge(text=GetByLabel('UI/Inflight/Brackets/AmountInTags', amount=FmtISK(0, 0)), parent=takeCont, align=uiconst.CENTERTOP, top=16) takeLabel = EveLabelSmall(text=GetByLabel('UI/Inflight/Brackets/OthersGetNothing'), parent=takeCont, align=uiconst.CENTERBOTTOM) takeAllBtn = Button(parent=takeCont, label=GetByLabel('UI/Inflight/Brackets/TakeAll'), align=uiconst.TOBOTTOM, top=20, func=self.TakeAll) self.LoadContributions(attributes.contributions) myContribLabel.SetText(FmtISK(self.myContribution, 0)) self.LoadTags() amountInTagsLabel.SetText(GetByLabel('UI/Inflight/Brackets/AmountInTags', amount=FmtISK(self.amountInTags, 0)))
def AddColumnAssetSafetyTimers(self): colContainer = self.AddColumnContainer() timerSprite = Sprite( name='timerSprite', parent=colContainer, align=uiconst.CENTERLEFT, pos=(0, 0, 24, 24), texturePath='res:/UI/Texture/classes/Inventory/hourglass.png') timerSprite.hint = GetByLabel( 'UI/Inventory/AssetSafety/AutoDeliveryHint') self.autoTimeLeft = EveLabelMedium(parent=colContainer, align=uiconst.CENTERLEFT, left=timerSprite.left + timerSprite.width + 4) stationText = GetShowInfoLink(self.nearestNPCStationInfo['typeID'], self.nearestNPCStationInfo['name'], self.nearestNPCStationInfo['itemID']) self.nearestNPCStationLabel = EveLabelMedium(parent=colContainer, align=uiconst.CENTERLEFT, text=stationText, left=135, state=uiconst.UI_NORMAL)
def GetRoleSprite(self, name, texturePath, hintLabel): roleSprite = Sprite(name=name, texturePath=texturePath, width=16, height=16, align=uiconst.CENTER, opacity=0.6) roleSprite.hint = hintLabel return roleSprite
def ApplyAttributes(self, attributes): Window.ApplyAttributes(self, attributes) self.SetTopparentHeight(0) self.bountyEscrow = attributes.bountyEscrow self.bountyAmount = attributes.bountyAmount self.component = attributes.component factionResPath = FACTIONPATHBYESSTYPEID[attributes.ESSTypeID] navyID = CORPIDBYFACTIONID[attributes.ESSTypeID] self.SetCaption(GetByLabel(CAPTIONBYESSTYPEID[attributes.ESSTypeID])) self.myContribution = 0 self.amountInTags = 0 mainCont = Container(name='mainCont', parent=self.sr.main, padding=const.defaultPadding) iconCont = Container(name='iconCont', parent=mainCont, align=uiconst.TOTOP, height=64) headerCont = Container(name='headerCont', parent=mainCont, align=uiconst.TOTOP, height=54, padBottom=6) buttonsCont = Container(name='buttonsCont', parent=mainCont, align=uiconst.TOBOTTOM, height=80, padTop=4, padBottom=4) listCont = Container(name='listCont', parent=mainCont, align=uiconst.TOALL, padBottom=14) factionLogo = Sprite(parent=iconCont, align=uiconst.CENTERTOP, width=64, height=64, texturePath=factionResPath) factionLogo.hint = cfg.eveowners.Get(navyID).name factionLogo.OnClick = (self.OpenNavyInfo, navyID) EveLabelLarge(text=GetByLabel('UI/Inflight/Brackets/TotalBounty'), parent=headerCont, maxLines=1, align=uiconst.CENTERTOP) EveCaptionMedium(text=FmtISK(self.bountyAmount, 0), parent=headerCont, maxLines=1, align=uiconst.CENTERTOP, state=uiconst.UI_NORMAL, top=16) contributorsCont = Container(name='contributorsCont', parent=listCont, align=uiconst.TOLEFT_PROP, width=0.45) self.tagsCont = Container(name='tagsCont', parent=listCont, align=uiconst.TORIGHT_PROP, width=0.45) topSpaceCont = Container(name='topSpaceCont', parent=listCont, align=uiconst.TOALL) self.contributersList = ScrollContainer(name='contributersList', parent=contributorsCont, align=uiconst.TOALL) shareCont = Container(name='shareCont', parent=buttonsCont, align=uiconst.TOLEFT_PROP, width=0.45) takeCont = Container(name='takeCont', parent=buttonsCont, align=uiconst.TORIGHT_PROP, width=0.45) spaceCont = Container(name='spaceCont', parent=buttonsCont, align=uiconst.TOALL) youGetLabel = EveLabelMedium( text=GetByLabel('UI/Inflight/Brackets/YouGet'), parent=shareCont, align=uiconst.CENTERTOP, top=1) myContribLabel = EveLabelLargeBold(text='', parent=shareCont, align=uiconst.CENTERTOP, top=16) shareLabel = EveLabelSmall( text=GetByLabel('UI/Inflight/Brackets/EveryoneGetsTheirShare'), parent=shareCont, align=uiconst.CENTERBOTTOM) shareBtn = Button(parent=shareCont, label=GetByLabel('UI/Inflight/Brackets/Share'), align=uiconst.TOBOTTOM, top=20, func=self.ShareContribution) orLabel = EveLabelLargeBold(text=GetByLabel('UI/Inflight/Brackets/Or'), parent=spaceCont, align=uiconst.CENTER, top=10) amountInTagsLabel = EveLabelLarge(text=GetByLabel( 'UI/Inflight/Brackets/AmountInTags', amount=FmtISK(0, 0)), parent=takeCont, align=uiconst.CENTERTOP, top=16) takeLabel = EveLabelSmall( text=GetByLabel('UI/Inflight/Brackets/OthersGetNothing'), parent=takeCont, align=uiconst.CENTERBOTTOM) takeAllBtn = Button(parent=takeCont, label=GetByLabel('UI/Inflight/Brackets/TakeAll'), align=uiconst.TOBOTTOM, top=20, func=self.TakeAll) self.LoadContributions(attributes.contributions) myContribLabel.SetText(FmtISK(self.myContribution, 0)) self.LoadTags() amountInTagsLabel.SetText( GetByLabel('UI/Inflight/Brackets/AmountInTags', amount=FmtISK(self.amountInTags, 0)))