Exemple #1
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     nameCont = Container(name='nameCont',
                          parent=self,
                          align=uiconst.TOTOP,
                          height=18)
     infoCont = Container(name='infoCont',
                          parent=self,
                          align=uiconst.TOBOTTOM,
                          height=54,
                          clipChildren=True)
     self.groupContainers = {}
     self.overlayCont = Container(name='overlayCont',
                                  parent=self,
                                  align=uiconst.TOALL)
     self.CreateScrollContainer()
     self.captionLabel = EveLabelMediumBold(parent=nameCont, left=6)
     self.volumeLabel = EveLabelMedium(name='volumeLabel',
                                       parent=infoCont,
                                       align=uiconst.BOTTOMRIGHT,
                                       left=5,
                                       top=4)
     self.totalPriceLabel = EveLabelMedium(name='totalPriceLabel',
                                           parent=infoCont,
                                           align=uiconst.BOTTOMRIGHT,
                                           left=5,
                                           top=20)
     self.numItemsLabel = EveLabelMedium(name='numItemsLabel',
                                         parent=infoCont,
                                         align=uiconst.BOTTOMRIGHT,
                                         left=5,
                                         top=36)
Exemple #2
0
def GetSkillBonusesAsLabels(typeID,
                            getTypeAttribute,
                            getSkillLevel,
                            category=False):
    skillLabels = []
    if not category:
        skillBonuses = GetSkillFromTypeID(typeID, getTypeAttribute,
                                          getSkillLevel)
    else:
        skillBonuses = GetSkillFromCategoryID(typeID, getTypeAttribute,
                                              getSkillLevel)
    for skillType, bonus in skillBonuses:
        skillName = evetypes.GetName(skillType)
        labelOpacity = 0.35
        if bonus > 0:
            labelOpacity = 0.75
        skillLabels.append(
            EveLabelMedium(text=GetByLabel(
                'UI/Reprocessing/ReprocessingWindow/YieldFormatting',
                bonusYield=1.0 + bonus / 100),
                           colSpan=1,
                           align=uiconst.TORIGHT,
                           padRight=3,
                           color=COL_GREEN,
                           bold=True,
                           opacity=labelOpacity))
        skillLabels.append(
            EveLabelMedium(text=GetByLabel(
                'UI/Reprocessing/ReprocessingWindow/BonusFromSkill',
                skillName=skillName),
                           colSpan=1,
                           padLeft=3,
                           opacity=labelOpacity))

    return skillLabels
Exemple #3
0
 def BuildUI(self, thisWeek, nextWeek):
     self.topCont = ContainerAutoSize(name='topCont', parent=self.sr.main, alignMode=uiconst.TOTOP, align=uiconst.TOTOP, padTop=6)
     LineThemeColored(parent=self.topCont, align=uiconst.TOBOTTOM)
     self.topCont.GetAutoSize = self.GetTopContAutoSize
     self.comboCont = Container(parent=self.topCont, align=uiconst.TORIGHT)
     text = GetByLabel('UI/Structures/Deployment/ModifyingVulnerabilitySchedule', count=len(self.infoOnStructures))
     EveLabelLarge(parent=self.topCont, align=uiconst.TOTOP, left=10, top=4, text=text)
     self.AddCombos()
     btnGroup = ButtonGroup(parent=self.sr.main, idx=0)
     saveBtn = btnGroup.AddButton(GetByLabel('UI/Common/Buttons/Save'), func=self.Save)
     parent = Container(parent=self.sr.main, padding=(10, 10, 10, 0))
     mouseParent = Container(parent=parent, align=uiconst.TOBOTTOM, height=46)
     mouseCont = MouseCont(parent=mouseParent, inMoveMode=False, align=uiconst.TORIGHT_PROP, width=0.5)
     labelCont = GridContainer(parent=parent, align=uiconst.TOTOP, columns=2, lines=1, height=30)
     lableSubCont1 = Container(parent=labelCont)
     lableSubCont2 = Container(parent=labelCont)
     EveLabelMedium(parent=lableSubCont1, text=GetByLabel('UI/StructureProfiles/ThisWeek'), align=uiconst.CENTERLEFT)
     EveLabelMedium(parent=lableSubCont2, text=GetByLabel('UI/StructureProfiles/NextWeek'), align=uiconst.CENTERLEFT)
     self.leftSide = Container(parent=parent, width=0.5, align=uiconst.TOLEFT_PROP)
     self.rightSide = Container(parent=parent, align=uiconst.TOALL)
     thisWeekSchedule = structures.Schedule(thisWeek, required=self.requiredHours)
     w1 = VulnerabilitySchedulerWithReinforcement(parent=self.leftSide, canModify=False, schedule=thisWeekSchedule, frame=False, padRight=10)
     Sprite(name='lock', parent=w1.weekContParent, pos=(0, 0, 54, 64), align=uiconst.CENTER, texturePath='res:/UI/Texture/Classes/StructureDeployment/lock.png', state=uiconst.UI_DISABLED)
     w1.opacity = 0.3
     self.nextWeekSchedule = structures.Schedule(nextWeek, required=self.requiredHours)
     self.w2 = VulnerabilitySchedulerWithReinforcement(parent=self.rightSide, canModify=True, schedule=self.nextWeekSchedule, frame=False, padRight=10)
     self.ChangeSignalConnection(connect=True)
Exemple #4
0
 def CreateWindow(self):
     self.capitalSystemInfo = sm.GetService('alliance').GetCapitalSystemInfo()
     self.systems = sm.RemoteSvc('stationSvc').GetSystemsForAlliance(session.allianceid)
     alliance = sm.GetService('alliance').GetAlliance()
     self.isExecDirector = self._IsDirectorInExecCorp(alliance.executorCorpID)
     infoCont = ContainerAutoSize(parent=self, align=uiconst.TOTOP, padding=(const.defaultPadding,
      const.defaultPadding,
      const.defaultPadding,
      0))
     topCont = Container(parent=infoCont, height=42, align=uiconst.TOTOP)
     FillThemeColored(parent=topCont, colorType=uiconst.COLORTYPE_UIHEADER, opacity=0.15)
     texturePath = 'res:/ui/Texture/classes/Sov/capitalSystem.png'
     Sprite(name='capitalIcon', parent=topCont, texturePath=texturePath, width=32, height=32, align=uiconst.CENTERLEFT, left=4)
     EveLabelLarge(text=GetByLabel('UI/Sovereignty/AllianceCapital'), parent=topCont, align=uiconst.CENTERLEFT, left=42, top=-8)
     EveLabelSmall(text=GetByLabel('UI/Sovereignty/SelectCapitalSystemDescription'), parent=topCont, align=uiconst.CENTERLEFT, left=42, top=8)
     currentSystemCont = Container(parent=infoCont, height=24, align=uiconst.TOTOP)
     self.currentCapitalLabel = EveLabelMedium(text='', left=4, parent=currentSystemCont, align=uiconst.CENTERLEFT, state=uiconst.UI_NORMAL)
     self.capitalLabel = EveLabelMedium(text=GetByLabel('UI/Sovereignty/CurrentCapital'), left=22, parent=currentSystemCont, align=uiconst.CENTERRIGHT)
     self.capitalSprite = Sprite(name='capitalIcon', parent=currentSystemCont, texturePath='res:/ui/Texture/classes/Sov/CapitalStarSelection.png', width=16, height=16, align=uiconst.CENTERRIGHT, left=4)
     self.SetDisplayOfCapitalLabelAndIcon(False)
     self.futureSystemCont = Container(parent=infoCont, height=24, align=uiconst.TOTOP)
     self.futureSystemLabel = EveLabelMedium(text='', left=4, parent=self.futureSystemCont, align=uiconst.CENTERLEFT)
     self.futureSystemTime = EveLabelMedium(text='', left=4, parent=self.futureSystemCont, align=uiconst.CENTERRIGHT)
     self.removeBtn = ButtonIcon(texturePath='res:/UI/Texture/Icons/73_16_210.png', pos=(4, 0, 16, 16), align=uiconst.CENTERRIGHT, parent=self.futureSystemCont, idx=0, func=self.RemoveCapital, hint=GetByLabel('UI/Common/Buttons/Cancel'))
     self.removeBtn.display = False
     if self.isExecDirector:
         self.removeBtn.display = True
         self.futureSystemTime.left = 22
     self.futureSystemCont.display = False
     self.claimedSystems = ClaimedSystemsDashboard(parent=self, padTop=const.defaultPadding)
     self.claimedSystems.CreateWindow()
     self.UpdateCapitalInfo()
Exemple #5
0
 def thread():
     self.details = ContainerAutoSize(parent=self,
                                      align=uiconst.TOTOP,
                                      clipChildren=True)
     self.details.DisableAutoSize()
     EveLabelMedium(parent=self.details,
                    align=uiconst.TOTOP,
                    padding=(6, 3, 6, 2),
                    text=self.quest.descriptionLabel)
     EveLabelMedium(
         parent=self.details,
         align=uiconst.TOTOP,
         padding=(6, 3, 6, 2),
         text=localization.GetByLabel('UI/Quest/RewardTitle'))
     EveLabelMedium(parent=self.details,
                    align=uiconst.TOTOP,
                    padding=(12, 6, 6, 12),
                    text=self.quest.rewardLabel)
     _, height = self.details.GetAutoSize()
     animations.FadeIn(self.details, duration=0.3)
     animations.MorphScalar(self.details,
                            'height',
                            startVal=self.details.height,
                            endVal=height,
                            duration=0.25,
                            callback=self.details.EnableAutoSize)
Exemple #6
0
    def LoadTooltipPanel(self, tooltipPanel, *args):
        tooltipPanel.columns = 5
        tooltipPanel.margin = 6
        tooltipPanel.cellPadding = 3
        tooltipPanel.cellSpacing = 0
        text = GetByLabel('UI/Sovereignty/ActivityDefenseMultiplier')
        label = EveLabelMedium(text=text, align=uiconst.TOTOP, padTop=1, bold=True)
        tooltipPanel.AddCell(cellObject=label, colSpan=4)
        text = GetByLabel('UI/Sovereignty/DefenseMultiplierDisplayNumber', bonusMultiplier=self.currentMultiplier)
        label = EveLabelLarge(text=text, align=uiconst.TOPRIGHT, bold=True)
        tooltipPanel.AddCell(cellObject=label)
        valueAndTextures = [(self.devIndexes[2], 'res:/UI/Texture/classes/Sov/strategicIndex.png', 'UI/Sovereignty/StrategicIndex'), (self.devIndexes[0], 'res:/UI/Texture/classes/Sov/militaryIndex.png', 'UI/Sovereignty/MilitaryIndex'), (self.devIndexes[1], 'res:/UI/Texture/classes/Sov/industryIndex.png', 'UI/Sovereignty/IndustryIndex')]
        for indexValue, texturePath, labelPath in valueAndTextures:
            indexSprite = Sprite(name='indexSprite', parent=tooltipPanel, pos=(0, 0, 16, 16), align=uiconst.CENTERLEFT, texturePath=texturePath)
            label = EveLabelMedium(text=GetByLabel(labelPath))
            tooltipPanel.AddCell(cellObject=label)
            indexBars = IndexBars(currentIndex=indexValue, align=uiconst.CENTERRIGHT)
            tooltipPanel.AddCell(cellObject=indexBars, cellPadding=(16, 0, 3, 0), colSpan=3)

        if self.isCapital:
            tooltipPanel.state = uiconst.UI_NORMAL
            l = LineThemeColored(height=1, align=uiconst.TOTOP, opacity=0.3)
            tooltipPanel.AddCell(l, colSpan=5, cellPadding=(1, 1, 1, 3))
            capitalSprite = Sprite(name='capitalSprite', parent=tooltipPanel, pos=(0, 0, 16, 16), align=uiconst.CENTERLEFT, texturePath='res:/UI/Texture/classes/Sov/bonusShieldCapital16.png')
            capitalLabel = EveLabelMedium(text=GetByLabel('UI/Sovereignty/Capital'), align=uiconst.CENTERLEFT)
            tooltipPanel.AddCell(cellObject=capitalLabel)
            infoLabel = GetByLabel('UI/Contracts/ContractsWindow/ShowInfoLink', showInfoName=cfg.eveowners.Get(self.capitalOwnerID).name, info=('showinfo', const.typeAlliance, self.capitalOwnerID))
            tooltipPanel.AddLabelMedium(text=infoLabel, colSpan=3, wrapWidth=160, align=uiconst.CENTERRIGHT, state=uiconst.UI_NORMAL)
Exemple #7
0
 def LoadContentCont(self):
     self.contentCont.Flush()
     groupDesc = self.groupInfo['description']
     admins = self.groupInfo['admins']
     if groupDesc:
         EveLabelMedium(parent=self.contentCont,
                        text=groupDesc,
                        padTop=6,
                        align=uiconst.TOTOP)
     else:
         descText = GetByLabel(
             'UI/Structures/AccessGroups/NoGroupDescription')
         EveLabelMedium(parent=self.contentCont,
                        text=descText,
                        align=uiconst.TOTOP,
                        padTop=6,
                        italic=True)
     for adminID in admins:
         ownerInfo = cfg.eveowners.Get(adminID)
         charName = ownerInfo.name
         charText = GetShowInfoLink(ownerInfo.typeID,
                                    charName,
                                    itemID=adminID)
         text = GetByLabel('UI/Structures/AccessGroups/GroupOwner',
                           ownerName=charText)
         EveLabelMedium(parent=self.contentCont,
                        text=text,
                        align=uiconst.TOTOP,
                        padTop=6,
                        state=uiconst.UI_NORMAL)
Exemple #8
0
 def Layout(self):
     self.HideHeader()
     self.MakeUnResizeable()
     self.SetWndIcon(self.iconNum, mainTop=2, mainLeft=6)
     self.SetTopparentHeight(self.TOP_PARENT_HEIGHT)
     station = cfg.stations.Get(session.stationid2)
     WndCaptionLabel(parent=self.sr.topParent,
                     align=uiconst.RELATIVE,
                     text=localization.GetByLabel('UI/Medical/Medical'),
                     subcaption=station.stationName)
     self.container = ContainerAutoSize(parent=self.GetMainArea(),
                                        align=uiconst.TOTOP,
                                        alignMode=uiconst.TOTOP,
                                        state=uiconst.UI_PICKCHILDREN,
                                        padding=(self.PADDING, self.PADDING,
                                                 self.PADDING,
                                                 self.PADDING),
                                        callback=self.OnContainerResized,
                                        opacity=0.0)
     EveLabelLargeBold(
         parent=self.container,
         align=uiconst.TOTOP,
         text=localization.GetByLabel('UI/Medical/MedicalClone'))
     EveLabelMedium(
         parent=self.container,
         align=uiconst.TOTOP,
         text=localization.GetByLabel('UI/Medical/MedicalCloneDescription'),
         color=GRAY_COLOR,
         padding=(0, 0, 0, self.HALF_PADDING))
     self.homeStation = CreateSectionContainer(self.container)
     EveLabelLargeBold(
         parent=self.container,
         align=uiconst.TOTOP,
         text=localization.GetByLabel('UI/Medical/ActiveClone'),
         padding=(0, self.PADDING, 0, 0))
     EveLabelMedium(parent=self.container,
                    align=uiconst.TOTOP,
                    text=localization.GetByLabel(
                        'UI/Medical/DestroyActiveCloneDescription'),
                    color=GRAY_COLOR,
                    padding=(0, 0, 0, self.HALF_PADDING))
     EveLabelMediumBold(parent=self.container,
                        align=uiconst.TOTOP,
                        text=localization.GetByLabel(
                            'UI/Medical/DestroyActiveCloneWarning'),
                        color=RED_COLOR,
                        padding=(0, 0, 0, self.HALF_PADDING))
     self.activeClone = CreateSectionContainer(self.container)
     EveLabelLargeBold(parent=self.container,
                       align=uiconst.TOTOP,
                       text=localization.GetByLabel('UI/Medical/JumpClone'),
                       padding=(0, self.PADDING, 0, 0))
     EveLabelMedium(
         parent=self.container,
         align=uiconst.TOTOP,
         text=localization.GetByLabel('UI/Medical/JumpCloneDescription'),
         color=GRAY_COLOR,
         padding=(0, 0, 0, self.HALF_PADDING))
     self.jumpClone = CreateSectionContainer(self.container)
     animations.FadeIn(self.container, duration=0.5)
Exemple #9
0
def GetStationTaxAsLabel(stationTax):
    """
        Takes in float: stationTax and returns two labels: taxBonusLabel, taxTextLabel.
    """
    taxBonusLabel = EveLabelMedium(text=GetByLabel('UI/Reprocessing/ReprocessingWindow/YieldFormatting', bonusYield=1.0 - stationTax), colSpan=1, align=uiconst.TORIGHT, padRight=3, color=COL_RED, bold=True)
    taxTextLabel = EveLabelMedium(text=GetByLabel('UI/Reprocessing/ReprocessingWindow/StationTaxHint'), colSpan=1, padLeft=3)
    return (taxBonusLabel, taxTextLabel)
Exemple #10
0
def GetStationEfficiencyAsLabel(stationEfficiency):
    """
        Takes in float: stationEfficiency and returns labels: stationBonusLabel, stationTextLabel.
    """
    stationBonusLabel = EveLabelMedium(text=GetByLabel('UI/Common/Formatting/Percentage', percentage=stationEfficiency * 100), colSpan=1, align=uiconst.TORIGHT, padRight=2, color=COL_LIGHTBLUE, bold=True)
    stationTextLabel = EveLabelMedium(text=GetByLabel('UI/Reprocessing/ReprocessingWindow/BaseYield'), colSpan=1, padLeft=2)
    return (stationBonusLabel, stationTextLabel)
Exemple #11
0
def GetOreAvgBonusAsLabel(avgBonus):
    """
        Takes in float: avgBonus and returns labels: oreAvgBonusLabel, oreAvgTextLabel.
    """
    oreAvgBonusLabel = EveLabelMedium(text=GetByLabel('UI/Reprocessing/ReprocessingWindow/YieldFormatting', bonusYield=1.0 + avgBonus / 100), colSpan=1, align=uiconst.TORIGHT, padRight=3, color=COL_GREEN, bold=True)
    oreAvgTextLabel = EveLabelMedium(text=GetByLabel('UI/Reprocessing/ReprocessingWindow/OreProcessingHint'), colSpan=1, padLeft=3)
    return (oreAvgBonusLabel, oreAvgTextLabel)
Exemple #12
0
 def Layout(self):
     Fill(bgParent=self, color=(0, 0, 0, 0.2))
     BlurredBackgroundSprite(bgParent=self, color=(1, 1, 1, 0.9))
     headerContainer = ContainerAutoSize(parent=self,
                                         align=uiconst.TOTOP,
                                         alignMode=uiconst.TOPLEFT)
     self.completedFill = FillThemeColored(
         bgParent=headerContainer,
         colorType=uiconst.COLORTYPE_UIHILIGHT,
         opacity=0.0)
     self.headerFill = InfoPanelHeaderBackground(bgParent=headerContainer)
     headerGrid = LayoutGrid(parent=headerContainer)
     if self.quest.isComplete:
         texturePath = RES_COMPLETED
     else:
         texturePath = RES_AVAILABLE
     self.check = Sprite(align=uiconst.TOPLEFT,
                         state=uiconst.UI_DISABLED,
                         texturePath=texturePath,
                         width=14,
                         height=14)
     headerGrid.AddCell(self.check, cellPadding=(4, 3, 4, 3))
     headerGrid.AddCell(EveLabelMedium(align=uiconst.TOPLEFT,
                                       text=self.quest.titleLabel),
                        cellPadding=(0, 2, 0, 2))
     self.timer = EveLabelMedium(parent=headerContainer,
                                 align=uiconst.CENTERRIGHT,
                                 state=uiconst.UI_DISABLED,
                                 left=4,
                                 opacity=0.0)
    def _ShowDetails(self):
        if not self.autoShowDetails:
            return
        self.detailsParent = ContainerAutoSize(align=uiconst.TOTOP, parent=self, clipChildren=True)
        if self.callbackTaskExpanded:
            self.callbackTaskExpanded(self)
        self.detailsParent.DisableAutoSize()
        label = EveLabelMedium(parent=self.detailsParent, text=self.achievementTask.description, align=uiconst.TOTOP, padding=(6, 3, 6, 2))
        extraInfo = ACHIEVEMENT_TASK_EXTRAINFO.get(self.achievementTask.achievementID, None)
        if extraInfo:
            grid = LayoutGrid(parent=self.detailsParent, align=uiconst.TOTOP, cellPadding=1, columns=2, padLeft=4, padBottom=2)
            for taskInfoEntry in extraInfo:
                if isinstance(taskInfoEntry, TaskInfoEntry_Text):
                    label = EveLabelMedium(text=taskInfoEntry.text, color=taskInfoEntry.textColor, width=240, state=uiconst.UI_NORMAL)
                    grid.AddCell(label, colSpan=2)
                elif isinstance(taskInfoEntry, TaskInfoEntry_ImageText):
                    texturePath = taskInfoEntry.GetTexturePath()
                    icon = Sprite(name='icon', parent=grid, pos=(0,
                     0,
                     taskInfoEntry.imageSize,
                     taskInfoEntry.imageSize), texturePath=texturePath, state=uiconst.UI_DISABLED, align=uiconst.CENTER, color=taskInfoEntry.imageColor)
                    text = GetByLabel(taskInfoEntry.textPath)
                    label = EveLabelMedium(text=text, color=taskInfoEntry.textColor, width=220, align=uiconst.CENTERLEFT, state=uiconst.UI_NORMAL)
                    grid.AddCell(label)

        blue.synchro.Yield()
        height = self.detailsParent.GetAutoSize()[1]
        uicore.animations.FadeIn(self.detailsParent, duration=0.3)
        uicore.animations.MorphScalar(self.detailsParent, 'height', self.detailsParent.height, height, duration=0.25, sleep=True)
        self.detailsParent.EnableAutoSize()
Exemple #14
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     inMoveMode = attributes.get('inMoveMode', True)
     leftMouseCont = Container(parent=self,
                               name='leftMouseCont',
                               align=uiconst.TOLEFT_PROP,
                               width=0.5)
     rightMouseCont = Container(parent=self,
                                name='rightMouseCont',
                                align=uiconst.TORIGHT_PROP,
                                width=0.5)
     leftMouseSprite = Sprite(parent=leftMouseCont,
                              name='leftMouseSprite',
                              align=uiconst.CENTERRIGHT,
                              texturePath=self.MOUSE_LEFT_PATH,
                              pos=(0, 0, 32, 32))
     rightMouseSprite = Sprite(parent=rightMouseCont,
                               name='rightMouseSprite',
                               align=uiconst.CENTERLEFT,
                               texturePath=self.MOUSE_RIGHT_PATH,
                               pos=(0, 0, 32, 32))
     self.leftLabel = EveLabelMedium(parent=leftMouseCont,
                                     name='leftLabel',
                                     align=uiconst.CENTERRIGHT,
                                     pos=(32, -6, 0, 0))
     self.rightLabel = EveLabelMedium(parent=rightMouseCont,
                                      name='rightLabel',
                                      align=uiconst.CENTERLEFT,
                                      pos=(32, -6, 0, 0))
     self.SetMouseLabels(inMoveMode)
Exemple #15
0
 def DrawNumbers(self):
     self.numbersGrid = LayoutGrid(parent=self.bottomRight,
                                   columns=2,
                                   align=uiconst.TORIGHT,
                                   top=self.numbersGridTop)
     if self.showTaxAndBrokersFee:
         self.brokersFee = EveLabelMedium(text='', padRight=4)
         self.numbersGrid.AddCell(self.brokersFee)
         self.brokersFeeAmt = EveLabelMediumBold(text='',
                                                 align=uiconst.CENTERRIGHT,
                                                 padLeft=4)
         self.numbersGrid.AddCell(self.brokersFeeAmt)
         self.salesTax = EveLabelMedium(text='', padRight=4)
         self.numbersGrid.AddCell(self.salesTax)
         self.salesTaxAmt = EveLabelMediumBold(text='',
                                               align=uiconst.CENTERRIGHT,
                                               padLeft=4)
         self.numbersGrid.AddCell(self.salesTaxAmt)
         spacer = Container(align=uiconst.TOTOP, height=12)
         self.numbersGrid.AddCell(spacer, colSpan=2)
     self.totalAmt = EveLabelLargeBold(text='',
                                       align=uiconst.CENTERRIGHT,
                                       padLeft=4,
                                       state=uiconst.UI_NORMAL)
     self.numbersGrid.AddCell(self.totalAmt, colSpan=2)
 def ApplyAttributes(self, attributes):
     LayoutGrid.ApplyAttributes(self, attributes)
     self.nameLabel = EveLabelLarge(bold=True)
     self.AddCell(cellObject=self.nameLabel, colSpan=self.columns)
     EveLabelMedium(parent=self,
                    text=GetByLabel('UI/Map/StarMap/SecurityStatus'))
     self.securityValue = EveLabelMedium(parent=self,
                                         bold=True,
                                         color=(1, 0, 0, 1))
def AddPriceRow(panel, price):
    if not price:
        iskPrice = localization.GetByLabel('UI/Inventory/PriceUnavailable')
    else:
        iskPrice = FmtISK(price)
    label = EveLabelMedium(text=localization.GetByLabel('UI/Industry/TotalEstimatedPrice'), color=Color.GRAY)
    panel.AddCell(label)
    label = EveLabelMedium(align=uiconst.TOPRIGHT, text=iskPrice)
    panel.AddCell(label, cellPadding=(8, 0, 0, 0))
    panel.AddCell(cellPadding=PADBOTTOM, colSpan=2)
 def ApplyAttributes(self, attributes):
     Window.ApplyAttributes(self, attributes)
     self.title = attributes.title
     self.channelID = attributes.channelID
     self.channelName = attributes.channelName
     self.displayName = attributes.displayName
     self.SetMinSize([250, 250])
     self.SetCaption(localization.GetByLabel('UI/Menusvc/PasswordRequired'))
     self.SetTopparentHeight(0)
     self.tries = 0
     settings.user.ui.Set('%sPassword' % self.channelName, '')
     parentGrid = LayoutGrid(parent=self.sr.main,
                             columns=1,
                             state=uiconst.UI_PICKCHILDREN,
                             align=uiconst.TOPLEFT,
                             left=10,
                             top=4)
     topLabel = EveLabelMedium(text=attributes.title,
                               state=uiconst.UI_DISABLED,
                               align=uiconst.TOPLEFT,
                               width=300)
     parentGrid.AddCell(cellObject=topLabel)
     passwordLabel = localization.GetByLabel(
         'UI/Menusvc/PleaseEnterPassword')
     self.passwordLabel = EveLabelMedium(text=passwordLabel,
                                         state=uiconst.UI_DISABLED,
                                         align=uiconst.TOPLEFT,
                                         padTop=10)
     parentGrid.AddCell(cellObject=self.passwordLabel)
     self.passwordEdit = SinglelineEdit(name='passwordEdit',
                                        align=uiconst.TOTOP,
                                        passwordCharacter=u'\u2022',
                                        top=4)
     parentGrid.AddCell(cellObject=self.passwordEdit)
     savePasswordLabel = localization.GetByLabel('UI/Chat/SavePassword')
     self.rememberPwdCb = Checkbox(text=savePasswordLabel,
                                   configName='rememberPwdCb',
                                   retval=1,
                                   checked=0,
                                   groupname=None,
                                   align=uiconst.TOTOP)
     parentGrid.AddCell(cellObject=self.rememberPwdCb)
     parentGrid.RefreshGridLayout()
     self.btnGroup = ButtonGroup(parent=self.sr.main, idx=0)
     self.btnGroup.AddButton(
         localization.GetByLabel('UI/Chat/ChannelWindow/JoinChannel'),
         self.TryPassword, ())
     self.btnGroup.AddButton(localization.GetByLabel('UI/Common/Cancel'),
                             self.Close, ())
     self.height = self.btnGroup.height + parentGrid.height + self.sr.headerParent.height + parentGrid.top + 10
     self.width = parentGrid.width + 2 * parentGrid.left
     self.MakeUnResizeable()
     self.MakeUnMinimizable()
     self.MakeUncollapseable()
def AddTypeBonusRow(panel, text, bonusME = None, bonusTE = None):
    label = EveLabelMedium(text=text, color=Color.GRAY)
    panel.AddCell(label)
    if bonusME:
        label = EveLabelMedium(align=uiconst.TOPRIGHT, text=bonusME)
        panel.AddCell(label, cellPadding=(8, 0, 0, 0))
    if bonusTE:
        label = EveLabelMedium(align=uiconst.TOPRIGHT, text=bonusTE)
        panel.AddCell(label, cellPadding=(8, 0, 0, 0))
    panel.FillRow()
    panel.AddCell(cellPadding=PADBOTTOM, colSpan=2)
Exemple #20
0
 def BuildUI(self):
     inv = sm.GetService('invCache').GetInventoryFromId(self.structureID)
     item = inv.GetItem()
     stationName = cfg.evelocations.Get(self.structureID).name or evetypes.GetName(item.typeID)
     stationText = GetShowInfoLink(item.typeID, stationName, itemID=self.structureID)
     self.nameLabel = EveLabelMedium(name='nameLabel', parent=self.sr.main, text=stationText, padLeft=10, align=uiconst.TOTOP, state=uiconst.UI_NORMAL)
     ownerText = GetShowInfoLink(const.typeCorporation, cfg.eveowners.Get(item.ownerID).name, itemID=item.ownerID)
     self.ownerLabel = EveLabelMedium(name='ownerLabel', parent=self.sr.main, text=ownerText, padLeft=10, align=uiconst.TOTOP, state=uiconst.UI_NORMAL)
     Button(parent=self.sr.main, align=uiconst.TOTOP, label='_Take control', func=self.TakeControl, padding=(10, 2, 10, 2))
     self.AddCurrentShip()
     Button(parent=self.sr.main, align=uiconst.TOTOP, label='_Undock', func=self.Undock, padding=(10, 2, 10, 2))
 def PrepareCompleteMessage(self):
     self.messagePanel.Flush()
     text = localization.GetByLabel(
         'UI/SkillTrading/CompleteMessageCaption')
     EveCaptionMedium(parent=self.messagePanel,
                      align=uiconst.TOTOP,
                      text='<center>%s</center>' % text)
     text = localization.GetByLabel('UI/SkillTrading/CompleteMessageMain',
                                    amount=self.controller.SKILL_POINT_GOAL,
                                    injector=invconst.typeSkillInjector)
     EveLabelMedium(parent=self.messagePanel,
                    align=uiconst.TOTOP,
                    top=4,
                    text='<center>%s</center>' % text)
     iconCont = Container(parent=self.messagePanel,
                          align=uiconst.TOTOP,
                          top=8,
                          height=64)
     Icon(parent=iconCont,
          align=uiconst.CENTER,
          left=-40,
          typeID=invconst.typeSkillInjector,
          size=64,
          state=uiconst.UI_DISABLED)
     Sprite(
         parent=iconCont,
         align=uiconst.CENTER,
         state=uiconst.UI_DISABLED,
         texturePath='res:/UI/Texture/classes/skilltrading/arrow_right.png',
         width=32,
         height=32,
         opacity=0.6)
     Sprite(parent=iconCont,
            align=uiconst.CENTER,
            state=uiconst.UI_DISABLED,
            left=40,
            texturePath='res:/UI/Texture/WindowIcons/itemHangar.png',
            width=64,
            height=64)
     text = localization.GetByLabel('UI/SkillTrading/CompleteMessageTail',
                                    injector=invconst.typeSkillInjector)
     EveLabelMedium(parent=self.messagePanel,
                    align=uiconst.TOTOP,
                    top=8,
                    text='<center>%s</center>' % text)
     buttonCont = Container(parent=self.messagePanel,
                            align=uiconst.TOTOP,
                            top=16,
                            height=40)
     Button(parent=buttonCont,
            align=uiconst.CENTER,
            label=localization.GetByLabel('UI/Common/Done'),
            func=self.Close)
Exemple #22
0
def GetImplantModifiersAsLabels():
    """
        Generates and returns a list of labels based on implants that affect reprocessing.
    """
    implantLabels = []
    implants = sm.GetService('godma').GetItem(session.charid).implants
    for implant in implants:
        implantBonus = getattr(implant, 'refiningYieldMutator')
        if implantBonus > 0.0:
            implantLabels.append(EveLabelMedium(text=GetByLabel('UI/Reprocessing/ReprocessingWindow/YieldFormatting', bonusYield=1.0 + implantBonus / 100), colSpan=1, align=uiconst.TORIGHT, padRight=3, color=COL_GREEN, bold=True))
            implantLabels.append(EveLabelMedium(text=GetByLabel('UI/Reprocessing/ReprocessingWindow/BonusFromSkill', skillName=implant.name), colSpan=1, padLeft=3))

    return implantLabels
Exemple #23
0
 def _CreateNotificationText(self):
     self.titleLabel = EveLabelMedium(name='notificationSubjectLabel',
                                      parent=self.rightContainer,
                                      align=uiconst.TOTOP,
                                      text=self.title,
                                      padding=TITLE_PADDING,
                                      bold=True)
     if self.subtext:
         self.subtextLabel = EveLabelMedium(name='notificationSubtextLabel',
                                            parent=self.rightContainer,
                                            align=uiconst.TOTOP,
                                            text=self.subtext,
                                            padding=SUBTEXT_PADDING)
Exemple #24
0
 def ApplyAttributes(self, attributes):
     ContainerAutoSize.ApplyAttributes(self, attributes)
     charID = attributes.charID
     parentLayoutGrid = LayoutGrid(parent=self,
                                   columns=2,
                                   align=uiconst.TOPLEFT,
                                   padding=6,
                                   cellSpacing=(10, 10))
     addHeader = attributes.get('addHeader', True)
     if addHeader:
         self.AddHeader(parentLayoutGrid)
     sprite = Sprite(parent=parentLayoutGrid,
                     align=uiconst.TOPLEFT,
                     state=uiconst.UI_DISABLED,
                     pos=(0, 0, 128, 128))
     sm.GetService('photo').GetPortrait(charID,
                                        128,
                                        sprite,
                                        allowServerTrip=True)
     subLayoutGrid = LayoutGrid(parent=parentLayoutGrid,
                                columns=2,
                                align=uiconst.TOPLEFT)
     spacer = Fill(align=uiconst.TOPLEFT,
                   state=uiconst.UI_DISABLED,
                   width=128,
                   height=1,
                   color=(0, 0, 0, 0))
     subLayoutGrid.AddCell(cellObject=spacer, colSpan=2)
     parallelCalls = []
     parallelCalls.append(
         (sm.RemoteSvc('charMgr').GetPublicInfo3, (charID, )))
     parallelCalls.append(
         (sm.GetService('corp').GetInfoWindowDataForChar, (charID, 1)))
     charinfo, corpCharInfo = uthread.parallel(parallelCalls)
     charName = cfg.eveowners.Get(charID).name
     nameLabel = EveLabelMedium(text=charName, autoFitToText=True)
     subLayoutGrid.AddCell(cellObject=nameLabel, colSpan=2)
     titleText = self.GetTitleText(corpCharInfo)
     titleLabel = EveLabelMedium(text=titleText, autoFitToText=True)
     if titleLabel.textwidth > self.maxTextWidth:
         titleLabel.width = self.maxTextWidth
     subLayoutGrid.AddCell(cellObject=titleLabel, colSpan=2)
     if corpCharInfo:
         corpID = corpCharInfo.corpID
         allianceID = corpCharInfo.allianceID
         for eachID in (corpID, allianceID):
             if eachID:
                 logo = self.GetLogo(eachID)
                 logo.hint = cfg.eveowners.Get(eachID).name
                 subLayoutGrid.AddCell(cellObject=logo)
Exemple #25
0
 def ConstructPowerAndCpuLabels(self):
     powerGridAndCpuCont = LayoutGrid(parent=self.overlayCont,
                                      columns=1,
                                      state=uiconst.UI_PICKCHILDREN,
                                      align=uiconst.BOTTOMRIGHT,
                                      top=10,
                                      left=10)
     cpu_statustextHeader = EveLabelMediumBold(
         text=GetByLabel('UI/Fitting/FittingWindow/CPUStatusHeader'),
         name='cpu_statustextHeader',
         state=uiconst.UI_NORMAL,
         align=uiconst.TOPRIGHT)
     SetFittingTooltipInfo(targetObject=cpu_statustextHeader,
                           tooltipName='CPU')
     powerGridAndCpuCont.AddCell(cpu_statustextHeader)
     self.cpu_statustext = EveLabelMedium(text='',
                                          name='cpu_statustext',
                                          state=uiconst.UI_NORMAL,
                                          align=uiconst.TOPRIGHT)
     SetFittingTooltipInfo(targetObject=self.cpu_statustext,
                           tooltipName='CPU')
     powerGridAndCpuCont.AddCell(self.cpu_statustext)
     powerGridAndCpuCont.AddCell(cellObject=Container(
         name='spacer', align=uiconst.TOTOP, height=10))
     power_statustextHeader = EveLabelMediumBold(
         text=GetByLabel('UI/Fitting/FittingWindow/PowergridHeader'),
         name='power_statustextHeader',
         state=uiconst.UI_NORMAL,
         align=uiconst.TOPRIGHT)
     SetFittingTooltipInfo(targetObject=power_statustextHeader,
                           tooltipName='PowerGrid')
     powerGridAndCpuCont.AddCell(power_statustextHeader)
     self.power_statustext = EveLabelMedium(text='',
                                            name='power_statustext',
                                            state=uiconst.UI_NORMAL,
                                            align=uiconst.TOPRIGHT)
     powerGridAndCpuCont.AddCell(self.power_statustext)
     SetFittingTooltipInfo(targetObject=self.power_statustext,
                           tooltipName='PowerGrid')
     self.calibration_statustext = EveLabelMedium(
         text='',
         parent=self.overlayCont,
         name='calibrationstatustext',
         pos=(8, 50, 0, 0),
         idx=0,
         state=uiconst.UI_NORMAL)
     SetFittingTooltipInfo(targetObject=self.calibration_statustext,
                           tooltipName='Calibration')
Exemple #26
0
 def BuildTopParentUI(self):
     self.sr.topParent.padding = (2 * const.defaultPadding, 0,
                                  2 * const.defaultPadding, 0)
     self.shipIcon = Icon(name='shipIcon',
                          parent=self.sr.topParent,
                          state=uiconst.UI_NORMAL,
                          size=64,
                          ignoreSize=True)
     self.shipIcon.GetDragData = self.GetFittingDragData
     self.shipIcon.OnClick = self.OpenFitting
     self.shipIcon.hint = GetByLabel('UI/Fitting/ShowFitting')
     self.techSprite = Sprite(name='techIcon',
                              parent=self.sr.topParent,
                              align=uiconst.RELATIVE,
                              width=16,
                              height=16,
                              idx=0)
     self.fitNameEdit = SinglelineEdit(
         name='fitNameEdit',
         parent=self.sr.topParent,
         left=72,
         width=150,
         maxLength=20,
         hint=GetByLabel('UI/Common/ShipName'))
     top = self.fitNameEdit.top + self.fitNameEdit.height + 5
     self.shipNameLabel = EveLabelMedium(name='shipNameLabel',
                                         parent=self.sr.topParent,
                                         left=77,
                                         top=top,
                                         state=uiconst.UI_NORMAL)
Exemple #27
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     typeID = attributes.typeID
     qty = attributes.qty
     iconPadding = 1 * const.defaultPadding
     typeIcon = Icon(name='typeIcon',
                     parent=self,
                     state=uiconst.UI_NORMAL,
                     size=32,
                     left=iconPadding,
                     ignoreSize=True,
                     typeID=typeID)
     techIcon = uix.GetTechLevelIcon(typeID=typeID)
     if techIcon:
         techIcon.left = iconPadding
         techIcon.SetParent(self, idx=0)
     typeName = evetypes.GetName(typeID)
     link = '<url="showinfo:%s">%s</url>' % (typeID, typeName)
     text = '%sx %s' % (qty, link)
     left = iconPadding * 2 + typeIcon.width + 10
     label = EveLabelMedium(parent=self,
                            left=left,
                            text=text,
                            state=uiconst.UI_NORMAL,
                            align=uiconst.CENTERLEFT)
     self.width = label.left + label.textwidth + 10
Exemple #28
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     self.headerLabel = EveLabelLarge(parent=self,
                                      align=uiconst.TOTOP,
                                      bold=True)
     self.resultLabel = EveLabelMedium(parent=self, align=uiconst.TOTOP)
     self.mapView = weakref.ref(attributes.mapView)
Exemple #29
0
 def Startup(self, *args):
     self.Flush()
     self.mainCont = Container(parent=self, align=uiconst.TOTOP, height=30)
     leftCont = Container(parent=self.mainCont,
                          align=uiconst.TOLEFT,
                          width=50)
     self.icon = Container(parent=leftCont,
                           align=uiconst.TOPLEFT,
                           pos=(3, 3, 32, 32))
     self.corpNameCont = Container(parent=self.mainCont,
                                   align=uiconst.TOTOP,
                                   height=17)
     label = GetByLabel('UI/Station/Lobby/CorpName')
     self.corpNameLabel = EveLabelSmall(text=label,
                                        parent=self.corpNameCont,
                                        left=5,
                                        top=2,
                                        state=uiconst.UI_DISABLED)
     self.corpNameText = EveLabelMedium(text='',
                                        parent=self.corpNameCont,
                                        left=5,
                                        state=uiconst.UI_NORMAL)
     LineThemeColored(parent=self, align=uiconst.TOBOTTOM)
     self.buttonCnt = Container(parent=self,
                                align=uiconst.TOTOP,
                                height=25,
                                state=uiconst.UI_PICKCHILDREN)
     self.buttonCnt.display = False
     self.infoicon = InfoIcon(left=32, top=3, parent=leftCont, idx=0)
 def ConstructLayout(self):
     if not self.jobData:
         return
     if self.jobData.status == industry.STATUS_READY:
         self.deliverBtn = Button(
             name='deliverBtn',
             parent=self,
             align=uiconst.TOALL,
             label='<b>' + localization.GetByLabel('UI/Industry/Deliver'),
             func=self.OnDeliverBtn,
             padding=2)
         self.deliverBtn.width = self.deliverBtn.height = 0
         self.deliverBtn.Blink(time=3000)
         self.Enable()
     else:
         self.Disable()
         gaugeCont = ContainerAutoSize(name='gaugeCont',
                                       parent=self,
                                       align=uiconst.TOBOTTOM)
         mainCont = Container(name='mainCont', parent=self)
         self.deliverBtn = None
         self.valueLabel = EveLabelMedium(parent=mainCont,
                                          align=uiconst.CENTERLEFT,
                                          left=4)
     if self.jobData.status == industry.STATUS_INSTALLED:
         color = industryUIConst.COLOR_MANUFACTURING if self.jobData.activityID == industry.MANUFACTURING else industryUIConst.COLOR_SCIENCE
         self.gauge = Gauge(parent=gaugeCont,
                            align=uiconst.TOTOP,
                            state=uiconst.UI_DISABLED,
                            color=color,
                            height=6,
                            gaugeHeight=6,
                            padTop=1,
                            backgroundColor=(1.0, 1.0, 1.0, 0.05))