コード例 #1
0
 def AddOptionText(self):
     self.labelShadow = uicls.ThreePartContainer(
         parent=self,
         name='labelShadow',
         pos=(0, -10, 200, 30),
         align=uiconst.CENTER,
         state=uiconst.UI_DISABLED,
         idx=0,
         leftTexturePath=
         'res:/UI/Texture/classes/RadialMenu/textShadowLeft.png',
         rightTexturePath=
         'res:/UI/Texture/classes/RadialMenu/textShadowRight.png',
         centerTexturePath=
         'res:/UI/Texture/classes/RadialMenu/textShadowCenter.png',
         sideSize=24)
     self.labelShadow.display = False
     self.optionLabel = uicontrols.EveLabelLarge(text='',
                                                 parent=self,
                                                 state=uiconst.UI_DISABLED,
                                                 align=uiconst.CENTER,
                                                 top=-10,
                                                 idx=0,
                                                 bold=True)
     self.optionLabel.display = False
     self.optionRangeLabel = uicontrols.EveLabelLarge(
         text='',
         parent=self,
         state=uiconst.UI_DISABLED,
         align=uiconst.CENTER,
         top=6,
         idx=0)
     self.optionRangeLabel.display = False
     self.AdjustTextShadow()
コード例 #2
0
ファイル: warReport.py プロジェクト: connoryang/1v1dec
 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)
コード例 #3
0
ファイル: radialMenuShipUI.py プロジェクト: connoryang/1v1dec
 def AddOptionText(self):
     self.labelShadow = ThreePartContainer(
         parent=self,
         name='labelShadow',
         pos=(0, 0, 200, 30),
         align=uiconst.CENTERTOP,
         state=uiconst.UI_DISABLED,
         idx=0,
         leftTexturePath=
         'res:/UI/Texture/classes/RadialMenu/textShadowLeft.png',
         rightTexturePath=
         'res:/UI/Texture/classes/RadialMenu/textShadowRight.png',
         centerTexturePath=
         'res:/UI/Texture/classes/RadialMenu/textShadowCenter.png',
         sideSize=24,
         color=(0, 0, 0, 0.6))
     self.labelShadow.display = False
     self.shortcutHint = ShortcutHint(parent=self.labelShadow,
                                      text='',
                                      bgColor=(0.15, 0.15, 0.15, 1.0),
                                      textColor=(0.5, 0.5, 0.5, 1.0),
                                      align=uiconst.CENTERRIGHT,
                                      left=24,
                                      idx=0)
     self.optionLabel = uicontrols.EveLabelLarge(parent=self.labelShadow,
                                                 state=uiconst.UI_DISABLED,
                                                 align=uiconst.CENTER,
                                                 top=0,
                                                 idx=0,
                                                 bold=True)
     self.optionLabel.display = False
     self.AdjustTextShadow()
コード例 #4
0
 def AddDisplayLabel(self):
     displayTop = -18
     self.displayLabelCont = uicls.ThreePartContainer(
         parent=self,
         name='labelShadow',
         pos=(0, displayTop, 200, 30),
         align=uiconst.CENTERTOP,
         state=uiconst.UI_DISABLED,
         idx=0,
         leftTexturePath=
         'res:/UI/Texture/classes/RadialMenu/textShadowLeft.png',
         rightTexturePath=
         'res:/UI/Texture/classes/RadialMenu/textShadowRight.png',
         centerTexturePath=
         'res:/UI/Texture/classes/RadialMenu/textShadowCenter.png',
         sideSize=24)
     self.displayLabel = uicontrols.EveLabelLarge(
         text=self.displayName,
         parent=self.displayLabelCont,
         state=uiconst.UI_DISABLED,
         align=uiconst.CENTERTOP,
         top=0,
         idx=0)
     height = self.displayLabel.textheight + 2
     centerWidth = self.displayLabel.textwidth
     self.displayLabelCont.SetCenterSizeAndTop(centerWidth, height)
     if self.updateDisplayName:
         self.UpdateDisplayName()
         self.displayNameTimer = base.AutoTimer(250, self.UpdateDisplayName)
コード例 #5
0
ファイル: timeLeftCounters.py プロジェクト: connoryang/1v1dec
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     endTime = attributes.endTime
     iconPath = attributes.iconPath
     addButton = attributes.get('addButton', False)
     self.callback = attributes.get('callback', None)
     hintMessage = attributes.get('hintMessage', None)
     if hintMessage:
         self.hint = localization.GetByLabel(hintMessage, endTime=endTime)
     self.highlight = uiprimitives.Fill(bgParent=self,
                                        color=(0.8, 0.8, 0.8, 0.2))
     self.highlight.display = False
     icon = uiprimitives.Sprite(parent=self,
                                pos=(0, 0, 32, 32),
                                align=uiconst.CENTERLEFT,
                                texturePath=iconPath,
                                state=uiconst.UI_DISABLED)
     now = blue.os.GetWallclockTime()
     timeLeft = max(0L, endTime - now)
     timeLeftText = localization.formatters.FormatTimeIntervalWritten(
         long(timeLeft), showFrom='day', showTo='day')
     self.label = uicontrols.EveLabelLarge(parent=self,
                                           pos=(8, 0, 0, 0),
                                           align=uiconst.CENTERRIGHT,
                                           text=timeLeftText,
                                           state=uiconst.UI_DISABLED)
     if timeLeft < csUtil.WARNING_TIME:
         self.label.SetRGB(1, 0, 0, 1)
     self.width = icon.width + self.label.textwidth + self.label.left + 4
     if self.callback:
         self.OnClick = self.callback
     if addButton:
         btnText = attributes.get('btnText', '')
         self.AddButton(btnText=btnText)
コード例 #6
0
 def ConstructLayout(self):
     corpName = cfg.eveowners.Get(self.corpid).name
     corpInfoCont = uiprimitives.Container(name='corpInfo', parent=self.sr.main, align=uiconst.TOTOP, height=68, padding=const.defaultPadding)
     corpLogoCont = uiprimitives.Container(name='corpLogo', parent=corpInfoCont, align=uiconst.TOLEFT, width=68)
     corpTextCont = uiprimitives.Container(name='corpName', parent=corpInfoCont, align=uiconst.TOALL)
     applicationCont = uiprimitives.Container(name='corpInfo', parent=self.sr.main, align=uiconst.TOALL, padding=(const.defaultPadding,
      0,
      const.defaultPadding,
      const.defaultPadding))
     uiutil.GetOwnerLogo(corpLogoCont, self.corpid, size=64, noServerCall=True)
     corpText = localization.GetByLabel('UI/Corporations/BaseCorporationUI/ApplyForMembership', corporation=corpName)
     corpNameLabel = uicontrols.EveLabelLarge(parent=corpTextCont, text=corpText, top=12, align=uiconst.TOPLEFT, width=270)
     editText = localization.GetByLabel('UI/Corporations/BaseCorporationUI/CorporationApplicationText')
     editLabel = uicontrols.EveLabelSmall(parent=applicationCont, text=editText, align=uiconst.TOTOP)
     tax = self.corporation.taxRate * 100
     taxText = localization.GetByLabel('UI/Corporations/BaseCorporationUI/CurrentTaxRateForCorporation', corporation=corpName, taxRate=tax)
     taxLabel = uicontrols.EveLabelSmall(parent=applicationCont, text=taxText, align=uiconst.TOBOTTOM)
     corpService = sm.GetService('corp')
     aggressionSettings = corpService.GetAggressionSettings(self.corpid)
     statusText = corpService.GetCorpFriendlyFireStatus(aggressionSettings)
     ffText = localization.GetByLabel('UI/Corporations/FriendlyFire/FriendlyFireStatus', ffStatus=statusText)
     ffCont = uiprimitives.Container(parent=applicationCont, align=uiconst.TOBOTTOM, height=16)
     friendlyFireLabel = uicontrols.EveLabelSmall(parent=ffCont, text=ffText, align=uiconst.TOLEFT)
     helpIcon = MoreInfoIcon(parent=ffCont, align=uiconst.TORIGHT, hint=localization.GetByLabel('UI/Corporations/FriendlyFire/Description'))
     if self.corporation and not self.corporation.isRecruiting:
         notRecruitingText = localization.GetByLabel('UI/Corporations/BaseCorporationUI/RecruitmentMayBeClosed')
         notRecruiting = uicontrols.EveLabelSmall(parent=applicationCont, text=notRecruitingText, align=uiconst.TOBOTTOM, idx=0)
         self.SetMinSize((self.default_width, self.default_height + notRecruiting.textheight), refresh=True)
     self.applicationText = uicls.EditPlainText(setvalue='', parent=applicationCont, align=uiconst.TOALL, maxLength=1000)
コード例 #7
0
 def ActivateKillRightMenu(self, menuParent):
     cont = menuParent.AddContainer(align=uiconst.TOTOP,
                                    padding=const.defaultPadding)
     cont.GetEntryWidth = lambda mc=cont: 230
     charName = cfg.eveowners.Get(self.charID).name
     charNamelabel = localization.GetByLabel(
         'UI/Contracts/ContractsWindow/ShowInfoLink',
         showInfoName=charName,
         info=('showinfo', const.typeCharacterAmarr, self.charID))
     if self.price is not None:
         headerText = localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/BuyKillRight')
         explainText = localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/PurchaseLabel',
             charName=charNamelabel)
         priceText = localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/AcativationCost',
             costAmount=util.FmtISK(self.price, 0))
     else:
         headerText = localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/ActivateKillRight')
         explainText = localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/ActivateLabel',
             charName=charNamelabel)
         priceText = ''
     headerLabel = uicontrols.EveLabelLarge(text=headerText,
                                            parent=cont,
                                            align=uiconst.TOTOP,
                                            state=uiconst.UI_NORMAL,
                                            bold=True)
     helpTextCont = uiprimitives.Container(name='helpTextCont',
                                           parent=cont,
                                           align=uiconst.TOTOP,
                                           height=40,
                                           padTop=const.defaultPadding)
     helpText = uicontrols.EveLabelMedium(text=explainText,
                                          parent=helpTextCont,
                                          state=uiconst.UI_NORMAL,
                                          align=uiconst.TOTOP,
                                          color=(1.0, 0.0, 0.0, 0.8))
     buttonCont = uiprimitives.Container(name='buttonCont',
                                         parent=cont,
                                         align=uiconst.TOTOP,
                                         height=20)
     priceLabel = uicontrols.EveLabelMedium(text=priceText,
                                            parent=buttonCont)
     buttonLabel = localization.GetByLabel(
         'UI/CharacterSheet/CharacterSheetWindow/Activate')
     if self.price is None:
         self.func = 'ActivateKillRight'
         self.params = (self.killRightID, self.charID, self.shipID)
     else:
         self.func = 'BuyKillRight'
         self.params = (self.killRightID, self.charID, self.shipID,
                        self.price)
     self.activateBtn = uicontrols.Button(parent=buttonCont,
                                          label=buttonLabel,
                                          align=uiconst.TORIGHT,
                                          func=self.ActivateKillRight)
コード例 #8
0
 def ConstructLayout(self):
     charInfoCont = uiprimitives.Container(name='charInfo',
                                           parent=self.sr.main,
                                           align=uiconst.TOTOP,
                                           height=68,
                                           padding=const.defaultPadding)
     charLogoCont = uiprimitives.Container(name='charLogo',
                                           parent=charInfoCont,
                                           align=uiconst.TOLEFT,
                                           width=68)
     charTextCont = uiprimitives.Container(name='charName',
                                           parent=charInfoCont,
                                           align=uiconst.TOALL)
     applicationCont = uiprimitives.Container(
         name='charInfo',
         parent=self.sr.main,
         align=uiconst.TOALL,
         padding=(const.defaultPadding, 0, const.defaultPadding,
                  const.defaultPadding))
     uiutil.GetOwnerLogo(charLogoCont,
                         self.charID,
                         size=64,
                         noServerCall=True)
     charText = localization.GetByLabel(
         'UI/Corporations/CorpApplications/ApplicationSubjectLine',
         player=self.charID)
     charNameLabel = uicontrols.EveLabelLarge(parent=charTextCont,
                                              text=charText,
                                              top=12,
                                              align=uiconst.TOPLEFT,
                                              width=270)
     editText = localization.GetByLabel(
         'UI/Corporations/BaseCorporationUI/CorporationApplicationText')
     editLabel = uicontrols.EveLabelSmall(parent=applicationCont,
                                          text=editText,
                                          align=uiconst.TOTOP)
     self.rejectRb = uicontrols.Checkbox(text=localization.GetByLabel(
         'UI/Corporations/CorpApplications/RejectApplication'),
                                         parent=applicationCont,
                                         configName='reject',
                                         retval=1,
                                         checked=False,
                                         groupname='state',
                                         align=uiconst.TOBOTTOM)
     self.acceptRb = uicontrols.Checkbox(text=localization.GetByLabel(
         'UI/Corporations/CorpApplications/ApplicationInviteApplicant'),
                                         parent=applicationCont,
                                         configName='accept',
                                         retval=0,
                                         checked=True,
                                         groupname='state',
                                         align=uiconst.TOBOTTOM)
     if self.status not in const.crpApplicationActiveStatuses:
         self.rejectRb.state = uiconst.UI_HIDDEN
         self.acceptRb.state = uiconst.UI_HIDDEN
     self.applicationText = uicls.EditPlainText(setvalue=self.appText,
                                                parent=applicationCont,
                                                maxLength=1000,
                                                readonly=True)
コード例 #9
0
    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)
コード例 #10
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self._caption = self.name = 'CtrlTabWindow'
     self.HideHeader()
     self.SetWndIcon(None)
     self.SetTopparentHeight(0)
     self.SetMainIconSize(0)
     self.MakeUncollapseable()
     self.MakeUnpinable()
     self.MakeUnMinimizable()
     self.MakeUnResizeable()
     self.MakeUnKillable()
     self.HideUnderlay()
     self.MakeUnstackable()
     uicore.event.RegisterForTriuiEvents(uiconst.UI_MOUSEDOWN,
                                         self.OnGlobalMouseDown)
     uicontrols.Frame(parent=self, color=FRAMECOLOR)
     uiprimitives.Fill(parent=self, color=FILLCOLOR)
     self.currOpenWindows = uicore.registry.GetWindows()[:]
     self.showOrHide = self.AllWindowsMinimized()
     self.selectionBoxIndex = None
     self.windowIcons = []
     self.showOrHideMessage = [
         localization.GetByLabel('UI/Common/Windows/HideWindows'),
         localization.GetByLabel('UI/Common/Windows/ShowWindows')
     ][self.showOrHide]
     self.InitializeWindowIcons()
     self.numIcons = len(self.windowIcons)
     self.numRows = int(math.ceil(float(self.numIcons) / float(NUMCOLS)))
     if self.numRows > 1:
         self.xShift = 0
     else:
         self.xShift = (NUMCOLS - self.numIcons) * BLOCKSIZE / 2
     uthread.new(self.SetWindowSize)
     self.RenderIcons()
     self.sr.selectionBox = uiprimitives.Container(
         name='selectionBox',
         parent=self.sr.main,
         align=uiconst.RELATIVE,
         pos=(SPACINGWIDTH, SPACINGWIDTH, ICONWIDTH, ICONWIDTH))
     uiprimitives.Fill(parent=self.sr.selectionBox, color=SELECTCOLOR)
     self.sr.selectionBoxMouse = uiprimitives.Container(
         name='selectionBox',
         parent=self.sr.main,
         align=uiconst.RELATIVE,
         pos=(SPACINGWIDTH, SPACINGWIDTH, ICONWIDTH, ICONWIDTH),
         state=uiconst.UI_HIDDEN)
     uiprimitives.Fill(parent=self.sr.selectionBoxMouse, color=SELECTCOLOR)
     self.sr.windowText = uicontrols.EveLabelLarge(
         parent=self.sr.main,
         align=uiconst.TOBOTTOM,
         color=(1, 1, 1, 1),
         state=uiconst.UI_DISABLED,
         padding=BORDER)
コード例 #11
0
ファイル: contractentry.py プロジェクト: connoryang/1v1dec
 def Startup(self, *etc):
     self.icon = uicontrols.Icon(parent=self,
                                 top=TOPMARGIN,
                                 size=32,
                                 ignoreSize=True,
                                 left=4)
     self.header = uicontrols.EveLabelLarge(parent=self,
                                            left=50,
                                            top=TOPMARGIN,
                                            state=uiconst.UI_NORMAL)
     self.text = uicontrols.EveLabelMedium(parent=self,
                                           left=50,
                                           state=uiconst.UI_NORMAL)
コード例 #12
0
 def Startup(self, *etc):
     uiprimitives.Line(parent=self,
                       align=uiconst.TOBOTTOM,
                       color=uiconst.ENTRY_LINE_COLOR)
     self.icon = uicontrols.Icon(parent=self,
                                 top=TOPMARGIN,
                                 size=32,
                                 ignoreSize=True,
                                 left=4)
     self.header = uicontrols.EveLabelLarge(parent=self,
                                            left=50,
                                            top=TOPMARGIN,
                                            state=uiconst.UI_NORMAL)
     self.text = uicontrols.EveLabelMedium(parent=self,
                                           left=50,
                                           state=uiconst.UI_NORMAL)
コード例 #13
0
 def ApplyAttributes(self, attributes):
     uiprimitives.Container.ApplyAttributes(self, attributes)
     self.lowerLimit = attributes.lowerLimit
     self.upperLimit = attributes.upperLimit
     self.lpAmount = attributes.lpAmount
     self.lastAmount = 0
     self.level = attributes.level
     self.leftCont = uiprimitives.Container(name='leftCont',
                                            parent=self,
                                            align=uiconst.TOLEFT_PROP,
                                            width=0.75)
     self.rightCont = uiprimitives.Container(name='rightCont', parent=self)
     self.bgFrame = uicontrols.Frame(
         bgParent=self.leftCont, frameConst=uiconst.FRAME_BORDER1_CORNER1)
     self.bgGradient = uicontrols.GradientSprite(bgParent=self.leftCont,
                                                 rotation=-pi / 2)
     levelName = uicontrols.EveCaptionLarge(parent=self.leftCont,
                                            text=self.GetLevelName(),
                                            top=5,
                                            left=10)
     if self.level == 6:
         levelName.fontsize = 16
     self.progressGauge = uicls.Gauge(parent=self.leftCont,
                                      value=0.0,
                                      color=(0.0, 0.31, 0.4, 1.0),
                                      backgroundColor=(0.1, 0.1, 0.1, 1.0),
                                      align=uiconst.TOBOTTOM,
                                      gaugeHeight=15,
                                      padding=2,
                                      opacity=0.0)
     self.progressGauge.GetHint = self.GetProgressGaugeHint
     self.iconCont = uiprimitives.Container(name='iconCont',
                                            parent=self.leftCont,
                                            align=uiconst.TOPRIGHT,
                                            pos=(10, 4, 300, 20))
     self.ConstructIcons()
     self.checkboxSprite = uiprimitives.Sprite(name='checkboxSprite',
                                               parent=self.rightCont,
                                               align=uiconst.CENTERLEFT,
                                               pos=(15, 0, 16, 16))
     uicontrols.EveLabelLarge(parent=self.rightCont,
                              text=localization.formatters.FormatNumeric(
                                  self.upperLimit, useGrouping=True),
                              align=uiconst.CENTERLEFT,
                              left=50)
     self.SetLPAmount(self.lpAmount, init=True)
コード例 #14
0
 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)
コード例 #15
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.scope = 'all'
     self.sr.browser = uicontrols.Edit(parent=self.sr.main, padding=const.defaultPadding, readonly=1)
     self.sr.browser.HideBackground(True)
     self.sr.browser.AllowResizeUpdates(0)
     self.sr.browser.sr.window = self
     m = uicls.UtilMenu(menuAlign=uiconst.TOPRIGHT, parent=self.sr.topParent, align=uiconst.TOPRIGHT, left=const.defaultPadding, top=18, GetUtilMenu=self.SettingMenu, texturePath='res:/UI/Texture/Icons/73_16_50.png')
     self.nextFunc = attributes.nextFunc
     self.backFunc = attributes.backFunc
     self.onStartScalingWidth = None
     self.onStartScalingHeight = None
     self.constrainScreen = True
     if self.sr.stack is not None:
         self.sr.stack.RemoveWnd(self, 0, 0)
     if sm.GetService('tutorial').IsTutorialWindowUnkillable():
         self.MakeUnKillable()
         repairSysSkill = sm.GetService('skills').HasSkill(const.typeRepairSystems)
         shieldOpsSkill = sm.GetService('skills').HasSkill(const.typeShieldOperations)
         if repairSysSkill or shieldOpsSkill:
             self.MakeKillable()
     Sprite(parent=self.sr.topParent, name='mainicon', pos=(0, 2, 64, 64), texturePath='res:/UI/Texture/Icons/74_64_13.png')
     self.HideHeader()
     self.MakeUnstackable()
     self.SetMinSize([350, 220])
     self.imgpar = uiprimitives.Container(name='imgpar', parent=self.sr.main, align=uiconst.TOLEFT, width=64, idx=4, state=uiconst.UI_HIDDEN, clipChildren=1)
     imgparclipper = uiprimitives.Container(name='imgparclipper', parent=self.imgpar, align=uiconst.TOALL, left=5, top=5, width=5, height=5, clipChildren=1)
     self.img = uiprimitives.Sprite(parent=imgparclipper, align=uiconst.RELATIVE, left=1, top=1)
     self.bottomCont = uiprimitives.Container(name='bottom', parent=self.sr.maincontainer, align=uiconst.TOBOTTOM, height=32, idx=0)
     self.backBtn = Button(parent=self.bottomCont, label=localization.GetByLabel('UI/Commands/Back'), name='tutorialBackBtn', func=self.backFunc, align=uiconst.TOLEFT, padding=(8, 0, 0, 6))
     self.nextBtn = Button(parent=self.bottomCont, label=localization.GetByLabel('UI/Commands/Next'), name='tutorialNextBtn', func=self.nextFunc, align=uiconst.TORIGHT, padding=(0, 0, 8, 6), btn_default=1)
     self.Confirm = self.nextFunc
     self.sr.text = uicontrols.EveLabelMedium(text='', parent=self.bottomCont, state=uiconst.UI_DISABLED, align=uiconst.CENTER)
     top = self.tTop = uiprimitives.Container(name='tTop', parent=self.sr.topParent, align=uiconst.TOALL, padding=(64, 0, 24, 0), idx=0)
     self.captionText = uicontrols.EveLabelLarge(text='', parent=top, align=uiconst.TOTOP, top=10, state=uiconst.UI_DISABLED)
     self.captionText.OnSizeChanged = self.CheckTopHeight
     self.subcaption = uicontrols.Label(text='', parent=top, align=uiconst.TOTOP, state=uiconst.UI_DISABLED, fontsize=18, color=TutorialColor.HINT_FRAME)
     self.sr.browser.AllowResizeUpdates(1)
     self.SetParent(uicore.layer.abovemain)
     uicore.animations.SpSwoopBlink(self.blinkFill, rotation=math.pi - 0.5, duration=3.0, loops=TutorialConstants.NUM_BLINKS)
     uicore.animations.SpSwoopBlink(self.blinkBorder, rotation=math.pi - 0.5, duration=3.0, loops=TutorialConstants.NUM_BLINKS)
コード例 #16
0
 def ConstructLayout(self):
     allianceName = cfg.eveowners.Get(self.allianceID).name
     allianceInfoCont = uiprimitives.Container(name='allianceInfo', parent=self.sr.main, align=uiconst.TOTOP, height=68, padding=const.defaultPadding)
     allianceLogoCont = uiprimitives.Container(name='allianceLogo', parent=allianceInfoCont, align=uiconst.TOLEFT, width=68)
     allianceTextCont = uiprimitives.Container(name='allianceName', parent=allianceInfoCont, align=uiconst.TOALL)
     applicationCont = uiprimitives.Container(name='allianceInfo', parent=self.sr.main, align=uiconst.TOALL, padding=(const.defaultPadding,
      0,
      const.defaultPadding,
      const.defaultPadding))
     uiutil.GetOwnerLogo(allianceLogoCont, self.allianceID, size=64, noServerCall=True)
     allianceText = localization.GetByLabel('UI/Corporations/BaseCorporationUI/ApplyForMembership', corporation=allianceName)
     allianceNameLabel = uicontrols.EveLabelLarge(parent=allianceTextCont, text=allianceText, top=12, align=uiconst.TOPLEFT, width=270)
     alliance = sm.GetService('alliance').GetAlliance(self.allianceID)
     corp = sm.GetService('corp').GetCorporation(alliance.executorCorpID)
     myCorpName = cfg.eveowners.Get(session.corpid).ownerName
     stdText = localization.GetByLabel('UI/Corporations/BaseCorporationUI/AskJoinAlliance', ceo='-----', ceoID=corp.ceoID, mycorp=myCorpName, alliancename=allianceName, sender=session.charid, mycorpname=myCorpName)
     editText = localization.GetByLabel('UI/Corporations/BaseCorporationUI/CorporationApplicationText')
     editLabel = uicontrols.EveLabelSmall(parent=applicationCont, text=editText, height=16, align=uiconst.TOTOP)
     self.applicationText = uicls.EditPlainText(setvalue=stdText, parent=applicationCont, align=uiconst.TOTOP, maxLength=1000, height=100)
     appText = localization.GetByLabel('UI/Corporations/BaseCorporationUI/ThisApplicationOverwritesOlderOnes')
     appLabel = uicontrols.EveLabelMedium(parent=applicationCont, text=appText, align=uiconst.TOTOP, top=8)
コード例 #17
0
 def ConstructLayout(self):
     allianceName = cfg.eveowners.Get(self.allianceID).name
     allianceInfoCont = uiprimitives.Container(name='allianceInfo', parent=self.sr.main, align=uiconst.TOTOP, height=68, padding=const.defaultPadding)
     allianceLogoCont = uiprimitives.Container(name='allianceLogo', parent=allianceInfoCont, align=uiconst.TOLEFT, width=68)
     allianceTextCont = uiprimitives.Container(name='allianceName', parent=allianceInfoCont, align=uiconst.TOALL)
     applicationCont = uiprimitives.Container(name='allianceInfo', parent=self.sr.main, align=uiconst.TOALL, padding=(const.defaultPadding,
      0,
      const.defaultPadding,
      const.defaultPadding))
     uiutil.GetOwnerLogo(allianceLogoCont, self.allianceID, size=64, noServerCall=True)
     allianceText = localization.GetByLabel('UI/Corporations/CorpApplications/YourApplicationToJoin', corpName=allianceName)
     allianceNameLabel = uicontrols.EveLabelLarge(parent=allianceTextCont, text=allianceText, top=12, align=uiconst.TOPLEFT, width=270)
     editText = localization.GetByLabel('UI/Corporations/BaseCorporationUI/CorporationApplicationText')
     editLabel = uicontrols.EveLabelSmall(parent=applicationCont, text=editText, height=16, align=uiconst.TOTOP)
     if self.application.applicationText is not None:
         appText = self.application.applicationText
     else:
         appText = ''
     self.applicationText = uicls.EditPlainText(setvalue=appText, parent=applicationCont, align=uiconst.TOTOP, maxLength=1000, height=100, readonly=True)
     status = uicontrols.EveLabelSmall(parent=applicationCont, text=localization.GetByLabel('UI/Corporations/CorporationWindow/Alliances/Applications/Status'), align=uiconst.TOTOP, top=6)
     statusLabel = uicontrols.EveLabelSmallBold(parent=applicationCont, text=_GetApplicationStatusStr(self.application.state), height=12, align=uiconst.TOTOP)
コード例 #18
0
 def ConstructNewFWPlayerHeader(self):
     self.topCont.Flush()
     iconSize = 50
     firstLine = uiprimitives.Container(parent=self.topCont, 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/NonFWPlayerHeader1', 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=self.topCont, align=uiconst.TOTOP_PROP, height=0.6, padLeft=20)
     uiprimitives.Sprite(parent=secondLine, align=uiconst.CENTERLEFT, pos=(0,
      0,
      iconSize,
      iconSize), texturePath='res:/UI/Texture/WindowIcons/dogtags.png')
     enemyID = facwarCommon.GetFactionMainEnemy(self.factionID)
     labelCont = uicontrols.ContainerAutoSize(parent=secondLine, align=uiconst.CENTERLEFT, left=iconSize + 20)
     uicontrols.EveCaptionSmall(parent=labelCont, text=localization.GetByLabel('UI/FactionWarfare/FightForFaction', factionName=cfg.eveowners.Get(self.factionID).name))
     uicontrols.EveLabelMedium(state=uiconst.UI_NORMAL, parent=labelCont, top=25, text=localization.GetByLabel('UI/FactionWarfare/FightForFactionText', url='localsvc:service=facwar&method=ShowRulesOfEngagementTab'))
コード例 #19
0
    def WriteCloneActivationText_thread(self, *args):
        blue.synchro.SleepSim(1000)
        redColor = (0.9, 0.1, 0.1)
        cloneText = localization.GetByLabel('UI/Inflight/ActivatingClone')
        if session.stationid:
            locationName = cfg.evelocations.Get(session.stationid).name
        else:
            locationName = ''
        cloneSubText = localization.GetByLabel(
            'UI/Inflight/ActivatingCloneSubText', locationName=locationName)
        cloneSubTextLabel = uicontrols.EveLabelLarge(
            parent=self.notifyContainer,
            name='cloneSubTextLabel',
            text=cloneSubText,
            align=uiconst.TOPLEFT,
            bold=True)
        cloneText = localization.GetByLabel('UI/Inflight/ActivatingClone')
        cloneActivatingLabel = uicontrols.EveCaptionLarge(
            parent=self.notifyContainer,
            name='cloneActivatingLabel',
            text='',
            align=uiconst.TOPLEFT,
            top=cloneSubTextLabel.top + cloneSubTextLabel.textheight,
            bold=True)
        uicore.animations.BlinkIn(cloneActivatingLabel,
                                  startVal=0.0,
                                  endVal=1.0,
                                  duration=1.0,
                                  loops=uiconst.ANIM_REPEAT,
                                  curveType=uiconst.ANIM_WAVE)
        cloneSubTextLabel.text = ''
        for char in cloneSubText:
            cloneSubTextLabel.text += char
            sm.GetService('audio').SendUIEvent('ui_text_singlechar_play')
            blue.synchro.SleepSim(20)

        for char in cloneText:
            cloneActivatingLabel.text += char
            sm.GetService('audio').SendUIEvent('ui_text_singlechar_play')
            blue.synchro.SleepSim(20)
コード例 #20
0
 def ConstructLayout(self):
     self.acceptRb = None
     self.withdrawRb = None
     corpName = cfg.eveowners.Get(self.corpid).name
     corpInfoCont = uiprimitives.Container(name='corpInfo', parent=self.sr.main, align=uiconst.TOTOP, height=68, padding=const.defaultPadding)
     corpLogoCont = uiprimitives.Container(name='corpLogo', parent=corpInfoCont, align=uiconst.TOLEFT, width=68)
     corpTextCont = uiprimitives.Container(name='corpName', parent=corpInfoCont, align=uiconst.TOALL)
     controlCont = uiprimitives.Container(name='buttons', parent=self.sr.main, align=uiconst.TOBOTTOM, padding=(const.defaultPadding,
      0,
      const.defaultPadding,
      const.defaultPadding))
     controlContHeight = 0
     applicationCont = uiprimitives.Container(name='applicationCont', parent=self.sr.main, align=uiconst.TOALL, padding=(const.defaultPadding,
      0,
      const.defaultPadding,
      const.defaultPadding))
     uiutil.GetOwnerLogo(corpLogoCont, self.corpid, size=64, noServerCall=True)
     corpText = localization.GetByLabel('UI/Corporations/CorpApplications/YourApplicationToJoin', corpName=corpName)
     corpNameLabel = uicontrols.EveLabelLarge(parent=corpTextCont, text=corpText, top=12, align=uiconst.TOPLEFT, width=270)
     if self.status == const.crpApplicationAppliedByCharacter:
         statusText = localization.GetByLabel('UI/Corporations/CorpApplications/ApplicationNotProcessed')
         statusLabel = uicontrols.EveLabelSmall(parent=applicationCont, text=statusText, align=uiconst.TOTOP, padBottom=const.defaultPadding)
     else:
         statusText = statusLabel = ''
     editText = localization.GetByLabel('UI/Corporations/BaseCorporationUI/CorporationApplicationText')
     editLabel = uicontrols.EveLabelSmall(parent=applicationCont, text=editText, align=uiconst.TOTOP)
     if self.application.applicationText is not None:
         appText = self.application.applicationText
     else:
         appText = ''
     self.applicationText = uicls.EditPlainText(setvalue=appText, parent=applicationCont, maxLength=1000, readonly=True)
     if self.status in const.crpApplicationActiveStatuses:
         isWithdrawChecked = True
         if self.status in (const.crpApplicationAcceptedByCorporation, const.crpApplicationInvitedByCorporation):
             isWithdrawChecked = False
             self.acceptRb = uicontrols.Checkbox(text=localization.GetByLabel('UI/Corporations/CorpApplications/AcceptApplication'), parent=controlCont, configName='accept', retval=1, checked=True, groupname='stateGroup', align=uiconst.TOBOTTOM)
             controlContHeight += 40
         self.withdrawRb = uicontrols.Checkbox(text=localization.GetByLabel('UI/Corporations/CorpApplications/WithdrawApplication'), parent=controlCont, configName='accept', retval=3, checked=isWithdrawChecked, groupname='stateGroup', align=uiconst.TOBOTTOM)
         controlContHeight += 20
     controlCont.height = controlContHeight
コード例 #21
0
    def Execute(self, banID, numBans, curBans, deadline, respondToNodeID):
        self.banID = banID
        self.deadline = deadline
        self.respondToNodeID = respondToNodeID
        self.resetButton = uicontrols.Button(
            label='Submit Ban' if numBans > 0 else 'Okay',
            parent=self.sr.main,
            align=uiconst.TOBOTTOM,
            func=self.Submit,
            state=uiconst.UI_NORMAL,
            padding=5)
        uicontrols.EveLabelLarge(text="Let's ban some ships!"
                                 if numBans > 0 else "Here's the bans:",
                                 parent=self.sr.main,
                                 align=uiconst.TOTOP,
                                 top=10,
                                 padding=5,
                                 color=(0.5, 0.5, 1, 1))
        uicontrols.Label(text='You have banned:',
                         parent=self.sr.main,
                         align=uiconst.TOTOP,
                         top=5,
                         padding=5)
        uicontrols.Label(text='<br>'.join(
            [cfg.invtypes[typeID].typeName for typeID in curBans[0]]),
                         padding=5,
                         parent=self.sr.main,
                         align=uiconst.TOTOP)
        uicontrols.Label(text='They have banned:',
                         parent=self.sr.main,
                         align=uiconst.TOTOP,
                         top=5,
                         padding=5)
        uicontrols.Label(text='<br>'.join(
            [cfg.invtypes[typeID].typeName for typeID in curBans[1]]),
                         padding=5,
                         parent=self.sr.main,
                         align=uiconst.TOTOP)
        banOptions = [('Pass', -1)] + sorted(
            [(x.typeName, x.typeID) for x in cfg.invtypes
             if (x.typeID in shipTypes or x.groupID in shipGroups)
             and not x.typeName.startswith('[no messageID:')
             and x.typeID not in skinEquivalents])
        self.banChoices = []
        for banNum in xrange(numBans):
            self.banChoices.append(
                uicontrols.Combo(label='Ban: ',
                                 parent=self.sr.main,
                                 options=banOptions,
                                 top=20,
                                 padding=5,
                                 align=uiconst.TOTOP))

        if numBans > 0:
            banCont = uiprimitives.Container(name='banTimer',
                                             parent=self.sr.main,
                                             align=uiconst.TOTOP,
                                             height=50)
            self.countdownText = uicontrols.Label(parent=banCont,
                                                  align=uiconst.CENTER,
                                                  fontsize=36,
                                                  color=(1, 0, 0, 1))
            self.countdownTimer = base.AutoTimer(100, self.UpdateTimer)
        uicore.registry.SetFocus(self)
        self.MakeUnKillable()
コード例 #22
0
 def ConstructLayout(self):
     topCont = uiprimitives.Container(name='topCont', parent=self.sr.main, align=uiconst.TOTOP, height=138, padding=defaultPadding)
     uiprimitives.Line(parent=topCont, align=uiconst.TOBOTTOM)
     topLeftCont = uiprimitives.Container(name='topLeftCont', parent=topCont, align=uiconst.TOLEFT, width=260, padLeft=defaultPadding)
     topRightCont = uiprimitives.Container(name='topRightCont', parent=topCont, align=uiconst.TOALL)
     self.guyCont = uiprimitives.Container(name='guyCont', parent=topLeftCont, align=uiconst.TOLEFT, width=128)
     self.shipCont = uiprimitives.Container(name='shipCont', parent=topLeftCont, align=uiconst.TOLEFT, width=128)
     self.infoCont = uiprimitives.Container(name='infoCont', parent=topRightCont, align=uiconst.TOALL, padLeft=6, padRight=4, clipChildren=True)
     victimCont = uiprimitives.Container(name='victimCont', parent=self.infoCont, align=uiconst.TOTOP, height=68)
     victimNameCont = uiprimitives.Container(name='victimNameCont', parent=victimCont, align=uiconst.TOTOP, height=24, clipChildren=True)
     victimCorpCont = uiprimitives.Container(name='victimCorpCont', parent=victimCont, align=uiconst.TOALL)
     self.victimCorpLogoCont = uiprimitives.Container(name='victimCorpLogoCont', parent=victimCorpCont, align=uiconst.TOLEFT, width=32)
     self.victimAllianceLogoCont = uiprimitives.Container(name='victimAllianceLogoCont', parent=victimCorpCont, align=uiconst.TOLEFT, width=32)
     victimCorpTextCont = uiprimitives.Container(name='victimCorpTextCont', parent=victimCorpCont, align=uiconst.TOALL, padLeft=defaultPadding)
     shipCont = uiprimitives.Container(name='damageCont', parent=self.infoCont, align=uiconst.TOTOP, height=32)
     dateCont = uiprimitives.Container(name='dateCont', parent=self.infoCont, align=uiconst.TOALL)
     self.victimName = uicontrols.EveCaptionSmall(text='', parent=victimNameCont, name='victimName', state=uiconst.UI_NORMAL)
     self.victimCorpName = uicontrols.EveLabelMedium(text='', parent=victimCorpTextCont, name='victimCorpName', align=uiconst.TOTOP, state=uiconst.UI_NORMAL, top=defaultPadding)
     self.victimAllianceName = uicontrols.EveLabelMedium(text='', parent=victimCorpTextCont, name='victimAllianceName', align=uiconst.TOTOP, state=uiconst.UI_NORMAL)
     self.shipName = uicontrols.EveLabelMedium(text='', parent=shipCont, name='shipName', state=uiconst.UI_NORMAL, autoFadeSides=True)
     self.killDate = uicontrols.EveLabelMedium(text='', parent=dateCont, name='killDate', autoFadeSides=True)
     self.locationName = uicontrols.EveLabelMedium(text='', parent=dateCont, name='locationName', top=14, state=uiconst.UI_NORMAL, autoFadeSides=True)
     infoCont = uiprimitives.Container(name='infoCont', parent=self.sr.main, align=uiconst.TOALL, padding=(defaultPadding,
      0,
      defaultPadding,
      defaultPadding))
     bottomLeftCont = uiprimitives.Container(name='bottomLeftCont', parent=infoCont, align=uiconst.TOLEFT, width=260, padLeft=defaultPadding)
     bottomRightCont = uiprimitives.Container(name='bottomRightCont', padLeft=4, parent=infoCont, align=uiconst.TOALL)
     killersCont = uiprimitives.Container(name='killersCont', parent=bottomLeftCont, align=uiconst.TOALL)
     self.killedOnBehalfCont = uiprimitives.Container(name='killedOnBehalfCont', parent=killersCont, align=uiconst.TOTOP, height=90)
     uicontrols.EveLabelLarge(text=localization.GetByLabel('UI/Corporations/Wars/Killmails/KilledOnBehalf'), parent=self.killedOnBehalfCont, align=uiconst.TOTOP)
     self.behalfCont = KilledOnBehalfContainer(name='behalfCont', parent=self.killedOnBehalfCont, align=uiconst.TOTOP)
     self.killedOnBehalfCont.display = False
     self.involvedParties = uicontrols.EveLabelLarge(text='', parent=killersCont, name='involvedParties', align=uiconst.TOTOP)
     self.damageTaken = uicontrols.EveLabelMedium(text='', parent=killersCont, name='damageTaken', align=uiconst.TOTOP, color=(1.0, 0.0, 0.0))
     finalBlowCont = uiprimitives.Container(name='finalBlowCont', parent=killersCont, align=uiconst.TOTOP, height=84, top=8)
     uicontrols.EveLabelMedium(text=localization.GetByLabel('UI/Corporations/Wars/Killmails/FinalBlow'), parent=finalBlowCont, align=uiconst.TOTOP)
     self.finalBlowCont = KillerContainer(name='topKiller', parent=finalBlowCont, align=uiconst.TOTOP)
     topDamageCont = uiprimitives.Container(name='topDamageCont', parent=killersCont, align=uiconst.TOTOP, height=94, top=12)
     uicontrols.EveLabelMedium(text=localization.GetByLabel('UI/Corporations/Wars/Killmails/TopDamage'), parent=topDamageCont, align=uiconst.TOTOP)
     self.topDamageCont = KillerContainer(name='topDamageCont', parent=topDamageCont, align=uiconst.TOTOP)
     self.killersScrollLine = uiprimitives.Line(parent=killersCont, align=uiconst.TOTOP, padBottom=6)
     self.killersScroll = uicls.ScrollContainer(name='killersScroll', parent=killersCont, align=uiconst.TOALL, alignMode=uiconst.TOTOP)
     self.loadingWheel = uicls.LoadingWheel(parent=killersCont, align=uiconst.CENTER, state=uiconst.UI_DISABLED, idx=0, top=50)
     self.loadingWheel.display = False
     itemsCont = uiprimitives.Container(name='itemsCont', parent=bottomRightCont, align=uiconst.TOALL)
     topItemsCont = uiprimitives.Container(name='topItemsCont', parent=itemsCont, align=uiconst.TOTOP, height=16, padBottom=defaultPadding)
     self.savefittingBtn = uicontrols.Button(label=localization.GetByLabel('UI/Corporations/Wars/Killmails/SaveFitting'), parent=topItemsCont, align=uiconst.TOPRIGHT, func=self.SaveFitting)
     uicontrols.EveLabelLarge(text=localization.GetByLabel('UI/Corporations/Wars/Killmails/FittingAndContent'), parent=topItemsCont, name='fittingLabel', align=uiconst.TOPLEFT)
     bottomItemsCont = uicontrols.ContainerAutoSize(name='bottomItemsCont', parent=itemsCont, align=uiconst.TOBOTTOM)
     allItemsCont = uiprimitives.Container(name='allItemsCont', parent=itemsCont, align=uiconst.TOALL)
     self.itemsScroll = uicontrols.Scroll(name='itemsScroll', parent=allItemsCont)
     totalLossCont = uiprimitives.Container(name='totalLossCont', parent=bottomItemsCont, align=uiconst.TOTOP, height=24)
     uicontrols.EveLabelLarge(text=localization.GetByLabel('UI/Corporations/Wars/Killmails/TotalWorth'), parent=totalLossCont, name='totalWorth', align=uiconst.TOPLEFT, top=2)
     self.totalWorthLabel = uicontrols.EveLabelLarge(text='', parent=totalLossCont, name='totalWorthLabel', align=uiconst.TOPRIGHT, top=2)
     self.totalPayoutCont = uicontrols.ContainerAutoSize(name='totalPayoutCont', parent=bottomItemsCont, align=uiconst.TOTOP)
     self.pendCont = uiprimitives.Container(name='pendCont', parent=self.totalPayoutCont, align=uiconst.TOTOP, height=14)
     uicontrols.EveLabelSmall(text=localization.GetByLabel('UI/Corporations/Wars/Killmails/PendInsurance'), parent=self.pendCont, name='totalLoss', align=uiconst.BOTTOMLEFT)
     self.pendLabel = uicontrols.EveLabelSmall(text='', parent=self.pendCont, name='pendLabel', align=uiconst.BOTTOMRIGHT, color=(1.0, 0.0, 0.0))
     self.lpCont = uiprimitives.Container(name='lpCont', parent=self.totalPayoutCont, align=uiconst.TOTOP, height=14)
     uicontrols.EveLabelSmall(text=localization.GetByLabel('UI/Corporations/Wars/Killmails/LPPaidOut'), parent=self.lpCont, name='totalLP', align=uiconst.BOTTOMLEFT)
     self.totalLPLabel = uicontrols.EveLabelSmall(text='', parent=self.lpCont, name='totalLPLabel', align=uiconst.BOTTOMRIGHT, color=(0.0, 1.0, 0.0))
     self.lpCont.display = False
     self.bountyCont = uiprimitives.Container(name='bountyCont', parent=self.totalPayoutCont, align=uiconst.TOTOP, height=14, display=False)
     uicontrols.EveLabelSmall(text=localization.GetByLabel('UI/Corporations/Wars/Killmails/BountyPaidOut'), parent=self.bountyCont, name='totalBounty', align=uiconst.BOTTOMLEFT)
     self.totalBountyLabel = uicontrols.EveLabelSmall(text='', parent=self.bountyCont, name='totalBountyLabel', align=uiconst.BOTTOMRIGHT, color=(0.0, 1.0, 0.0))
     self.bountyCont.display = False
コード例 #23
0
    def ConstructLayout(self):
        svc = sm.GetService('allianceTournamentSvc')
        tourneyMgr = sm.RemoteSvc('tourneyMgr')
        tournaments, tourneySystems = tourneyMgr.GetTourneySetup()
        locations = []
        for systemID, (redBeacons, blueBeacons, combatBeacons, warpBubbles) in tourneySystems.iteritems():
            locations.append(systemID)
            locations.extend(redBeacons)
            locations.extend(blueBeacons)

        cfg.evelocations.Prime(locations)
        self.beaconOptions = {}
        for systemID, (redBeacons, blueBeacons, combatBeacons, warpBubbles) in tourneySystems.iteritems():
            self.beaconOptions[systemID] = ([ (cfg.evelocations.Get(id).locationName, idx) for idx, id in enumerate(redBeacons) ], [ (cfg.evelocations.Get(id).locationName, idx) for idx, id in enumerate(blueBeacons) ])

        self.resetButton = uicontrols.Button(label='Reset Match', parent=self.sr.main, align=uiconst.TOBOTTOM, func=self.ResetMatch, state=uiconst.UI_HIDDEN, padding=(5, 5, 5, 5))
        tourneyOptions = [ (name, tourneyID) for tourneyID, name in tournaments.iteritems() ]
        systemOptions = [ (cfg.evelocations.Get(id).locationName, id) for id in tourneySystems ]
        self.allianceSelections = uiprimitives.Container(name='aliSelect', parent=self.sr.main, align=uiconst.TOTOP, height=190)
        self.startButton = uicontrols.Button(label='Start Match', parent=self.allianceSelections, align=uiconst.TOBOTTOM, pos=(0, 0, 100, 28), padding=(5, 5, 5, 5), func=self.StartMatch)
        self.solSystemSelect = uicontrols.Combo(label='Select Solar System', parent=self.allianceSelections, align=uiconst.TOBOTTOM, options=systemOptions, pos=(0, 0, 100, 40), padding=(5, 15, 5, 5))
        self.sr.pointsSelect = uicontrols.Combo(label='PointsAllowed', parent=self.allianceSelections, align=uiconst.TOBOTTOM, name='pointSel', options=(('100', 100),), select='100', padding=(5, 15, 5, 5))

        def TourneySelChanged(combo, tName, tourneyID):
            if tourneyID is None:
                self.sr.matchSelect.options = []
            else:
                possibleMatches = tourneyMgr.GetPotentialMatches(tourneyID)
                self.sr.matchSelect.LoadOptions([ ('%s vs %s' % (redTeam, blueTeam), (seriesID, redTeam, blueTeam)) for seriesID, redTeam, blueTeam in possibleMatches ])

        self.sr.tourneySelect = uicontrols.Combo(label='Select Tournament:', parent=self.allianceSelections, align=uiconst.TOTOP, padding=(5, 15, 5, 5), name='tourneySel', options=[('Select Tourney', None)] + tourneyOptions, callback=TourneySelChanged)
        self.sr.matchSelect = uicontrols.Combo(label='Select Match:', parent=self.allianceSelections, align=uiconst.TOTOP, padding=(5, 15, 5, 5), name='matchSel', options=[('Pick Tourney First', None)])
        banOptions = sorted([ (x.typeName, x.typeID) for x in cfg.invtypes if not x.typeName.startswith('[no messageID:') and (x.typeID in shipPointsTypes or x.groupID in shipPointsGroups) and x.typeID not in skinEquivalents ])
        self.banningScreen = uiprimitives.Container(name='banningScreen', parent=self.sr.main, state=uiconst.UI_HIDDEN, align=uiconst.TOALL, left=5, width=5)
        self.redTeamBanningHeader = uicontrols.EveLabelLarge(text='RedTeam', parent=self.banningScreen, align=uiconst.TOTOP, top=10, color=(1, 0.3, 0.3, 1))
        self.redBanBox = uiprimitives.Container(name='redBanBox', parent=self.banningScreen, align=uiconst.TOTOP, height=70, top=4)
        self.redBans = {}
        redBanChoice = uicontrols.Combo(label='Red Team Ban:', parent=self.banningScreen, options=banOptions, top=20, align=uiconst.TOTOP)
        uicontrols.Button(label="Perform Red's Ban", parent=self.banningScreen, func=self.SendBan, args=(0, redBanChoice), align=uiconst.TOTOP)
        self.blueTeamBanningHeader = uicontrols.EveLabelLarge(text='BlueTeam', parent=self.banningScreen, align=uiconst.TOTOP, top=30, color=(0.5, 0.5, 1, 1))
        self.blueBanBox = uiprimitives.Container(name='blueBanBox', parent=self.banningScreen, align=uiconst.TOTOP, height=70, top=4)
        self.blueBans = {}
        blueBanChoice = uicontrols.Combo(label='Blue Team Ban:', parent=self.banningScreen, options=banOptions, top=20, align=uiconst.TOTOP)
        uicontrols.Button(label="Perform Blue's Ban", parent=self.banningScreen, func=self.SendBan, args=(1, blueBanChoice), align=uiconst.TOTOP)
        autoBanBox = uiprimitives.Container(name='autoBanBox', parent=self.banningScreen, align=uiconst.TOTOP, height=115, top=10)
        autoBanOverrides = uiprimitives.Container(name='autoBanOverrides', parent=autoBanBox, align=uiconst.TOLEFT, width=150)
        autoBanOutput = uiprimitives.Container(name='autoBanOutput', parent=autoBanBox)
        autoBanRedCapt = uiprimitives.Container(name='redCapt', parent=autoBanOverrides, align=uiconst.TOTOP, top=4, height=44)
        uicontrols.Label(text='Red Captain:', parent=autoBanRedCapt, top=4)
        self.autoBanRedCharName = uicontrols.Label(text='?', parent=autoBanRedCapt, top=4, left=100)
        self.autoBanRedCharID = uicontrols.SinglelineEdit(name='redCaptID', setvalue='', OnFocusLost=self.LookupBanChars, align=uiconst.TOBOTTOM, parent=autoBanRedCapt, top=4)
        autoBanBlueCapt = uiprimitives.Container(name='blueCapt', parent=autoBanOverrides, align=uiconst.TOTOP, top=4, height=44)
        uicontrols.Label(text='Blue Captain:', parent=autoBanBlueCapt, top=4)
        self.autoBanBlueCharName = uicontrols.Label(text='?', parent=autoBanBlueCapt, top=4, left=100)
        self.autoBanBlueCharID = uicontrols.SinglelineEdit(name='blueCaptID', setvalue='', OnFocusLost=self.LookupBanChars, align=uiconst.TOBOTTOM, parent=autoBanBlueCapt, top=4)
        uicontrols.Button(label='Initiate Autobans', parent=autoBanOverrides, func=self.Autobans, align=uiconst.TOTOP, top=4)
        uicontrols.Label(text='Auto Ban Output:', parent=autoBanOutput, align=uiconst.TOTOP, top=4, padLeft=125)
        self.autoBanText = uicontrols.Label(text='', parent=autoBanOutput, align=uiconst.TOTOP, height=100, top=4, padLeft=125)
        uicontrols.Button(label='Finalize Bans', parent=self.banningScreen, func=self.FinalizeBans, top=40, align=uiconst.TOTOP)
        self.shipPilotCheck = uiprimitives.Container(name='shipPilotCheck', parent=self.sr.main, state=uiconst.UI_HIDDEN, align=uiconst.TOALL)
        uicontrols.Button(label="LET'S DO THIS", parent=self.shipPilotCheck, align=uiconst.TORIGHT, width=90, padLeft=5, padRight=5, func=self.CompleteShipPilotCheck)
        boxes = uiprimitives.Container(name='boxContainer', parent=self.shipPilotCheck, align=uiconst.TOALL)
        blueTeamBox = uiprimitives.Container(name='blueTeamBox', parent=boxes, align=uiconst.TOTOP_PROP, height=0.5)
        redTeamBox = uiprimitives.Container(name='redTeamBox', parent=boxes, align=uiconst.TOTOP_PROP, height=0.5)
        blueButtons = uiprimitives.Container(name='shipPilotCheckButtons', parent=blueTeamBox, align=uiconst.TOBOTTOM, height=25, padding=(4, 15, 4, 4))
        redButtons = uiprimitives.Container(name='shipPilotCheckButtons', parent=redTeamBox, align=uiconst.TOBOTTOM, height=25, padding=(4, 15, 4, 4))
        uicontrols.Button(label='Refresh Info', parent=blueButtons, align=uiconst.TOLEFT, func=self.RefreshShipPilotCheck, args=(1,))
        self.blueLockBtn = uicontrols.Button(label='Lock Member List', parent=blueButtons, align=uiconst.TOLEFT, func=self.LockMemberList, args=(1,))
        self.blueUnlockBtn = uicontrols.Button(label='Unlock Member List', parent=blueButtons, align=uiconst.TOLEFT, func=self.UnlockMemberList, args=(1,), state=uiconst.UI_HIDDEN)
        self.blueTeleportBtn = uicontrols.Button(label='Teleport Players', parent=blueButtons, align=uiconst.TOLEFT, func=self.TeleportPlayers, args=(1,), state=uiconst.UI_HIDDEN)
        self.blueTeleportBeacon = uicontrols.Combo(label='Beacon select', parent=blueButtons, align=uiconst.TOLEFT, state=uiconst.UI_HIDDEN, options=[])
        self.blueOverFleetBtn = uicontrols.Button(label='Override FleetID', parent=blueButtons, align=uiconst.TOLEFT, func=self.OverrideFleetID, args=(1,))
        self.blueAddPlayerBtn = uicontrols.Button(label='Add Player', parent=blueButtons, align=uiconst.TOLEFT, func=self.AddPlayer, args=(1,), state=uiconst.UI_HIDDEN)
        uicontrols.Button(label='Refresh Info', parent=redButtons, align=uiconst.TOLEFT, func=self.RefreshShipPilotCheck, args=(0,))
        self.redLockBtn = uicontrols.Button(label='Lock Member List', parent=redButtons, align=uiconst.TOLEFT, func=self.LockMemberList, args=(0,))
        self.redUnlockBtn = uicontrols.Button(label='Unlock Member List', parent=redButtons, align=uiconst.TOLEFT, func=self.UnlockMemberList, args=(0,), state=uiconst.UI_HIDDEN)
        self.redTeleportBtn = uicontrols.Button(label='Teleport Players', parent=redButtons, align=uiconst.TOLEFT, func=self.TeleportPlayers, args=(0,), state=uiconst.UI_HIDDEN)
        self.redTeleportBeacon = uicontrols.Combo(label='Beacon select', parent=redButtons, align=uiconst.TOLEFT, state=uiconst.UI_HIDDEN, options=[])
        self.redOverFleetBtn = uicontrols.Button(label='Override FleetID', parent=redButtons, align=uiconst.TOLEFT, func=self.OverrideFleetID, args=(0,))
        self.redAddPlayerBtn = uicontrols.Button(label='Add Player', parent=redButtons, align=uiconst.TOLEFT, func=self.AddPlayer, args=(0,), state=uiconst.UI_HIDDEN)
        self.shipcheckBlueTeamLabel = uicontrols.Label(text='Blue Team', parent=blueTeamBox, color=(0.5, 0.5, 1, 1), align=uiconst.TOTOP)
        self.shipcheckRedTeamLabel = uicontrols.Label(text='Red Team', parent=redTeamBox, color=(1, 0.3, 0.3, 1), align=uiconst.TOTOP)
        self.shipcheckRedScroll = uicontrols.Scroll(parent=redTeamBox, id='atRedTeamScroll')
        self.shipcheckBlueScroll = uicontrols.Scroll(parent=blueTeamBox, id='atBlueTeamScroll')
        self.pregameList = uiprimitives.Container(name='pregameList', parent=self.sr.main, state=uiconst.UI_HIDDEN, align=uiconst.TOALL)
        pregameRangeContainer = uiprimitives.Container(name='rangeCont', parent=self.pregameList, align=uiconst.TORIGHT, width=200)
        for idx in xrange(26):
            label = uicontrols.Label(text='', parent=pregameRangeContainer, align=uiconst.TOTOP, padTop=5, maxLines=1)
            setattr(self, 'pregameDistance%d' % (idx,), label)

        lockCont = uiprimitives.Container(name='locks', parent=self.pregameList, align=uiconst.TOBOTTOM, height=50)
        self.pregameLockStatus = uicontrols.EveLabelLarge(text="Player locking: <color='green'>Allowed</color>", parent=lockCont, align=uiconst.TOLEFT_PROP, width=0.75, padTop=10)
        tempContainer = uiprimitives.Container(parent=lockCont, align=uiconst.TORIGHT_PROP, width=0.2)
        uicontrols.Button(label='Toggle Locking', parent=tempContainer, func=self.ToggleLocks, align=uiconst.TOLEFT, padTop=5, padBottom=5)
        warpCont = uiprimitives.Container(name='warps', parent=self.pregameList, align=uiconst.TOBOTTOM, height=50)
        self.pregameWarpStatus = uicontrols.EveLabelLarge(text="Player warping: <color='red'>Disallowed</color>", parent=warpCont, align=uiconst.TOLEFT_PROP, width=0.75, padTop=10)
        tempContainer = uiprimitives.Container(parent=warpCont, align=uiconst.TORIGHT_PROP, width=0.2)
        uicontrols.Button(label='Toggle Warping', parent=tempContainer, func=self.ToggleWarping, align=uiconst.TOLEFT, padTop=5, padBottom=5)
        moveCont = uiprimitives.Container(name='move', parent=self.pregameList, align=uiconst.TOBOTTOM, height=50)
        self.pregameMoveStatus = uicontrols.EveLabelLarge(text="Player movement: <color='red'>Disallowed</color>", parent=moveCont, align=uiconst.TOLEFT_PROP, width=0.75, padTop=10)
        tempContainer = uiprimitives.Container(parent=moveCont, align=uiconst.TORIGHT_PROP, width=0.2)
        uicontrols.Button(label='Toggle Movement', parent=tempContainer, func=self.ToggleMovement, align=uiconst.TOLEFT, padTop=5, padBottom=5)
        stepOne = uiprimitives.Container(name='stepOne', parent=self.pregameList, align=uiconst.TOTOP, height=50)
        self.pregameStepOneText = uicontrols.EveLabelLarge(text="Step 1 - Let them warp, don't let them lock", parent=stepOne, align=uiconst.TOLEFT_PROP, width=0.75, padTop=10)
        tempContainer = uiprimitives.Container(parent=stepOne, align=uiconst.TORIGHT_PROP, width=0.2)
        uicontrols.Button(label='Do Step 1', parent=tempContainer, func=self.PreGameStepOne, align=uiconst.TOLEFT, padTop=5, padBottom=5)
        stepThree = uiprimitives.Container(name='stepThree', parent=self.pregameList, align=uiconst.TOTOP, height=50)
        self.pregameStepThreeText = uicontrols.EveLabelLarge(text='Step 2 - Lock warping again', parent=stepThree, align=uiconst.TOLEFT_PROP, width=0.75, padTop=10)
        tempContainer = uiprimitives.Container(parent=stepThree, align=uiconst.TORIGHT_PROP, width=0.2)
        uicontrols.Button(label='Do Step 2', parent=tempContainer, func=self.PreGameStepThree, align=uiconst.TOLEFT, padTop=5, padBottom=5)
        stepFour = uiprimitives.Container(name='stepFour', parent=self.pregameList, align=uiconst.TOTOP, height=50)
        self.pregameStepFourText = uicontrols.EveLabelLarge(text='Step 3 - Start Countdown', parent=stepFour, align=uiconst.TOLEFT_PROP, width=0.75, padTop=10)
        tempContainer = uiprimitives.Container(parent=stepFour, align=uiconst.TORIGHT_PROP, width=0.2)
        uicontrols.Button(label='Do Step 3', parent=tempContainer, func=self.PreGameStepFour, align=uiconst.TOLEFT, padTop=5, padBottom=5)
        self.countdownCont = uiprimitives.Container(name='Countdown', parent=self.pregameList, align=uiconst.TOALL, state=uiconst.UI_HIDDEN)
        self.countdownText = uicontrols.Label(parent=self.countdownCont, align=uiconst.CENTERTOP, fontsize=48, color=(1, 0, 0, 1))
        self.countdownAbort = uicontrols.Button(label='Abort!', parent=self.countdownCont, align=uiconst.TOALL, func=self.AbortCountdown, padTop=65, padBottom=28)
        self.countdownAbort.width = self.countdownAbort.height = 0
        self.countdownAbort.sr.label.fontsize = 32
        self.rangeCheck = uiprimitives.Container(name='range check', parent=self.sr.main, state=uiconst.UI_HIDDEN, align=uiconst.TOALL)
        uicontrols.Label(text='Center Item ID', parent=self.rangeCheck, left=const.defaultPadding, top=const.defaultPadding, fontsize=12)
        uicontrols.Label(text='Arena Radius km', parent=self.rangeCheck, left=const.defaultPadding, top=const.defaultPadding + 20, fontsize=12)
        self.centerItemIDEdit = uicontrols.SinglelineEdit(name='centerItemIDEdit', setvalue=str(session.shipid), parent=self.rangeCheck, left=100, width=120, top=const.defaultPadding)
        self.arenaRadiusEdit = uicontrols.SinglelineEdit(name='arenaRadiusEdit', setvalue=self.default_arenaRadius, parent=self.rangeCheck, left=100, top=const.defaultPadding + 20, ints=(1, 250))
        uicontrols.Button(label='Match Completed', parent=self.rangeCheck, left=300, top=const.defaultPadding + 20, func=self.MatchCompleted)
        startButtonText = 'Stop' if svc.isCompetitorsTrackingActive else 'Start'
        self.startButton = uicontrols.Button(label=startButtonText, parent=self.rangeCheck, left=const.defaultPadding, top=const.defaultPadding + 40)
        self.startButton.OnClick = self.OnToggleStart
        self.scroll = uicontrols.Scroll(name='competitorsList', parent=self.rangeCheck, align=uiconst.TOALL, top=70)
        self.postgameList = uiprimitives.Container(name='postgameList', parent=self.sr.main, state=uiconst.UI_HIDDEN, align=uiconst.TOALL)
        stepOne = uiprimitives.Container(name='stepOne', parent=self.postgameList, align=uiconst.TOTOP, height=50)
        self.postgameStepOneText = uicontrols.EveLabelLarge(text='Step 1 - Send everyone back home', parent=stepOne, align=uiconst.TOLEFT_PROP, width=0.75, padTop=10)
        tempContainer = uiprimitives.Container(parent=stepOne, align=uiconst.TORIGHT_PROP, width=0.2)
        uicontrols.Button(label='Do Step 1', parent=tempContainer, func=self.PostGameStepOne, align=uiconst.TOLEFT, padTop=5, padBottom=5)
        stepTwo = uiprimitives.Container(name='stepTwo', parent=self.postgameList, align=uiconst.TOTOP, height=50)
        self.postgameStepTwoText = uicontrols.EveLabelLarge(text='Step 2 - Clean up the grid', parent=stepTwo, align=uiconst.TOLEFT_PROP, width=0.75, padTop=10)
        tempContainer = uiprimitives.Container(parent=stepTwo, align=uiconst.TORIGHT_PROP, width=0.2)
        uicontrols.Button(label='Do Step 2', parent=tempContainer, func=self.PostGameStepTwo, align=uiconst.TOLEFT, padTop=5, padBottom=5)
        self.OnCompetitorTrackingStart(svc.competitorsByShipID)
コード例 #24
0
 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)
コード例 #25
0
    def __init__(self, typeID, uiPointer, targetBall):
        self.itemID = targetBall.id
        self.bracket = SpaceObjectUiPointerBracket(
            parent=uicore.layer.bracket, name='SpaceObjectUiPointerBracket')
        self.bracket.trackBall = targetBall
        blue.pyos.synchro.Yield()
        height = 2 * const.defaultPadding + ICON_SIZE
        self.floatingBox = FloatingBox(
            name='SpaceObjectUiPointer.box',
            parent=uicore.layer.abovemain,
            top=(uicore.desktop.height - height) / 2,
            left=(uicore.desktop.width - POINTER_WIDTH) / 2,
            hint=localization.GetByLabel(uiPointer.hint)
            if uiPointer.hint else None,
            state=uiconst.UI_NORMAL,
            itemID=self.itemID)
        self.icon = uicontrols.Icon(
            typeID=typeID,
            parent=self.floatingBox,
            width=ICON_SIZE,
            height=ICON_SIZE,
            ignoreSize=True,
            padding=const.defaultPadding,
            align=uiconst.TOLEFT,
            OnClick=lambda: sm.GetService('info').ShowInfo(typeID=typeID))
        textContainer = uiprimitives.Container(parent=self.floatingBox,
                                               align=uiconst.TOALL)
        self.typeLabel = uicontrols.EveLabelLarge(
            name='typeNameLabel',
            parent=textContainer,
            text='<url=showinfo:%s//%s>%s</url>' %
            (typeID, self.itemID, evetypes.GetName(typeID)),
            top=const.defaultPadding,
            align=uiconst.TOTOP,
            state=uiconst.UI_NORMAL)
        self.messgeLabel = uicontrols.EveLabelSmall(
            name='mesageLabel',
            parent=textContainer,
            text=localization.GetByLabel(uiPointer.message)
            if uiPointer.message else '',
            align=uiconst.TOTOP)
        self.line = uicls.VectorLine(widthFrom=1.2,
                                     widthTo=1.2,
                                     translationFrom=(0, 0),
                                     translationTo=(10, 10),
                                     parent=self.floatingBox,
                                     name='spaceObjectBracketPointer',
                                     left=self.floatingBox.width / 2,
                                     top=self.floatingBox.height / 2,
                                     color=TutorialColor.HINT_FRAME,
                                     align=uiconst.TOPLEFT)
        cs = uicore.uilib.bracketCurveSet
        self.bindings = []
        self.bindings.append(
            trinity.CreateBinding(cs, self.bracket.renderObject, 'displayX',
                                  None, ''))
        self.bindings.append(
            trinity.CreateBinding(cs, self.bracket.renderObject, 'displayY',
                                  None, ''))
        self.bindings.append(
            trinity.CreateBinding(cs, self.floatingBox.renderObject,
                                  'displayX', None, ''))
        self.bindings.append(
            trinity.CreateBinding(cs, self.floatingBox.renderObject,
                                  'displayY', None, ''))
        for binding in self.bindings:
            binding.copyValueCallable = self.Update

        self.lastUpdateTime = blue.os.GetSimTime()
        self.speed = 0.0
コード例 #26
0
    def Execute(self, banID, numBans, curBans, deadline, respondToNodeID,
                shipList):
        self.banID = banID
        self.deadline = deadline
        self.respondToNodeID = respondToNodeID
        self.resetButton = uicontrols.Button(
            label='Submit Ban' if numBans > 0 else 'Okay',
            parent=self.sr.main,
            align=uiconst.TOBOTTOM,
            func=self.Submit,
            state=uiconst.UI_NORMAL,
            padding=5)
        uicontrols.EveLabelLarge(text="Let's ban some ships!"
                                 if numBans > 0 else "Here's the bans:",
                                 parent=self.sr.main,
                                 align=uiconst.TOTOP,
                                 top=10,
                                 padding=5,
                                 color=(0.5, 0.5, 1, 1))
        uicontrols.Label(text='You have banned:',
                         parent=self.sr.main,
                         align=uiconst.TOTOP,
                         top=5,
                         padding=5)
        uicontrols.Label(text='<br>'.join(
            [evetypes.GetName(typeID) for typeID in curBans[0]]),
                         padding=5,
                         parent=self.sr.main,
                         align=uiconst.TOTOP)
        uicontrols.Label(text='They have banned:',
                         parent=self.sr.main,
                         align=uiconst.TOTOP,
                         top=5,
                         padding=5)
        uicontrols.Label(text='<br>'.join(
            [evetypes.GetName(typeID) for typeID in curBans[1]]),
                         padding=5,
                         parent=self.sr.main,
                         align=uiconst.TOTOP)
        ships = []
        for typeID in evetypes.GetTypeIDsByCategory(const.categoryShip):
            if typeID in [tup[1] for tup in shipList]:
                if evetypes.IsPublished(typeID):
                    name = evetypes.GetName(typeID)
                    if not name.startswith('[no messageID:'):
                        ships.append((name, typeID))

        banOptions = [('Pass', -1)] + sorted(ships)
        self.banChoices = []
        for banNum in xrange(numBans):
            self.banChoices.append(
                uicontrols.Combo(label='Ban: ',
                                 parent=self.sr.main,
                                 options=banOptions,
                                 top=20,
                                 padding=5,
                                 align=uiconst.TOTOP))

        if numBans > 0:
            banCont = uiprimitives.Container(name='banTimer',
                                             parent=self.sr.main,
                                             align=uiconst.TOTOP,
                                             height=50)
            self.countdownText = uicontrols.Label(parent=banCont,
                                                  align=uiconst.CENTER,
                                                  fontsize=36,
                                                  color=(1, 0, 0, 1))
            self.countdownTimer = base.AutoTimer(100, self.UpdateTimer)
        uicore.registry.SetFocus(self)
        self.MakeUnKillable()
コード例 #27
0
    def ConstructLayout(self):
        pad = const.defaultPadding
        self.sr.footer = uiprimitives.Container(name='footer',
                                                parent=self.sr.main,
                                                align=uiconst.TOBOTTOM,
                                                pos=(0, 0, 0, 25),
                                                padding=(pad, pad, pad, pad))
        self.sr.cols = uiprimitives.Container(name='col1',
                                              parent=self.sr.main,
                                              align=uiconst.TOALL)
        uiprimitives.Line(parent=self.sr.cols, align=uiconst.TOTOP)
        uiprimitives.Line(parent=self.sr.cols, align=uiconst.TOBOTTOM)
        self.sr.col1 = uiprimitives.Container(name='col1',
                                              parent=self.sr.cols,
                                              align=uiconst.TOLEFT,
                                              padding=(pad, pad, pad, pad),
                                              clipChildren=True)
        self.sr.col2 = uiprimitives.Container(name='col1',
                                              parent=self.sr.cols,
                                              align=uiconst.TOLEFT,
                                              padding=(pad, pad, pad, pad),
                                              clipChildren=True)
        uiprimitives.Line(parent=self.sr.cols, align=uiconst.TOLEFT)
        self.sr.col3 = uiprimitives.Container(name='col1',
                                              parent=self.sr.cols,
                                              align=uiconst.TOLEFT,
                                              padding=(pad, pad, pad, pad),
                                              clipChildren=True)
        colTopHeight = 60
        self.sr.sourcePinHeader = uiprimitives.Container(name='pinHeader',
                                                         parent=self.sr.col1,
                                                         align=uiconst.TOTOP,
                                                         padding=(pad, 0, pad,
                                                                  pad),
                                                         pos=(0, 0, 0,
                                                              colTopHeight))
        self.sr.sourcePinList = uiprimitives.Container(
            name='pinList',
            parent=self.sr.col1,
            align=uiconst.TOALL,
            state=uiconst.UI_PICKCHILDREN)
        self.sr.transferHeader = uiprimitives.Container(name='transferHeader',
                                                        parent=self.sr.col2,
                                                        align=uiconst.TOTOP,
                                                        padding=(pad, 0, pad,
                                                                 pad),
                                                        pos=(0, 0, 0,
                                                             colTopHeight))
        self.sr.transferList = uiprimitives.Container(
            name='transferList',
            parent=self.sr.col2,
            align=uiconst.TOALL,
            state=uiconst.UI_PICKCHILDREN)
        self.sr.destPinHeader = uiprimitives.Container(name='destPinHeader',
                                                       parent=self.sr.col3,
                                                       align=uiconst.TOTOP,
                                                       padding=(pad, 0, pad,
                                                                pad),
                                                       pos=(0, 0, 0,
                                                            colTopHeight))
        self.sr.destPinList = uiprimitives.Container(
            name='destPinList',
            parent=self.sr.col3,
            align=uiconst.TOALL,
            state=uiconst.UI_PICKCHILDREN)
        self.sr.footerLeft = uiprimitives.Container(name='footerLeft',
                                                    parent=self.sr.footer,
                                                    align=uiconst.TOLEFT)
        self.sr.footerRight = uiprimitives.Container(name='footerRight',
                                                     parent=self.sr.footer,
                                                     align=uiconst.TORIGHT)
        btns = [(localization.GetByLabel('UI/PI/Common/ExecuteTransfer'),
                 self.GoForTransfer, (), None)]
        uicontrols.ButtonGroup(btns=btns, parent=self.sr.footerRight, line=0)
        self.sr.volumeText = uicontrols.EveLabelSmall(
            text='',
            parent=self.sr.transferHeader,
            left=0,
            top=20,
            state=uiconst.UI_NORMAL)
        self.sr.timeText = uicontrols.EveLabelSmall(
            text='',
            parent=self.sr.transferHeader,
            left=0,
            top=35,
            state=uiconst.UI_NORMAL)
        self.sr.timeText.hint = localization.GetByLabel(
            'UI/PI/Common/ExpeditedTransferProcessingHint')
        self.sr.cooldownTimeText = uicontrols.EveLabelSmall(
            parent=self.sr.transferHeader, left=0, top=46)
        self.sr.cooldownTimeText.hint = localization.GetByLabel(
            'UI/PI/Common/CoolDownTimeHint')
        btns = [(localization.GetByLabel('UI/PI/Common/Add'),
                 self.AddBtnClicked, (), None),
                (localization.GetByLabel('UI/PI/Common/Remove'),
                 self.RemoveBtnClicked, (), None)]
        btns = uicontrols.ButtonGroup(btns=btns,
                                      parent=self.sr.footerLeft,
                                      line=0)
        for b in btns.children[0].children:
            b.SetHint(
                localization.GetByLabel(
                    'UI/PI/Common/ExpeditedTransferSplitHint'))

        self.OnResizeUpdate()
        self.sr.sourcePinHeaderText = uicontrols.Label(
            text=planetCommon.GetGenericPinName(self.sourcePin.typeID,
                                                self.sourcePin.id),
            parent=self.sr.sourcePinHeader,
            align=uiconst.TOPLEFT,
            fontsize=16,
            left=0,
            state=uiconst.UI_NORMAL)
        self.sr.sourcePinSubGauge = uicls.Gauge(
            parent=self.sr.sourcePinHeader,
            value=0.0,
            color=planetCommonUI.PLANET_COLOR_STORAGE,
            label=localization.GetByLabel('UI/PI/Common/Capacity'),
            left=0,
            top=24,
            state=uiconst.UI_NORMAL)
        self.sr.sourcePinListScroll = uicontrols.Scroll(
            parent=self.sr.sourcePinList, name='pinList')
        content = self.sr.sourcePinListScroll.sr.content
        content.OnDropData = self.OnSourceScrollDropData
        self.sr.transferHeaderText = uicontrols.Label(
            text=localization.GetByLabel('UI/PI/Common/ToBeTransferred'),
            parent=self.sr.transferHeader,
            align=uiconst.TOPLEFT,
            fontsize=16,
            left=0,
            state=uiconst.UI_NORMAL)
        self.sr.transferListScroll = uicontrols.Scroll(
            parent=self.sr.transferList, name='transferList')
        content = self.sr.transferListScroll.sr.content
        content.OnDropData = self.OnTransferScrollDropData
        self.sr.destPinText = uicontrols.Label(text='',
                                               parent=self.sr.destPinHeader,
                                               align=uiconst.TOTOP,
                                               fontsize=16,
                                               state=uiconst.UI_NORMAL,
                                               maxLines=1)
        self.sr.destPinSubText = uicontrols.EveLabelLarge(
            text='',
            parent=self.sr.destPinHeader,
            align=uiconst.TOTOP,
            top=5,
            state=uiconst.UI_HIDDEN)
        self.sr.destPinSubGauge = uicls.Gauge(
            parent=self.sr.destPinHeader,
            value=0.0,
            color=planetCommonUI.PLANET_COLOR_STORAGE,
            label=localization.GetByLabel('UI/PI/Common/Capacity'),
            left=0,
            top=24,
            state=uiconst.UI_HIDDEN)
        self.sr.destPinListScroll = uicontrols.Scroll(
            parent=self.sr.destPinList)