Пример #1
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     self.groupNameLabel = EveCaptionSmall(name='groupName',
                                           parent=self,
                                           padLeft=10,
                                           align=uiconst.TOTOP)
     self.groupDescLabel = EveLabelLarge(name='groupDescLabel',
                                         parent=self,
                                         padLeft=10,
                                         align=uiconst.TOTOP)
Пример #2
0
 def ApplyAttributes(self, attributes):
     MouseInsideScrollEntry.ApplyAttributes(self, attributes)
     node = attributes.node
     self.controller = node.controller
     isNormal = node.isNormal
     self.groupID = node.groupInfo.groupID
     self.ChangeSignalConnection(connect=True)
     self.ConstructHiliteFill()
     membershipType = node.groupInfo.membershipType
     if membershipType == MEMBERSHIP_TYPE_ADMIN:
         fillOpacity = ADMIN_OPACITY
     else:
         fillOpacity = OTHER_MEMBERSHIPTYPE_OPACITY
     self.bgFill = FillThemeColored(
         name='bgFill',
         bgParent=self,
         padding=(1, 1, 1, 1),
         colorType=uiconst.COLORTYPE_UIBASECONTRAST,
         opacity=fillOpacity)
     self.groupNameLabel = EveLabelLarge(name='groupName',
                                         parent=self,
                                         left=10,
                                         align=uiconst.CENTERLEFT)
     texturePath = 'res:/UI/Texture/Icons/73_16_50.png'
     self.optionIcon = ButtonIcon(name='MyButtonIcon',
                                  parent=self,
                                  align=uiconst.TOPRIGHT,
                                  pos=(2, 2, 16, 16),
                                  iconSize=16,
                                  texturePath=texturePath,
                                  func=self.OnClickOption)
     self.optionIcon.opacity = 0.0
     if not isNormal:
         self.opacity = 0.1
Пример #3
0
 def LoadPanel(self):
     if self.isInitialized:
         self.UpdateScroll()
         return
     self.topPanel = Container(name='topPanel',
                               parent=self,
                               align=uiconst.TOTOP,
                               height=20,
                               padding=(0, 6, 0, 6))
     self.profilaNameLabel = EveLabelLarge(text='',
                                           parent=self.topPanel,
                                           state=uiconst.UI_DISABLED,
                                           align=uiconst.TOPLEFT,
                                           top=2)
     self.scroll = Scroll(parent=self, id='MyStructuresScroll')
     self.scroll.sr.fixedColumns = StructureEntryMyCorp.GetFixedColumns()
     self.scroll.OnSelectionChange = self.OnScrollSelectionChange
     self.scroll.GetTabStops = self.GetTabStops
     self.filterEdit = QuickFilterEdit(
         name='searchField',
         parent=self.topPanel,
         hinttext=GetByLabel('UI/Inventory/Filter'),
         maxLength=64,
         align=uiconst.TORIGHT,
         OnClearFilter=self.OnFilterEditCleared,
         padRight=4)
     self.filterEdit.ReloadFunction = self.OnFilterEdit
     self.UpdateScroll()
     self.isInitialized = True
Пример #4
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     grid = LayoutGrid(parent=self, columns=2)
     self.auraSprite = Sprite(pos=(14, 0, 80, 80), texturePath='res:/UI/Texture/classes/achievements/auraAlpha.png')
     grid.AddCell(self.auraSprite, rowSpan=2)
     header = EveLabelLarge(parent=grid, text='Welcome!', top=16)
     message = EveLabelMedium(parent=grid, text='Welcome blurb', width=300)
Пример #5
0
 def LoadTooltip(self, header, description, on_continue, on_quit):
     self.AddCell(EveLabelLarge(text=header,
                                state=uiconst.UI_DISABLED,
                                width=250),
                  width=250)
     self.AddCell(uicontrols.ButtonIcon(
         texturePath='res:/UI/Texture/icons/38_16_220.png',
         iconSize=16,
         width=16,
         height=16,
         func=on_quit),
                  margin=(0, 0, 0, 0))
     self.AddCell(Fill(align=uiconst.TOTOP,
                       state=uiconst.UI_DISABLED,
                       color=(1, 1, 1, 0.3),
                       height=1,
                       padding=(0, 3, 0, 3)),
                  colSpan=self.columns)
     self.AddCell(EveLabelMedium(text=description,
                                 state=uiconst.UI_DISABLED,
                                 width=250),
                  width=250,
                  colSpan=self.columns)
     self.AddCell(uicontrols.Button(label=localization.GetByLabel(
         'UI/ProjectDiscovery/TutorialContinueButtonLabel'),
                                    align=uiconst.CENTER,
                                    func=lambda _: on_continue()),
                  colSpan=self.columns)
Пример #6
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     self.jobData = None
     self.updateTimeThread = None
     self.timeCaption = IndustryCaptionLabel(name='timeCaption', parent=self)
     self.timeLabel = EveLabelLarge(name='timeLabel', parent=self, top=13)
     self.errorFrame = ErrorFrame(bgParent=self, padding=(-2, -2, 0, -2))
Пример #7
0
class NameAndDescCont(Container):
    MAX_DESC_HEIGHT = 100

    def ApplyAttributes(self, attributes):
        Container.ApplyAttributes(self, attributes)
        self.groupNameLabel = EveCaptionSmall(name='groupName',
                                              parent=self,
                                              padLeft=10,
                                              align=uiconst.TOTOP)
        self.groupDescLabel = EveLabelLarge(name='groupDescLabel',
                                            parent=self,
                                            padLeft=10,
                                            align=uiconst.TOTOP)

    def SetNameAndDescription(self, name, description):
        self.groupNameLabel.text = name
        self.groupDescLabel.text = description
        if description:
            self.groupDescLabel.display = True
        else:
            self.groupDescLabel.display = False

    def UpdateAlignment(self, *args, **kwds):
        retVal = Container.UpdateAlignment(self, *args, **kwds)
        if getattr(self, 'groupNameLabel', None) and getattr(
                self, 'groupDescLabel', None):
            self.groupDescLabel.SetBottomAlphaFade(self.MAX_DESC_HEIGHT, 10)
            newHeight = self.groupNameLabel.height + min(
                self.MAX_DESC_HEIGHT, self.groupDescLabel.textheight) + 4
            self.height = newHeight
        return retVal
Пример #8
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)
Пример #9
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)
Пример #10
0
 def BuildNumToFitUI(self):
     maxShipsAllowed = int(
         sm.GetService('machoNet').GetGlobalConfig().get(
             'bulkFit_maxShips', 30))
     numCont = Container(name='numCont',
                         align=uiconst.TOTOP,
                         height=30,
                         padLeft=LEFT_EDGE)
     text = GetByLabel(
         'UI/Fitting/FittingWindow/FittingManagement/NumShipsToFit')
     self.numToFitLabel = EveLabelLarge(name='numToFitLabel',
                                        parent=numCont,
                                        text=text,
                                        width=250,
                                        autoFitToText=True)
     left = self.numToFitLabel.left + self.numToFitLabel.textwidth + 10
     self.numToFitEdit = SinglelineEdit(name='numToFitEdit',
                                        parent=numCont,
                                        ints=[1, maxShipsAllowed],
                                        OnChange=self.OnNumChanged,
                                        left=left,
                                        align=uiconst.CENTERLEFT)
     numCont.height = max(self.numToFitLabel.textheight,
                          self.numToFitEdit.height)
     self.layoutGrid.AddCell(cellObject=numCont,
                             colSpan=self.layoutGrid.columns)
 def ConstructLayout(self):
     headerContainer = Container(parent=self,
                                 align=uiconst.TOTOP,
                                 height=28,
                                 padTop=4,
                                 padBottom=6)
     self.groupName = EveLabelLarge(parent=headerContainer,
                                    align=uiconst.CENTERLEFT,
                                    left=8)
     Frame(texturePath=
           'res:/UI/Texture/classes/Achievements/pointRightHeaderFrame.png',
           cornerSize=16,
           offset=-14,
           parent=headerContainer,
           color=(1, 1, 1, 0.25),
           align=uiconst.TOALL)
     progressClipper = Container(parent=headerContainer,
                                 align=uiconst.TOALL,
                                 clipChildren=True,
                                 padRight=-POINTER_PADRIGHT)
     self.progress = Frame(
         texturePath=
         'res:/UI/Texture/classes/Achievements/pointRightHeaderBackground.png',
         cornerSize=15,
         offset=-13,
         parent=progressClipper,
         color=(1, 1, 1, 0.25))
     self.progress.padRight = 400
     self.progress.opacity = 0.0
     self.tasksContainer = ContainerAutoSize(parent=self,
                                             name='tasksContainer',
                                             align=uiconst.TOTOP,
                                             state=uiconst.UI_NORMAL)
Пример #12
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)
Пример #13
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()
Пример #14
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     self.jobData = None
     self.costCaption = IndustryCaptionLabel(name='costCaption', parent=self, align=uiconst.TOTOP, text=GetByLabel('UI/Industry/JobCost'))
     textCont = Container(parent=self)
     self.walletCombo = Combo(parent=textCont, align=uiconst.TOLEFT, state=uiconst.UI_HIDDEN, callback=self.OnWalletCombo, iconOnly=True, width=33, top=1)
     self.walletCombo.GetHint = self.GetWalletComboHint
     self.costLabel = EveLabelLarge(name='costLabel', parent=textCont, align=uiconst.TOTOP, padLeft=4)
     self.errorFrame = ErrorFrame(bgParent=self, padding=(0, -2, 0, -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))
Пример #16
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     self.controller = attributes.controller
     self.btnUnderlay = RaisedUnderlay(bgParent=self,
                                       isGlowEdgeRotated=True)
     self.createBtn = ButtonIcon(name='addBtn',
                                 parent=self,
                                 align=uiconst.CENTERLEFT,
                                 pos=(0, 0, 30, 30),
                                 iconSize=self.iconSize,
                                 texturePath=self.texturePath,
                                 hint=GetByLabel(self.tooltipPath),
                                 state=uiconst.UI_DISABLED)
     self.createNewLabel = EveLabelLarge(name='createNewLabel',
                                         parent=self,
                                         text='',
                                         align=uiconst.CENTERLEFT,
                                         left=34)
Пример #17
0
 def BuildExplanationStep(self):
     text = GetByLabel('UI/Structures/Deployment/IntroHeader')
     EveLabelLarge(parent=self.explanationCont,
                   text=text,
                   align=uiconst.TOTOP,
                   padLeft=20,
                   padTop=8)
     text = GetByLabel('UI/Structures/Deployment/DeploymentSteps')
     EveLabelMedium(parent=self.explanationCont,
                    text=text,
                    align=uiconst.TOTOP,
                    padLeft=30)
     self.height = self.GetExplanationHeight()
     isEnabled = True
     entity = sm.GetService('structureDeployment').GetEntity()
     if entity and not entity.IsValidLocation():
         isEnabled = False
     self.structureDeploymentCont.SetPositionEnabledState(isEnabled)
Пример #18
0
 def BuildEquipmentUI(self):
     self.equipmentCounter = EveCaptionMedium(name='equipmentCounter',
                                              parent=self.missingLayoutGrid,
                                              state=uiconst.UI_NORMAL,
                                              align=uiconst.CENTERRIGHT,
                                              left=4)
     self.equipmentCounter.LoadTooltipPanel = self.LoadEqCounterTooltipPanel
     self.equipmentCounter.missingDict = {}
     eqText = GetByLabel(
         'UI/Fitting/FittingWindow/FittingManagement/RoundsOfFittingsInHangar'
     )
     self.availableEquipmentLabel = EveLabelLarge(
         name='availableEquipmentLabel',
         parent=self.missingLayoutGrid,
         state=uiconst.UI_NORMAL,
         text=eqText,
         align=uiconst.CENTERLEFT,
         width=MAX_TEXT_WIDTH,
         autoFitToText=True)
     self.layoutGrid.FillRow()
Пример #19
0
 def BuildAvailableShipsUI(self):
     self.shipCounter = EveCaptionMedium(name='shipCounter',
                                         parent=self.missingLayoutGrid,
                                         state=uiconst.UI_NORMAL,
                                         align=uiconst.CENTERRIGHT,
                                         left=4)
     self.shipCounter.LoadTooltipPanel = self.LoadShipCounterTooltipPanel
     self.shipCounter.missingDict = {}
     shipText = GetByLabel(
         'UI/Fitting/FittingWindow/FittingManagement/PackagedShipsInHangar')
     self.availableShipsLabel = EveLabelLarge(name='availableShipsLabel',
                                              parent=self.missingLayoutGrid,
                                              state=uiconst.UI_NORMAL,
                                              text=shipText,
                                              align=uiconst.CENTERLEFT,
                                              width=MAX_TEXT_WIDTH,
                                              autoFitToText=True)
     self.availableShipsLabel.hint = GetByLabel(
         'UI/Fitting/FittingWindow/FittingManagement/PackagedShipsInHangarHint'
     )
     self.layoutGrid.FillRow()
Пример #20
0
 def ConstructLayout(self):
     headerContainer = Container(parent=self,
                                 align=uiconst.TOTOP,
                                 height=28,
                                 padTop=4,
                                 padBottom=6)
     self.groupName = EveLabelLarge(parent=headerContainer,
                                    align=uiconst.CENTERLEFT,
                                    left=8)
     self.rewardAmount = themeColored.LabelThemeColored(
         parent=headerContainer,
         align=uiconst.CENTERRIGHT,
         left=8,
         state=uiconst.UI_NORMAL)
     self.rewardAmountThemeColor = self.rewardAmount.color.GetRGBA()
     Frame(texturePath=POINT_RIGHT_HEADER_FRAME_TEXTURE_PATH,
           cornerSize=16,
           offset=-14,
           parent=headerContainer,
           color=POINT_RIGHT_HEADER_COLOR,
           align=uiconst.TOALL)
     progressClipper = Container(parent=headerContainer,
                                 align=uiconst.TOALL,
                                 clipChildren=True,
                                 padRight=-POINTER_PADRIGHT)
     self.progress = Frame(
         texturePath=POINT_RIGHT_HEADER_BACKGROUND_TEXTURE_PATH,
         cornerSize=15,
         offset=-13,
         parent=progressClipper,
         color=POINT_RIGHT_HEADER_COLOR)
     self.progress.padRight = 400
     self.progress.opacity = 0.0
     self.tasksContainer = ContainerAutoSize(parent=self,
                                             name='tasksContainer',
                                             align=uiconst.TOTOP,
                                             state=uiconst.UI_NORMAL)
Пример #21
0
 def ConstructUI(self, flush=True):
     self.Flush()
     profileID = self.structureBrowserController.GetSelectedProfileID()
     if profileID == ALL_PROFILES:
         return
     btnCont = Container(parent=self,
                         idx=0,
                         height=32,
                         align=uiconst.TOBOTTOM)
     LineThemeColored(parent=btnCont,
                      colorType=uiconst.COLORTYPE_UIHILIGHT,
                      align=uiconst.TOTOP)
     self.saveBtn = Button(parent=btnCont,
                           label=GetByLabel('UI/Common/Buttons/Save'),
                           func=self.SaveProfile,
                           align=uiconst.CENTERRIGHT)
     self.mainCont = Container(name='mainCont',
                               parent=self,
                               padding=(0, 4, 4, 4))
     self.categoryListCont = ServiceListCont(
         name='groupListCont',
         parent=self.mainCont,
         structureBrowserController=self.structureBrowserController)
     profileName = self.structureProfileController.GetProfileName()
     EveLabelLarge(text=profileName,
                   parent=self.mainCont,
                   state=uiconst.UI_DISABLED,
                   align=uiconst.TOTOP,
                   top=4,
                   padBottom=5)
     self.categoryCont = SettingsCategoryCont(
         name='categoryCont',
         parent=self.mainCont,
         padding=(0, 2, 0, 2),
         structureBrowserController=self.structureBrowserController,
         structureProfileController=self.structureProfileController)
Пример #22
0
 def ApplyAttributes(self, attributes):
     Window.ApplyAttributes(self, attributes)
     self.SetTopparentHeight(0)
     self.bountyEscrow = attributes.bountyEscrow
     self.bountyAmount = attributes.bountyAmount
     self.component = attributes.component
     factionResPath = FACTIONPATHBYESSTYPEID[attributes.ESSTypeID]
     navyID = CORPIDBYFACTIONID[attributes.ESSTypeID]
     self.SetCaption(GetByLabel(CAPTIONBYESSTYPEID[attributes.ESSTypeID]))
     self.myContribution = 0
     self.amountInTags = 0
     mainCont = Container(name='mainCont',
                          parent=self.sr.main,
                          padding=const.defaultPadding)
     iconCont = Container(name='iconCont',
                          parent=mainCont,
                          align=uiconst.TOTOP,
                          height=64)
     headerCont = Container(name='headerCont',
                            parent=mainCont,
                            align=uiconst.TOTOP,
                            height=54,
                            padBottom=6)
     buttonsCont = Container(name='buttonsCont',
                             parent=mainCont,
                             align=uiconst.TOBOTTOM,
                             height=80,
                             padTop=4,
                             padBottom=4)
     listCont = Container(name='listCont',
                          parent=mainCont,
                          align=uiconst.TOALL,
                          padBottom=14)
     factionLogo = Sprite(parent=iconCont,
                          align=uiconst.CENTERTOP,
                          width=64,
                          height=64,
                          texturePath=factionResPath)
     factionLogo.hint = cfg.eveowners.Get(navyID).name
     factionLogo.OnClick = (self.OpenNavyInfo, navyID)
     EveLabelLarge(text=GetByLabel('UI/Inflight/Brackets/TotalBounty'),
                   parent=headerCont,
                   maxLines=1,
                   align=uiconst.CENTERTOP)
     EveCaptionMedium(text=FmtISK(self.bountyAmount, 0),
                      parent=headerCont,
                      maxLines=1,
                      align=uiconst.CENTERTOP,
                      state=uiconst.UI_NORMAL,
                      top=16)
     contributorsCont = Container(name='contributorsCont',
                                  parent=listCont,
                                  align=uiconst.TOLEFT_PROP,
                                  width=0.45)
     self.tagsCont = Container(name='tagsCont',
                               parent=listCont,
                               align=uiconst.TORIGHT_PROP,
                               width=0.45)
     topSpaceCont = Container(name='topSpaceCont',
                              parent=listCont,
                              align=uiconst.TOALL)
     self.contributersList = ScrollContainer(name='contributersList',
                                             parent=contributorsCont,
                                             align=uiconst.TOALL)
     shareCont = Container(name='shareCont',
                           parent=buttonsCont,
                           align=uiconst.TOLEFT_PROP,
                           width=0.45)
     takeCont = Container(name='takeCont',
                          parent=buttonsCont,
                          align=uiconst.TORIGHT_PROP,
                          width=0.45)
     spaceCont = Container(name='spaceCont',
                           parent=buttonsCont,
                           align=uiconst.TOALL)
     youGetLabel = EveLabelMedium(
         text=GetByLabel('UI/Inflight/Brackets/YouGet'),
         parent=shareCont,
         align=uiconst.CENTERTOP,
         top=1)
     myContribLabel = EveLabelLargeBold(text='',
                                        parent=shareCont,
                                        align=uiconst.CENTERTOP,
                                        top=16)
     shareLabel = EveLabelSmall(
         text=GetByLabel('UI/Inflight/Brackets/EveryoneGetsTheirShare'),
         parent=shareCont,
         align=uiconst.CENTERBOTTOM)
     shareBtn = Button(parent=shareCont,
                       label=GetByLabel('UI/Inflight/Brackets/Share'),
                       align=uiconst.TOBOTTOM,
                       top=20,
                       func=self.ShareContribution)
     orLabel = EveLabelLargeBold(text=GetByLabel('UI/Inflight/Brackets/Or'),
                                 parent=spaceCont,
                                 align=uiconst.CENTER,
                                 top=10)
     amountInTagsLabel = EveLabelLarge(text=GetByLabel(
         'UI/Inflight/Brackets/AmountInTags', amount=FmtISK(0, 0)),
                                       parent=takeCont,
                                       align=uiconst.CENTERTOP,
                                       top=16)
     takeLabel = EveLabelSmall(
         text=GetByLabel('UI/Inflight/Brackets/OthersGetNothing'),
         parent=takeCont,
         align=uiconst.CENTERBOTTOM)
     takeAllBtn = Button(parent=takeCont,
                         label=GetByLabel('UI/Inflight/Brackets/TakeAll'),
                         align=uiconst.TOBOTTOM,
                         top=20,
                         func=self.TakeAll)
     self.LoadContributions(attributes.contributions)
     myContribLabel.SetText(FmtISK(self.myContribution, 0))
     self.LoadTags()
     amountInTagsLabel.SetText(
         GetByLabel('UI/Inflight/Brackets/AmountInTags',
                    amount=FmtISK(self.amountInTags, 0)))
Пример #23
0
 def Layout(self):
     """
     Setup UI controls for this window.
     """
     self.HideHeader()
     self.MakeUnResizeable()
     self.container = ContainerAutoSize(parent=self.GetMainArea(),
                                        align=uiconst.TOTOP,
                                        alignMode=uiconst.TOTOP,
                                        state=uiconst.UI_PICKCHILDREN,
                                        callback=self.OnContainerResized)
     headerCont = ContainerAutoSize(parent=self.container,
                                    align=uiconst.TOTOP)
     EveCaptionMedium(parent=headerCont,
                      align=uiconst.CENTERTOP,
                      text=localization.GetByLabel('UI/TrialUpsell/Header'),
                      padding=(0, 8, 0, 4))
     LineUnderlay(parent=self.container,
                  align=uiconst.TOTOP,
                  padding=(2, 0, 2, 0))
     bodyCont = ContainerAutoSize(parent=self.container,
                                  align=uiconst.TOTOP,
                                  alignMode=uiconst.TOTOP)
     mainCont = ContainerAutoSize(parent=bodyCont,
                                  align=uiconst.TOTOP,
                                  alignMode=uiconst.TOTOP)
     GradientSprite(bgParent=bodyCont,
                    rgbData=[(0, (0.138, 0.138, 0.08)),
                             (0.6, (0.06, 0.06, 0.06)),
                             (1.0, (0.1, 0.1, 0.1))],
                    alphaData=[(0.0, 0.8), (1.0, 0.2)],
                    alphaInterp=GradientConst.INTERP_LINEAR,
                    colorInterp=GradientConst.INTERP_LINEAR,
                    rotation=-math.pi / 2,
                    padding=(2, 0, 2, 2))
     EveLabelLarge(parent=mainCont,
                   align=uiconst.TOTOP,
                   text=localization.GetByLabel('UI/TrialUpsell/Greeting'),
                   padding=(160, 18, 20, 8))
     EveLabelLarge(parent=mainCont,
                   align=uiconst.TOTOP,
                   text=self.message
                   or localization.GetByLabel('UI/TrialUpsell/DefaultBody'),
                   padding=(160, 0, 20, 8))
     EveLabelLarge(parent=mainCont,
                   align=uiconst.TOTOP,
                   text=localization.GetByLabel('UI/TrialUpsell/Footer'),
                   padding=(160, 0, 20, 16))
     trialDays = sm.RemoteSvc('userSvc').GetTrialDaysRemaining()
     EveLabelLarge(parent=mainCont,
                   align=uiconst.TOTOP,
                   text=localization.GetByLabel(
                       'UI/TrialUpsell/TrialTimeLeft',
                       daysLeft=trialDays.daysLeft,
                       daysTotal=trialDays.trialLen),
                   color=(0.8, 0.6, 0.2, 0.8),
                   padding=(160, 0, 20, 8))
     self.iconGlow = Sprite(
         parent=mainCont,
         align=uiconst.CENTERLEFT,
         state=uiconst.UI_DISABLED,
         texturePath=
         'res:/UI/Texture/classes/Monetization/Trial_Icon_Glow_256.png',
         left=-20,
         width=200,
         height=200)
     Sprite(
         parent=mainCont,
         align=uiconst.CENTERLEFT,
         state=uiconst.UI_DISABLED,
         texturePath=
         'res:/UI/Texture/classes/Monetization/Trial_Icon_NoGlow_256.png',
         left=-20,
         width=200,
         height=200)
     self.iconGlare1 = Sprite(
         parent=mainCont,
         align=uiconst.CENTERLEFT,
         state=uiconst.UI_DISABLED,
         texturePath='res:/UI/Texture/classes/Monetization/glare_256_1.png',
         textureSecondaryPath=
         'res:/UI/Texture/classes/Monetization/Trial_Icon_NoGlow_256.png',
         spriteEffect=trinity.TR2_SFX_MODULATE,
         blendMode=trinity.TR2_SBM_ADDX2,
         left=-20,
         width=200,
         height=200,
         tileX=True,
         tileY=True)
     self.iconGlare2 = Sprite(
         parent=mainCont,
         align=uiconst.CENTERLEFT,
         state=uiconst.UI_DISABLED,
         texturePath='res:/UI/Texture/classes/Monetization/glare_256_2.png',
         textureSecondaryPath=
         'res:/UI/Texture/classes/Monetization/Trial_Icon_NoGlow_256.png',
         spriteEffect=trinity.TR2_SFX_MODULATE,
         left=-20,
         width=200,
         height=200,
         tileX=True,
         tileY=True)
     buttonCont = FlowContainer(parent=bodyCont,
                                align=uiconst.TOTOP,
                                centerContent=True,
                                contentSpacing=(4, 4),
                                padding=(8, 16, 8, 16))
     closeButton = Button(
         parent=buttonCont,
         align=uiconst.NOALIGN,
         fixedheight=26,
         label=localization.GetByLabel('UI/TrialUpsell/ButtonClose'),
         fontsize=12,
         func=lambda _: self.Close(),
         color=(0.2, 0.2, 0.2, 1.0))
     closeButton.sr.activeframe.SetFixedColor((0.6, 0.6, 0.6, 1.0))
     moreButton = Button(
         parent=buttonCont,
         align=uiconst.NOALIGN,
         fixedheight=26,
         label=localization.GetByLabel('UI/TrialUpsell/ButtonSubscribe'),
         fontsize=14,
         func=lambda _: self.OpenSubscriptionPage(),
         color=(0.8, 0.6, 0.2, 0.6))
     moreButton.sr.activeframe.SetFixedColor((0.9, 0.9, 0.9, 1.0))
     self.Animate()
Пример #24
0
 def LoadOptions(self):
     PrimeMapData()
     self.objectIDs = sorted(uicore.mapObjectDataByID.keys())
     main = self.GetMainArea()
     main.clipChildren = True
     main.padding = 6
     lg = LayoutGrid(parent=main,
                     columns=3,
                     cellPadding=2,
                     align=uiconst.TOTOP)
     self.objectLabel = EveLabelLarge(bold=True)
     lg.AddCell(self.objectLabel, colSpan=lg.columns - 1)
     self.inputEdit = SinglelineEdit(OnReturn=self.OnInputConfirm,
                                     align=uiconst.TOPRIGHT)
     self.inputEdit.SetHistoryVisibility(True)
     lg.AddCell(self.inputEdit, colSpan=1)
     b = Button(func=self.BrowsePrev, label='Previous')
     lg.AddCell(b, colSpan=2)
     Button(parent=lg,
            func=self.BrowseNext,
            label='Next',
            align=uiconst.TOPRIGHT)
     lg.FillRow()
     lg.AddCell(Line(align=uiconst.TOTOP),
                colSpan=lg.columns,
                cellPadding=(0, 4, 0, 4))
     b = Button(func=self.BrowseNextLoop,
                label='Browse next loop',
                fixedwidth=240)
     lg.AddCell(b, colSpan=lg.columns)
     self.browseLoopButton = b
     settings.user.ui.Set('mapDebugViewRefreshLayout', 0)
     c = Checkbox(configName='mapDebugViewRefreshLayout',
                  text='Refresh layouts',
                  align=uiconst.TOPLEFT,
                  checked=settings.user.ui.Get('mapDebugViewRefreshLayout',
                                               0),
                  wrapLabel=False,
                  callback=self.OnCheckBoxChange)
     lg.AddCell(c, colSpan=lg.columns)
     c = Checkbox(configName='mapDebugViewStopOnErrors',
                  text='Stop on error',
                  align=uiconst.TOPLEFT,
                  checked=settings.user.ui.Get('mapDebugViewStopOnErrors',
                                               0),
                  wrapLabel=False,
                  callback=self.OnCheckBoxChange)
     lg.AddCell(c, colSpan=lg.columns)
     c = Checkbox(configName='mapDebugViewIgnoreFixed',
                  text='Ignore fixed layouts',
                  align=uiconst.TOPLEFT,
                  checked=settings.user.ui.Get('mapDebugViewIgnoreFixed',
                                               0),
                  wrapLabel=False,
                  callback=self.OnCheckBoxChange)
     lg.AddCell(c, colSpan=lg.columns)
     c = Checkbox(configName='mapDebugViewEditEnabled',
                  text='Editmode enabled',
                  align=uiconst.TOPLEFT,
                  checked=settings.user.ui.Get('mapDebugViewEditEnabled',
                                               0),
                  wrapLabel=False,
                  callback=self.OnCheckBoxChange)
     lg.AddCell(c, colSpan=lg.columns)
     c = Checkbox(configName='mapDebugSubdivision',
                  text='Show Grid Subdivision',
                  align=uiconst.TOPLEFT,
                  checked=settings.user.ui.Get('mapDebugSubdivision', 0),
                  wrapLabel=False,
                  callback=self.OnCheckBoxChange)
     lg.AddCell(c, colSpan=lg.columns)
     c = Checkbox(configName='mapLoadCombined',
                  text='Load Combined',
                  align=uiconst.TOPLEFT,
                  checked=settings.user.ui.Get('mapLoadCombined', 0),
                  wrapLabel=False,
                  callback=self.OnCheckBoxChange)
     lg.AddCell(c, colSpan=lg.columns)
     c = Checkbox(configName='mapDebugShowIDs',
                  text='Show IDs',
                  align=uiconst.TOPLEFT,
                  checked=settings.user.ui.Get('mapDebugShowIDs', 0),
                  wrapLabel=False,
                  callback=self.OnCheckBoxChange)
     lg.AddCell(c, colSpan=lg.columns)
     c = Checkbox(configName='mapDebugLoadHexLines',
                  text='Load Hex Lines',
                  align=uiconst.TOPLEFT,
                  checked=settings.user.ui.Get('mapDebugLoadHexLines', 0),
                  wrapLabel=False,
                  callback=self.OnCheckBoxChange)
     lg.AddCell(c, colSpan=lg.columns)
     c = Checkbox(configName='mapDebugShowExitPoints',
                  text='Show Exit Points',
                  align=uiconst.TOPLEFT,
                  checked=settings.user.ui.Get('mapDebugShowExitPoints', 0),
                  wrapLabel=False,
                  callback=self.OnCheckBoxChange)
     lg.AddCell(c, colSpan=lg.columns)
     lg.FillRow()
     lg.AddCell(Line(align=uiconst.TOTOP),
                colSpan=lg.columns,
                cellPadding=(0, 4, 0, 4))
     b = Button(func=self.ScanCurrent, label='Scan Current', fixedwidth=240)
     lg.AddCell(b, colSpan=lg.columns)
     b = Button(func=self.AutoFitSize, label='Auto Fit', fixedwidth=240)
     lg.AddCell(b, colSpan=lg.columns)
     self.statsLabel = EveLabelMedium(parent=lg)
     lg.FillRow()
     self.clipRect = Container(parent=uicore.layer.main,
                               align=uiconst.CENTER,
                               width=800,
                               height=600,
                               clipChildren=True)
     Frame(bgParent=self.clipRect)
     Fill(bgParent=self.clipRect, color=(0, 0, 0, 1))
     self.LoadObjectID(loadObjectID=10000001)
Пример #25
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     headerInfoDict = attributes.headerInfo
     text = headerInfoDict['groupName']
     textLabel = EveLabelLarge(parent=self, text=text, align=uiconst.CENTER)
     self.width = textLabel.textwidth + self.sidePadding