示例#1
0
 def ApplyAttributes(self, attributes):
     Window.ApplyAttributes(self, attributes)
     self.fleetSvc = attributes.fleetSvc
     self.SetTopparentHeight(0)
     self.SetCaption(
         localization.GetByLabel('UI/Fleet/FleetWindow/SetupsOverview'))
     self.scroll = uicls.ScrollContainer(parent=self.sr.main, padding=4)
     self.LoadSetups()
示例#2
0
文件: base_fw.py 项目: R4M80MrX/eve-1
 def ConstructRulesPanel(self):
     self.rulesPanel.Flush()
     scrollCont = uicls.ScrollContainer(parent=self.rulesPanel)
     uicls.Label(parent=scrollCont,
                 align=uiconst.TOTOP,
                 text=localization.GetByLabel(
                     'UI/FactionWarfare/RulesOfEngagementText'),
                 padding=4)
示例#3
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     self.clipChildren = True
     self.tokenSize = attributes.get('tokenSize', self.default_tokenSize)
     self.dragEnabled = attributes.get('dragEnabled', self.default_dragEnabled)
     self.instructionText = attributes.get('instructionText', self.default_instructionText)
     self.containerWidth = attributes.get('containerWidth', 0)
     self.textColor = attributes.get('textColor', redeemColors.TEXT_COLOR)
     self.minimizeTokens = attributes.get('minimizeTokens', self.default_minimizeTokens)
     self.expandedHeight = self.GetTokenHeight() + self.GetInstructionHeight()
     c = Container(parent=self, name='tokenContainerParent', height=self.expandedHeight, align=uiconst.TOTOP)
     self.tokenContainer = uicls.ScrollContainer(parent=c, name='tokenScrollContainer', height=self.GetTokenHeight(), align=uiconst.CENTERTOP)
     if self.instructionText:
         self.bottomContent = Container(parent=c, name='bottomBorder', align=uiconst.TOBOTTOM, height=DRAG_TEXT_CONTAINER_HEIGHT)
         self.instructionLabel = uicontrols.EveLabelMedium(parent=self.bottomContent, name='instructionLabel', align=uiconst.CENTER, padLeft=4, padTop=3, text=self.instructionText, color=self.textColor, opacity=0.8, state=uiconst.UI_NORMAL)
     self.tokens = {}
     self.allTokens = {}
示例#4
0
 def ApplyAttributes(self, attributes):
     uicls.ContainerAutoSize.ApplyAttributes(self, attributes)
     self.parentTimer = attributes.get('parentTimer')
     self.timerData = attributes.get('timerData')
     self.GetTime = self.timerData.timerFunc
     self.doUpdates = True
     uicls.Frame(bgParent=self,
                 state=uiconst.UI_DISABLED,
                 color=(1.0, 1.0, 1.0, 0.25))
     self.mainText = uicls.EveLabelMedium(parent=self,
                                          align=uiconst.TOTOP,
                                          text='',
                                          padding=(8, 8, 8, 8),
                                          state=uiconst.UI_DISABLED)
     self.engagementsContainer = uicls.ScrollContainer(parent=self,
                                                       align=uiconst.TOTOP)
     self.LoadData()
     uthread.new(self.UpdateTimer)
     sm.RegisterNotify(self)
示例#5
0
 def Test(cls):
     uicls.Window.CloseIfOpen(windowID='LayoutGrid')
     wnd = uicls.Window.Open(windowID='LayoutGrid')
     wnd.SetTopparentHeight(0)
     main = wnd.GetMainArea()
     wnd._scrollContainer = uicls.ScrollContainer(parent=main, padding=4)
     wnd._scrollContainer.verticalScrollBar.align = uiconst.TORIGHT_NOPUSH
     wnd._scrollContainer.horizontalScrollBar.align = uiconst.TOBOTTOM_NOPUSH
     grid = uicls.LayoutGrid(parent=wnd._scrollContainer,
                             align=uiconst.TOTOP,
                             name='LayoutGrid',
                             state=uiconst.UI_NORMAL,
                             columns=5,
                             cellPadding=12,
                             cellSpacing=16,
                             cellBgColor=(1, 1, 1, 0.1))
     lorem = u'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque rutrum neque ut metus pharetra malesuada. Vivamus mollis vulputate ornare. Quisque condimentum interdum arcu, nec pellentesque tellus venenatis non. Fusce nec feugiat libero. Nulla non velit felis. Morbi accumsan interdum erat sodales egestas. In mauris lorem, cursus et posuere sit amet, aliquet sit amet turpis. Maecenas tincidunt fringilla congue. Maecenas eu nibh quis mauris placerat vulputate. Curabitur condimentum arcu ut dui aliquet quis blandit ligula consectetur. Morbi consectetur egestas tortor, ut interdum nibh viverra id. Proin mattis eleifend dignissim. In eget laoreet nisl. '
     grid.SetColumnWidth(1, COLUMN_WIDTH_FILL)
     grid.SetColumnWidth(2, COLUMN_WIDTH_FILL)
     grid.AddCell(cellObject=uicls.Button(label='Bless',
                                          align=uiconst.CENTER),
                  rowSpan=2)
     t = uicls.EveLabelMedium(text=lorem, align=uiconst.TOTOP)
     grid.AddCell(cellObject=t, colSpan=3, rowSpan=3)
     grid.AddCell()
     uicls.Button(label='Hallo', parent=grid)
     uicls.SinglelineEdit(align=uiconst.TOPLEFT, parent=grid)
     grid.AddCell()
     grid.AddCell(bgColor=(1, 0, 0, 0.25))
     uicls.Button(label='Bless', align=uiconst.CENTER, parent=grid)
     t = uicls.EveLabelMedium(
         text='Quisque rutrum neque ut metus pharetra malesuada',
         align=uiconst.TOTOP)
     grid.AddCell(cellObject=t, bgColor=(0, 0, 1, 0.25))
     grid.AddCell()
     uicls.EveLabelMedium(text='Vivamus mollis vulputate ornare',
                          align=uiconst.TOTOP,
                          parent=grid)
     return grid
示例#6
0
    def ApplyAttributes(self, attributes):
        uicontrols.Window.ApplyAttributes(self, attributes)
        self.MakeUnMinimizable()
        self.MakeUncollapseable()
        filter = attributes.get('filter', None)
        if filter:
            self.name, self.allOrAny, conditions = filter
            self.originalName = self.name
        else:
            self.name = ''
            self.allOrAny = RESULT_ALL
            conditions = None
            self.originalName = None
        self.entryCont = uicls.ScrollContainer(name='entryCont',
                                               parent=self.sr.main,
                                               align=uiconst.TOALL,
                                               padding=(10, 10, 10, 0))
        bottomPar = uiprimitives.Container(name='bottomPar',
                                           parent=self.sr.main,
                                           align=uiconst.TOBOTTOM,
                                           height=75,
                                           idx=0)
        uicontrols.GradientSprite(bgParent=bottomPar,
                                  rotation=-pi / 2,
                                  rgbData=[(0, (0.3, 0.3, 0.3))],
                                  alphaData=[(0, 0.3), (0.9, 0.0)])
        uiprimitives.Line(parent=bottomPar,
                          align=uiconst.TOTOP,
                          color=(0.3, 0.3, 0.3, 0.3))
        buttonCont1 = uicontrols.ContainerAutoSize(name='bottomCont1',
                                                   parent=bottomPar,
                                                   align=uiconst.CENTERTOP,
                                                   top=20,
                                                   height=20)
        buttonCont2 = uicontrols.ContainerAutoSize(name='bottomCont2',
                                                   parent=bottomPar,
                                                   align=uiconst.CENTERTOP,
                                                   top=50,
                                                   height=20)
        uicontrols.EveLabelSmall(
            parent=uiprimitives.Container(align=uiconst.TOLEFT,
                                          parent=buttonCont1,
                                          width=1),
            left=3,
            top=-14,
            text=localization.GetByLabel('UI/Inventory/Filters/Match'))
        uicontrols.Checkbox(
            parent=buttonCont1,
            text=localization.GetByLabel('UI/Inventory/Filters/All'),
            wrapLabel=False,
            groupname='allOrAny',
            align=uiconst.TOLEFT,
            checked=self.allOrAny == RESULT_ALL,
            callback=self.OnRadioButtonsChanged,
            retval=RESULT_ALL)
        self.radiButtons = uicontrols.Checkbox(
            parent=buttonCont1,
            text=localization.GetByLabel('UI/Inventory/Filters/Any'),
            wrapLabel=False,
            groupname='allOrAny',
            align=uiconst.TOLEFT,
            checked=self.allOrAny == RESULT_ANY,
            callback=self.OnRadioButtonsChanged,
            retval=RESULT_ANY)
        self.nameEdit = uicontrols.SinglelineEdit(
            name='nameEdit',
            parent=buttonCont1,
            align=uiconst.TOLEFT,
            label=localization.GetByLabel('UI/Inventory/Filters/FilterName'),
            width=120,
            padLeft=20,
            setvalue=self.name)
        uicontrols.Button(
            label=localization.GetByLabel('UI/Common/Buttons/Save'),
            parent=buttonCont2,
            align=uiconst.TOLEFT,
            func=self.Save,
            padLeft=4)
        uicontrols.Button(
            label=localization.GetByLabel('UI/Common/Buttons/Close'),
            parent=buttonCont2,
            align=uiconst.TOLEFT,
            func=self.Close,
            padLeft=4)
        if conditions:
            for condition in conditions:
                self.AddEntry(isRemovable=True, condition=condition)

        self.AddEntry(isRemovable=False)
示例#7
0
 def Layout(self):
     self.MakeUnMinimizable()
     self.HideHeader()
     self.MakeUnResizeable()
     self.container = uicontrols.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)
     uicontrols.EveLabelLargeBold(
         parent=self.container,
         align=uiconst.TOTOP,
         text=localization.GetByLabel('UI/Medical/Clone/HomeStation'))
     uicontrols.EveLabelMedium(
         parent=self.container,
         align=uiconst.TOTOP,
         text=localization.GetByLabel(
             'UI/Medical/Clone/HomeStationDescription'),
         color=self.GRAY_COLOR,
         padding=(0, 0, 0, 15))
     uiprimitives.Line(parent=self.container,
                       align=uiconst.TOTOP,
                       color=self.LINE_COLOR)
     self.local = uicontrols.ContainerAutoSize(
         parent=self.container,
         align=uiconst.TOTOP,
         alignMode=uiconst.TOTOP,
         state=uiconst.UI_PICKCHILDREN)
     self.remoteTitle = uicontrols.EveLabelLargeBold(
         parent=self.container,
         align=uiconst.TOTOP,
         text=localization.GetByLabel(
             'UI/Medical/Clone/CorporationOffices'),
         padding=(0, 15, 0, 0),
         state=uiconst.UI_DISABLED)
     self.remoteText = uicontrols.EveLabelMedium(
         parent=self.container,
         align=uiconst.TOTOP,
         text=localization.GetByLabel(
             'UI/Medical/Clone/CorporationOfficesDescription'),
         color=self.GRAY_COLOR,
         padding=(0, 0, 0, 0),
         state=uiconst.UI_DISABLED)
     self.remoteTimer = uicontrols.EveLabelMedium(parent=self.container,
                                                  align=uiconst.TOTOP,
                                                  text='',
                                                  color=self.GRAY_COLOR,
                                                  padding=(0, 0, 0, 15),
                                                  state=uiconst.UI_DISABLED)
     self.remote = uicls.ScrollContainer(parent=self.container,
                                         align=uiconst.TOTOP,
                                         alignMode=uiconst.TOTOP,
                                         state=uiconst.UI_PICKCHILDREN)
     self.closeButton = uicontrols.Button(
         parent=self.container,
         label=localization.GetByLabel('UI/Generic/Cancel'),
         func=self.Close,
         align=uiconst.TOTOP,
         fontsize=13,
         padding=(220, 10, 220, 0))
     uicore.animations.FadeTo(self.container,
                              startVal=0.0,
                              endVal=1.0,
                              duration=0.5)
 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