Example #1
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)
Example #2
0
 def ApplyAttributes(self, attributes):
     ContainerAutoSize.ApplyAttributes(self, attributes)
     iconPath = attributes.iconPath
     iconColor = attributes.get('iconColor', self.default_iconColor)
     title = attributes['title']
     titleColor = attributes.get('titleColor', self.default_titleColor)
     text = attributes['text']
     textColor = attributes.get('textColor', self.default_textColor)
     textTooltipCallback = attributes.get('textTooltipCallback', None)
     actionCallback = attributes.get('actionCallback', None)
     actionText = attributes['actionText']
     self.actionErrors = attributes.get('actionErrors', [])
     Sprite(parent=self, align=uiconst.CENTERLEFT, state=uiconst.UI_DISABLED, texturePath=iconPath, color=iconColor, left=self.PADDING, height=self.ICON_SIZE, width=self.ICON_SIZE)
     EveLabelMediumBold(parent=self, align=uiconst.TOTOP, text=title, padding=(self.ICON_SIZE + 2 * self.PADDING,
      self.PADDING,
      self.BUTTON_WIDTH + 2 * self.PADDING,
      0), color=titleColor)
     textLabel = EveLabelMediumBold(parent=self, align=uiconst.TOTOP, state=uiconst.UI_NORMAL, text=text, padding=(self.ICON_SIZE + 2 * self.PADDING,
      0,
      self.BUTTON_WIDTH + 2 * self.PADDING,
      self.PADDING), color=textColor)
     if textTooltipCallback:
         textLabel.state = uiconst.UI_NORMAL
         textLabel.LoadTooltipPanel = textTooltipCallback
     button = Button(parent=self, label=actionText, align=uiconst.CENTERRIGHT, fontsize=self.BUTTON_FONT_SIZE, fixedwidth=self.BUTTON_WIDTH, fixedheight=self.BUTTON_HEIGHT, left=self.PADDING, func=actionCallback)
     if self.actionErrors:
         button.Disable()
         button.LoadTooltipPanel = self.LoadActionErrorTooltip
     self.SetSizeAutomatically()
Example #3
0
class PanelRequirements(Container):
    def ApplyAttributes(self, attributes):
        Container.ApplyAttributes(self, attributes)
        self.typeID = attributes.typeID
        self.skillTimeLabel = EveLabelMediumBold(name='skillTimeLabel',
                                                 parent=self,
                                                 align=uiconst.TOTOP,
                                                 padding=(8, 4, 0, 0))
        self.scroll = Scroll(name='scroll',
                             parent=self,
                             padding=const.defaultPadding)
        self.scroll.ignoreTabTrimming = True

    @classmethod
    def RequirementsVisible(cls, typeID):
        return bool(sm.GetService('skills').GetRequiredSkills(typeID))

    def Load(self):
        scrollList = sm.GetService('info').GetReqSkillInfo(self.typeID)
        self.scroll.Load(contentList=scrollList)
        totalTime = sm.GetService('skills').GetSkillTrainingTimeLeftToUseType(
            self.typeID)
        if totalTime > 0:
            totalTimeText = localization.GetByLabel(
                'UI/SkillQueue/Skills/TotalTrainingTime',
                timeLeft=long(totalTime))
            self.skillTimeLabel.text = totalTimeText
            self.skillTimeLabel.Show()
        else:
            self.skillTimeLabel.Hide()
Example #4
0
 def ApplyAttributes(self, attributes):
     ContainerAutoSize.ApplyAttributes(self, attributes)
     iconPath = attributes.iconPath
     iconColor = attributes.get('iconColor', self.default_iconColor)
     title = attributes['title']
     titleColor = attributes.get('titleColor', self.default_titleColor)
     text = attributes['text']
     textColor = attributes.get('textColor', self.default_textColor)
     textTooltipCallback = attributes.get('textTooltipCallback', None)
     actionCallback = attributes.get('actionCallback', None)
     actionText = attributes['actionText']
     self.actionErrors = attributes.get('actionErrors', [])
     Sprite(parent=self, align=uiconst.CENTERLEFT, state=uiconst.UI_DISABLED, texturePath=iconPath, color=iconColor, left=self.PADDING, height=self.ICON_SIZE, width=self.ICON_SIZE)
     EveLabelMediumBold(parent=self, align=uiconst.TOTOP, text=title, padding=(self.ICON_SIZE + 2 * self.PADDING,
      self.PADDING,
      self.BUTTON_WIDTH + 2 * self.PADDING,
      0), color=titleColor)
     textLabel = EveLabelMediumBold(parent=self, align=uiconst.TOTOP, state=uiconst.UI_NORMAL, text=text, padding=(self.ICON_SIZE + 2 * self.PADDING,
      0,
      self.BUTTON_WIDTH + 2 * self.PADDING,
      self.PADDING), color=textColor)
     if textTooltipCallback:
         textLabel.state = uiconst.UI_NORMAL
         textLabel.LoadTooltipPanel = textTooltipCallback
     button = Button(parent=self, label=actionText, align=uiconst.CENTERRIGHT, fontsize=self.BUTTON_FONT_SIZE, fixedwidth=self.BUTTON_WIDTH, fixedheight=self.BUTTON_HEIGHT, left=self.PADDING, func=actionCallback)
     if self.actionErrors:
         button.Disable()
         button.LoadTooltipPanel = self.LoadActionErrorTooltip
     self.SetSizeAutomatically()
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     self.value = 0.0
     iconPath = attributes.iconPath
     iconSize = attributes.iconSize
     minValue = attributes.minValue
     maxValue = attributes.maxValue
     showBG = attributes.get('showBG', True)
     isCompact = attributes.get('isCompact', False)
     self.jobData = attributes.jobData
     self.gauge = Gauge(parent=self, align=uiconst.TOBOTTOM, state=uiconst.UI_DISABLED, height=6, gaugeHeight=6, padTop=1, backgroundColor=(1.0, 1.0, 1.0, 0.05))
     if isCompact:
         self.icon = None
         self.valueLabel = None
         return
     mainCont = Container(name='mainCont', parent=self)
     if showBG:
         self.bg = StretchSpriteHorizontal(bgParent=mainCont, texturePath='res:/UI/Texture/Classes/Industry/Center/bgMETE.png')
         FillThemeColored(bgParent=self, opacity=0.5)
     else:
         self.bg = None
     left = 8 if showBG else 2
     self.icon = Sprite(name='icon', parent=mainCont, align=uiconst.TOPLEFT, state=uiconst.UI_DISABLED, pos=(left,
      3,
      self.ICONSIZE,
      self.ICONSIZE), texturePath=self.ICONPATH, opacity=0.6)
     self.valueLabel = EveLabelMediumBold(parent=mainCont, align=uiconst.TOPRIGHT, top=4, left=left)
     self.removeIcon = Sprite(parent=mainCont, align=uiconst.CENTERRIGHT, state=uiconst.UI_HIDDEN, texturePath='res:/ui/texture/icons/73_16_45.png', pos=(0, 0, 12, 12), color=Color.RED, hint=localization.GetByLabel('UI/Industry/PreviewModeHint'))
     self.removeIcon.OnClick = self.OnRemoveIconClick
     self.previewEdit = SinglelineEdit(name='previewEdit', parent=mainCont, align=uiconst.CENTERRIGHT, state=uiconst.UI_HIDDEN, ints=(0, self.MAXVAL), OnChange=self.OnPreviewEdit, pos=(12, 0, 34, 20))
     self.errorFrame = ErrorFrame(bgParent=self, padding=(1, 1, 1, 8))
Example #6
0
 def showRelated(parent):
     moreContainer = uiprimitives.Container(parent=parent, align=uiconst.TOBOTTOM, height=50)
     more = EveLabelMediumBold(text=localization.GetByLabel('UI/Help/ShowMoreTutorials'), parent=moreContainer, align=uiconst.CENTER, state=uiconst.UI_NORMAL)
     more.OnClick = lambda : HelpWindow.Open(showPanel=localization.GetByLabel('UI/Help/TutorialVideos'))
     relatedParent = _RelatedContainer(parent=parent, align=uiconst.TOALL, padding=(100, 40, 100, 40))
     relatedContainer = ContainerAutoSize(parent=relatedParent, align=uiconst.CENTER)
     for each in TUTORIAL_VIDEOS_INDEX.get_related(node.id):
         _RelatedItem(align=uiconst.TOTOP, parent=relatedContainer, title=each['fullTitle'], description=each['description'], videoid=each['id'])
Example #7
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     self.typeID = attributes.typeID
     self.skillTimeLabel = EveLabelMediumBold(name='skillTimeLabel',
                                              parent=self,
                                              align=uiconst.TOTOP,
                                              padding=(8, 4, 0, 0))
     self.scroll = Scroll(name='scroll',
                          parent=self,
                          padding=const.defaultPadding)
     self.scroll.ignoreTabTrimming = True
 def ApplyAttributes(self, attributes):
     ReprocessingContainer.ApplyAttributes(self, attributes)
     self.scrollCont.name = 'outputScroll'
     self.volumeLabel.display = True
     self.UpdateItemInfo(0, 0, 0)
     self.overlayCont.display = False
     w, h = self.overlayCont.GetAbsoluteSize()
     overlayLabel = EveCaptionMedium(name='overlayLabel', parent=self.overlayCont, align=uiconst.CENTER)
     overlayLabel2 = EveLabelMediumBold(name='overlayLabel2', parent=self.overlayCont, align=uiconst.CENTER, top=20, state=uiconst.UI_NORMAL)
     overlayLabel.text = GetByLabel('UI/Reprocessing/ReprocessingWindow/OutputTransferredTo')
     overlayLabel2.text = GetByLabel('UI/Inventory/ItemHangar')
     overlayLabel2.OnClick = uicore.cmd.OpenInventory
Example #9
0
 def ApplyAttributes(self, attributes):
     ReprocessingContainer.ApplyAttributes(self, attributes)
     self.scrollCont.name = 'outputScroll'
     self.volumeLabel.display = True
     self.UpdateItemInfo(0, 0, 0)
     self.overlayCont.display = False
     w, h = self.overlayCont.GetAbsoluteSize()
     overlayLabel = EveCaptionMedium(name='overlayLabel', parent=self.overlayCont, align=uiconst.CENTER)
     overlayLabel2 = EveLabelMediumBold(name='overlayLabel2', parent=self.overlayCont, align=uiconst.CENTER, top=20, state=uiconst.UI_NORMAL)
     overlayLabel.text = GetByLabel('UI/Reprocessing/ReprocessingWindow/OutputTransferredTo')
     overlayLabel2.text = GetByLabel('UI/Inventory/ItemHangar')
     overlayLabel2.OnClick = uicore.cmd.OpenInventory
Example #10
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')
Example #11
0
 def Startup(self, *args):
     self.icon = Icon(parent=self,
                      pos=(1, 0, 24, 24),
                      align=uiconst.CENTERLEFT)
     self.labelLeft = EveLabelMedium(parent=self,
                                     align=uiconst.CENTERLEFT,
                                     state=uiconst.UI_DISABLED,
                                     left=26)
     self.probeExpiry = EveLabelMediumBold(parent=self,
                                           align=uiconst.CENTERRIGHT,
                                           state=uiconst.UI_DISABLED,
                                           left=66)
     self.probeScanRange = EveLabelMediumBold(parent=self,
                                              align=uiconst.CENTERRIGHT,
                                              state=uiconst.UI_DISABLED,
                                              left=6)
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     self.isOpen = True
     headerText = attributes.headerText
     self.toggleFunc = attributes.toggleFunc
     self.arrowSprite = Sprite(name='arrow', parent=self, pos=(0, 0, 16, 16), texturePath='res:/UI/Texture/Icons/38_16_229.png', state=uiconst.UI_DISABLED, align=uiconst.CENTERLEFT)
     self.tipsHeader = EveLabelMediumBold(name='tipsHeader', text=headerText, parent=self, left=16, align=uiconst.CENTERLEFT)
Example #13
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)
Example #14
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)
Example #15
0
 def DrawPrice(self):
     self.priceLabel = EveLabelMediumBold(name='priceLabel',
                                          text='',
                                          parent=self.priceCont,
                                          left=4,
                                          align=uiconst.CENTERRIGHT,
                                          state=uiconst.UI_NORMAL)
    def Load(self):
        self.Flush()
        toggleButtonCont = Container(name='btnGroupCont',
                                     parent=self,
                                     align=uiconst.TOTOP,
                                     height=45)
        btnGroup = ToggleButtonGroup(parent=toggleButtonCont,
                                     align=uiconst.CENTER,
                                     height=toggleButtonCont.height,
                                     width=330,
                                     padding=(10, 4, 10, 3),
                                     callback=self.LoadCertificateSkillsLevel)
        btns = ((1, 'res:/UI/Texture/icons/79_64_2.png'),
                (2, 'res:/UI/Texture/icons/79_64_3.png'),
                (3, 'res:/UI/Texture/icons/79_64_4.png'),
                (4, 'res:/UI/Texture/icons/79_64_5.png'),
                (5, 'res:/UI/Texture/icons/79_64_6.png'))
        for level, iconPath in btns:
            hint = localization.GetByLabel(
                'UI/InfoWindow/CertificateLevelButtonHint', level=level)
            btnGroup.AddButton(btnID=level,
                               iconPath=iconPath,
                               iconSize=32,
                               hint=hint)

        self.masteryTimeLabel = EveLabelMediumBold(name='masteryTimeLabel',
                                                   parent=self,
                                                   align=uiconst.TOTOP,
                                                   top=10,
                                                   left=10)
        self.scroll = Scroll(name='certSkillScroll',
                             parent=self,
                             padding=const.defaultPadding)
        cert = sm.GetService('certificates').GetCertificate(self.certificateID)
        btnGroup.SelectByID(max(1, cert.GetLevel()))
 def _SetupHistoryArea(self):
     self.historySettingsContainer = ContainerAutoSize(
         name='HistorySettings',
         align=uiconst.TOTOP,
         parent=self.rightContainer,
         alignMode=uiconst.TOTOP,
         padding=(self.basePadLeft, 0, 0, 0))
     EveLabelMediumBold(
         name='History',
         align=uiconst.TOTOP,
         parent=self.historySettingsContainer,
         text=localization.GetByLabel(
             'Notifications/NotificationSettings/HistoryHeader'))
     self._MakeSeperationLine(self.historySettingsContainer)
     Button(
         name='Restore Notification History Button',
         align=uiconst.TOTOP,
         label=localization.GetByLabel(
             'Notifications/NotificationSettings/RestoreNotificationHistory'
         ),
         func=self.OnExportHistoryClick,
         pos=(0, 0, 100, 20),
         parent=self.historySettingsContainer,
         padding=(5, 5, 50, 5))
     Button(
         name='clearNotificationHistoryBtn',
         align=uiconst.TOTOP,
         label=localization.GetByLabel(
             'Notifications/NotificationSettings/ClearNotificationHistory'),
         func=self.OnClearHistoryClick,
         pos=(0, 0, 100, 20),
         parent=self.historySettingsContainer,
         padding=(5, 0, 50, 5))
Example #18
0
 def GetDynamicHeight(node, width):
     return max(
         32,
         EveLabelMedium.MeasureTextSize(node.description,
                                        width=width - 60)[1] +
         EveLabelMediumBold.MeasureTextSize(node.title,
                                            width=width - 60)[1] + 8)
Example #19
0
 def SetSizeAutomatically(self):
     width = self.displayRect[2]
     height = EveLabelMediumBold.MeasureTextSize(
         self.text.text,
         width=width - 40)[1] + EveLabelLargeBold.MeasureTextSize(
             self.label.text, width=width - 40)[1]
     self.height = height
 def ConstructNormal(self):
     self.mainCont.Flush()
     completedText = self.GetCompletedText()
     subTextCont = Container(parent=self.mainCont,
                             name='subTextCont',
                             align=uiconst.TOTOP,
                             height=20)
     self.backSprite = Sprite(
         name='arrow',
         parent=subTextCont,
         pos=(0, 0, 14, 14),
         texturePath=
         'res:/UI/Texture/Classes/InfoPanels/opportunitiesReturnArrow.png',
         state=uiconst.UI_NORMAL,
         align=uiconst.CENTERLEFT)
     self.backSprite.OnClick = self.OnBackClicked
     self.backSprite.display = False
     self.subTextLabel = EveLabelMediumBold(parent=subTextCont,
                                            align=uiconst.CENTERLEFT,
                                            text=completedText,
                                            state=uiconst.UI_DISABLED)
     self.subTextLabel.OnClick = self.OnBackClicked
     self.achievementContent = ContainerAutoSize(parent=self.mainCont,
                                                 name='achievementContent',
                                                 height=30,
                                                 align=uiconst.TOTOP,
                                                 padBottom=4)
     groupID = settings.user.ui.Get('opportunities_infoPanel_group', None)
     self.LoadContent(groupID)
Example #21
0
    def Load(self):
        self.Flush()
        topCont = ContainerAutoSize(parent=self,
                                    align=uiconst.TOTOP,
                                    padding=(0, 2, 0, 2))
        btnGroup = ToggleButtonGroup(parent=topCont,
                                     align=uiconst.CENTER,
                                     height=38,
                                     width=248,
                                     callback=self.LoadActivity)
        for activityID in industry.ACTIVITIES:
            isDisabled = activityID not in self.bpData.activities
            color = industryUIConst.GetActivityColor(activityID)
            color = color[:3] + (0.5, )
            btnGroup.AddButton(
                activityID,
                iconPath=industryUIConst.ACTIVITY_ICONS_LARGE[activityID],
                iconSize=26,
                colorSelected=color,
                isDisabled=isDisabled,
                btnClass=ActivityToggleButtonGroupButton,
                activityID=activityID)

        self.activityNameLabel = EveLabelMediumBold(name='label',
                                                    parent=self,
                                                    align=uiconst.TOTOP,
                                                    padding=(6, 0, 0, 0))
        self.scroll = Scroll(parent=self, padding=const.defaultPadding)
        activityID = self.GetSelectedActivityID(activityID)
        btnGroup.SelectByID(activityID)
Example #22
0
 def DrawTotal(self):
     self.totalLabel = EveLabelMediumBold(text=self.totalSum,
                                          parent=self.totalCont,
                                          left=4,
                                          align=uiconst.CENTERRIGHT,
                                          state=uiconst.UI_NORMAL,
                                          autoFadeSides=35)
     self.totalLabel.hint = GetByLabel('UI/Market/MarketQuote/AskTotal')
Example #23
0
 def ApplyAttributes(self, attributes):
     PointerContainer.ApplyAttributes(self, attributes)
     self.data = attributes.data
     self.callback = attributes.callback
     self.minDisplayTime = attributes.Get('minDisplayTime', self.default_minDisplayTime)
     self.outsideBoundsTime = attributes.Get('outsideBoundsTime', self.default_outsideBoundsTime)
     self.updateLoopTimeMSec = attributes.Get('updateLoopTimeMSec', self.default_updateLoopTimeMSec)
     self._updateThread = None
     self.michelle = sm.GetService('michelle')
     self.sensorSuite = sm.GetService('sensorSuite')
     self.topContainer = Container(parent=self, height=20, align=uiconst.TOTOP)
     self.bottomContainer = Container(parent=self, align=uiconst.TOALL)
     self.contentContainer = Container(parent=self.bottomContainer, align=uiconst.TOALL, padLeft=16)
     Fill(bgParent=self.bottomContainer, color=(0, 0, 0, 0.4))
     Line(parent=self.bottomContainer, align=uiconst.TOBOTTOM)
     leftPadContainer = Container(parent=self.topContainer, align=uiconst.TOLEFT, width=12)
     Line(parent=leftPadContainer, align=uiconst.TORIGHT)
     Line(parent=leftPadContainer, align=uiconst.TOBOTTOM)
     textContainer = Container(parent=self.topContainer, align=uiconst.TOLEFT, width=150)
     Fill(bgParent=textContainer, color=(0, 0, 0, 0.5))
     Line(parent=textContainer, align=uiconst.TOTOP)
     Line(parent=textContainer, align=uiconst.TORIGHT)
     self.captionLabel = EveLabelMediumBold(parent=textContainer, text=self.GetCaptionText(), align=uiconst.CENTER)
     textContainer.width = self.captionLabel.textwidth + 16
     rightPadContainer = Container(parent=self.topContainer, align=uiconst.TOALL)
     Line(parent=rightPadContainer, align=uiconst.TOBOTTOM)
     self.iconCont = Container(parent=self.contentContainer, pos=(8, 8, 32, 32), state=uiconst.UI_DISABLED, align=uiconst.TOPRIGHT)
     if self.default_iconTexturePath:
         self.CreateIconSpite()
         self.ownerIcon.SetTexturePath(self.default_iconTexturePath)
         self.ownerIcon.state = uiconst.UI_DISABLED
     topTextCont = ContainerAutoSize(top=8, name='topTextCont', parent=self.contentContainer, align=uiconst.TOTOP)
     self.mainLabel = EveCaptionMedium(name='mainLabel', parent=topTextCont, color=(0.235, 0.745, 0.765), text='', align=uiconst.TOTOP, singleline=True)
     self.mainLabel.SetRightAlphaFade(fadeEnd=250, maxFadeWidth=30)
     self.subLabel = EveLabelMediumBold(name='subLabel', parent=topTextCont, align=uiconst.TOTOP, text='', singleline=True)
     self.subLabel.SetRightAlphaFade(fadeEnd=250, maxFadeWidth=30)
     bottomTextCont = ContainerAutoSize(top=2, name='bottomTextCont', parent=self.contentContainer, align=uiconst.TOBOTTOM)
     self.dataLabel = EveLabelMediumBold(name='dataLabel', parent=bottomTextCont, align=uiconst.TOBOTTOM, text='')
     self.rangeLabel = EveLabelMediumBold(name='rangeLabel', parent=bottomTextCont, align=uiconst.TOBOTTOM, text='')
     self.buttonContainer = Container(parent=self.contentContainer, align=uiconst.BOTTOMRIGHT, heigh=32)
     GradientSprite(parent=self.bottomContainer, align=uiconst.TOALL, rotation=-pi / 2, rgbData=[(0, (0.25, 0.25, 0.25)), (0.3, (0.0, 0.0, 0.0))], alphaData=[(0, 0.5)], state=uiconst.UI_DISABLED)
     self.warpButton = Button(parent=self.contentContainer, top=8, left=88, icon='res:/UI/Texture/Icons/44_32_18.png', func=self.WarpToAction, hint=localization.GetByLabel('UI/Commands/WarpTo'), align=uiconst.BOTTOMRIGHT)
     self.bookmarkButton = Button(parent=self.contentContainer, top=8, left=48, icon='res:/UI/Texture/Icons/bookmark.png', func=self.BookmarkSite, hint=localization.GetByLabel('UI/Inflight/BookmarkLocation'), align=uiconst.BOTTOMRIGHT)
     self.probeScannerButton = Button(parent=self.contentContainer, top=8, left=4, icon='res:/UI/Texture/Icons/probe_scan.png', func=OpenProbeScanner, hint=localization.GetByLabel('UI/Inflight/Scanner/SensorOverlayProbeScanButtonHint'), align=uiconst.BOTTOMRIGHT)
     uicore.event.RegisterForTriuiEvents(uiconst.UI_MOUSEDOWN, self.OnGlobalMouseDown)
     self._updateThread = uthread.new(self.UpdateHint)
 def _SetupUIArea(self):
     self.UISettingsContainer = ContainerAutoSize(name='HistorySettings', align=uiconst.TOTOP, parent=self.rightContainer, alignMode=uiconst.TOTOP, padLeft=self.basePadLeft)
     EveLabelMediumBold(name='UI', align=uiconst.TOTOP, parent=self.UISettingsContainer, text=localization.GetByLabel('Notifications/NotificationSettings/UISettingHeader'))
     self._MakeSeperationLine(self.UISettingsContainer)
     if self.dev_simpleHistoryDisplayEnabled:
         Checkbox(name='simple history view', text=localization.GetByLabel('Notifications/NotificationSettings/SimpleHistoryDisplay'), parent=self.UISettingsContainer, align=uiconst.TOTOP, checked=True)
     hComboRowContainer = Container(name='ComboBoxRow', parent=self.UISettingsContainer, align=uiconst.TOTOP, alignMode=uiconst.TOTOP, height=40, padRight=10)
     from eve.client.script.ui.control.eveCombo import Combo
     Combo(name='H-ExpandCombo', parent=hComboRowContainer, labelleft=120, label=localization.GetByLabel('Notifications/NotificationSettings/DefaultHExpand'), hint=localization.GetByLabel('Notifications/NotificationSettings/DefaultHExpandToolTip'), options=self.GetHorizontalComboOptions(), align=uiconst.TOTOP, width=self.rightContainer.width, callback=self.OnHorizontalComboSelect, select=self.notificationSettingHandler.GetHorizontalExpandAlignment())
     Combo(name='V-ExpandCombo', parent=hComboRowContainer, labelleft=120, label=localization.GetByLabel('Notifications/NotificationSettings/DefaultVExpand'), hint=localization.GetByLabel('Notifications/NotificationSettings/DefaultVExpandToolTip'), align=uiconst.TOTOP, options=self.GetVerticalComboOptions(), width=self.rightContainer.width, callback=self.OnVerticalComboSelect, select=self.notificationSettingHandler.GetVerticalExpandAlignment())
Example #25
0
 def AddStation(self, station, buttonIsDisabled):
     parent = self.sameSolarSystem
     container = ContainerAutoSize(parent=parent, align=uiconst.TOTOP, alignMode=uiconst.TOTOP, state=uiconst.UI_PICKCHILDREN, bgColor=(0.2, 0.2, 0.2, 0.3))
     container.DisableAutoSize()
     label = GetShowInfoLink(station['typeID'], station['name'], station['itemID'])
     EveLabelMediumBold(parent=container, height=30, align=uiconst.TOTOP, state=uiconst.UI_NORMAL, text=label, padding=(7, 8, 140, 5))
     btn = Button(parent=container, label=GetByLabel('UI/Inventory/AssetSafety/DeliverBtn'), align=uiconst.CENTERRIGHT, fontsize=13, fixedwidth=140, fixedheight=25, pos=(5, 0, 0, 0), func=self.DoDeliver, args=station['itemID'])
     if buttonIsDisabled:
         btn.Disable()
     Line(parent=parent, align=uiconst.TOTOP, color=self.LINE_COLOR)
     container.EnableAutoSize()
Example #26
0
 def ApplyAttributes(self, attributes):
     ContainerAutoSize.ApplyAttributes(self, attributes)
     self.typeID = attributes.typeID
     ItemIcon(parent=self,
              align=uiconst.CENTERLEFT,
              state=uiconst.UI_DISABLED,
              pos=(0, 0, 32, 32),
              typeID=self.typeID)
     EveLabelMediumBold(parent=self,
                        align=uiconst.CENTERLEFT,
                        text=evetypes.GetName(self.typeID),
                        left=36)
 def _SetupPopupArea(self):
     self.popupSettingsContainer = ContainerAutoSize(name='PopupSettings', align=uiconst.TOTOP, parent=self.rightContainer, padding=(self.basePadLeft,
      5,
      10,
      0))
     EveLabelMediumBold(name='PopupHeader', align=uiconst.TOTOP, parent=self.popupSettingsContainer, text=localization.GetByLabel('Notifications/NotificationSettings/PopupsHeader'))
     self._MakeSeperationLine(self.popupSettingsContainer)
     Checkbox(name='UsepopupNotifications', text=localization.GetByLabel('Notifications/NotificationSettings/UsePopupNotifications'), parent=self.popupSettingsContainer, align=uiconst.TOTOP, checked=self.notificationSettingHandler.GetPopupsEnabled(), callback=self.OnShowPopupNotificationToggle)
     if self.dev_soundSettingsEnabled:
         Checkbox(name='Play sound checkbox', text=localization.GetByLabel('Notifications/NotificationSettings/PlaySound'), parent=self.popupSettingsContainer, align=uiconst.TOTOP, checked=self.notificationSettingHandler.GetNotificationSoundEnabled(), callback=self.OnPlaySoundToggle)
     self.MakeSliderTextRow(label=localization.GetByLabel('Notifications/NotificationSettings/FadeDelay'), minValue=0, maxValue=10.0, startValue=self.notificationSettingHandler.GetFadeTime(), stepping=0.5, endSliderFunc=self.OnFadeDelaySet)
     self.MakeSliderTextRow(label=localization.GetByLabel('Notifications/NotificationSettings/StackSize'), minValue=1, maxValue=10, startValue=self.notificationSettingHandler.GetStackSize(), stepping=1, endSliderFunc=self.OnStackSizeSet)
    def Load(self):
        self.Flush()
        toggleButtonCont = Container(name='btnGroupCont',
                                     parent=self,
                                     align=uiconst.TOTOP,
                                     height=45)
        btnGroup = ToggleButtonGroup(parent=toggleButtonCont,
                                     align=uiconst.CENTER,
                                     height=toggleButtonCont.height,
                                     width=330,
                                     padding=(10, 4, 10, 3),
                                     callback=self.LoadMasteryLevel)
        for level, iconPath in BUTTONS:
            hint = localization.GetByLabel(
                'UI/InfoWindow/MasteryLevelButtonHint', level=level)
            if level == 5:
                color = Color(*shipTreeConst.COLOR_MASTERED).SetBrightness(
                    0.2).GetRGBA()
            else:
                color = Color(
                    *shipTreeConst.COLOR_BG).SetBrightness(0.35).GetRGBA()
            btnGroup.AddButton(btnID=level,
                               iconPath=iconPath,
                               iconSize=45,
                               hint=hint,
                               colorSelected=color)

        self.masteryHeader = Container(name='masteryHeader',
                                       parent=self,
                                       align=uiconst.TOTOP,
                                       height=25)
        self.settingsMenu = uicls.UtilMenu(
            menuAlign=uiconst.TOPLEFT,
            parent=self.masteryHeader,
            align=uiconst.BOTTOMLEFT,
            left=4,
            GetUtilMenu=self.GetSettingsMenu,
            texturePath='res:/UI/Texture/SettingsCogwheel.png',
            width=16,
            height=16,
            iconSize=18)
        self.masteryTimeLabel = EveLabelMediumBold(name='masteryTimeLabel',
                                                   parent=self.masteryHeader,
                                                   align=uiconst.BOTTOMLEFT,
                                                   left=24)
        self.masteryScroll = Scroll(name='masteryScroll',
                                    parent=self,
                                    padding=const.defaultPadding)
        level = sm.GetService('certificates').GetCurrCharMasteryLevel(
            self.typeID)
        level = max(level, 1)
        btnGroup.SelectByID(level)
Example #29
0
 def showRelated(parent):
     moreContainer = uiprimitives.Container(parent=parent,
                                            align=uiconst.TOBOTTOM,
                                            height=50)
     more = EveLabelMediumBold(
         text=localization.GetByLabel('UI/Help/ShowMoreTutorials'),
         parent=moreContainer,
         align=uiconst.CENTER,
         state=uiconst.UI_NORMAL)
     more.OnClick = lambda: HelpWindow.Open(
         showPanel=localization.GetByLabel('UI/Help/TutorialVideos'))
     relatedParent = _RelatedContainer(parent=parent,
                                       align=uiconst.TOALL,
                                       padding=(100, 40, 100, 40))
     relatedContainer = ContainerAutoSize(parent=relatedParent,
                                          align=uiconst.CENTER)
     for each in TUTORIAL_VIDEOS_INDEX.get_related(node.id):
         _RelatedItem(align=uiconst.TOTOP,
                      parent=relatedContainer,
                      title=each['fullTitle'],
                      description=each['description'],
                      videoid=each['id'])
Example #30
0
 def AddSelfDestructSection(self):
     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)
Example #31
0
 def Startup(self, *etc):
     _textCont = ContainerAutoSize(parent=self,
                                   align=uiconst.TOALL,
                                   padLeft=20,
                                   padTop=4,
                                   clipChildren=True)
     self.label = EveLabelMediumBold(text='',
                                     parent=_textCont,
                                     align=uiconst.TOTOP,
                                     padRight=40)
     self.text = EveLabelMedium(text='',
                                parent=_textCont,
                                align=uiconst.TOTOP,
                                padRight=40)
     self.infoicon = ButtonIcon(left=2,
                                parent=self,
                                idx=0,
                                iconSize=32,
                                align=uiconst.CENTERRIGHT)
     self.infoicon.SetTexturePath('res:/ui/texture/icons/bigplay.png')
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     self.jobData = None
     foregroundCont = Container(bgTexturePath='res:/UI/Texture/Classes/Industry/Output/outputContBg.png', parent=self, align=uiconst.CENTER, width=self.width, height=self.height, state=uiconst.UI_DISABLED)
     self.bgPattern = Frame(bgParent=foregroundCont, texturePath='res:/UI/Texture/Classes/Industry/Output/bgPattern.png', cornerSize=12)
     self.captionCont = ContainerAutoSize(name='captionCont', parent=self, align=uiconst.TOPLEFT, pos=(14, 10, 300, 0))
     self.outcomeCaption = EveHeaderMedium(name='outcomeCaption', parent=self.captionCont, align=uiconst.TOTOP, bold=True, text=GetByLabel('UI/Industry/Outcome'))
     self.outcomeLabel = EveHeaderSmall(name='outcomeLabel', parent=self.captionCont, align=uiconst.TOTOP, bold=True)
     self.probabilityLabel = EveHeaderSmall(name='probabilityLabel', parent=self.captionCont, align=uiconst.TOTOP, bold=False, state=uiconst.UI_HIDDEN)
     self.probabilityLabel.LoadTooltipPanel = self.LoadProbabilityTooltipPanel
     self.probabilityLabel.GetTooltipDelay = self.GetProbabilityTooltipDelay
     self.copyInfoCont = Container(name='copyInfoCont', parent=self, align=uiconst.CENTERBOTTOM, pos=(0, 8, 300, 32), state=uiconst.UI_HIDDEN)
     self.containerME = ContainerME(parent=self.copyInfoCont, align=uiconst.TOPLEFT, width=71, height=30)
     self.runsPerCopyCont = ContainerAutoSize(name='runsPerCopyCont', parent=self.copyInfoCont, align=uiconst.CENTERTOP)
     self.containerTE = ContainerTE(parent=self.copyInfoCont, align=uiconst.TOPRIGHT, width=71, height=30)
     IndustryCaptionLabel(parent=self.runsPerCopyCont, text=localization.GetByLabel('UI/Industry/Runs'), align=uiconst.CENTERTOP)
     self.bpRunsLabel = EveLabelMediumBold(parent=self.runsPerCopyCont, align=uiconst.CENTERTOP, top=12)
     self.errorFrame = ErrorFrame(bgParent=self, padding=1)
     self.outcomeItem = OutcomeItemContainer(parent=self)
     FillThemeColored(bgParent=self, opacity=0.5)
Example #33
0
def CreateSensorOverlayHeading():
    topEntry = Container(height=20, align=uiconst.NOALIGN)
    EveLabelMediumBold(
        parent=topEntry,
        align=uiconst.CENTERLEFT,
        text=localization.GetByLabel('UI/Inflight/Scanner/SensorOverlay'))
    button = ButtonIcon(
        name='overlayButton',
        parent=topEntry,
        align=uiconst.CENTERRIGHT,
        width=16,
        height=16,
        iconSize=16,
        texturePath=
        'res://UI/Texture/classes/SensorSuite/sensor_overlay_small.png',
        func=OnToggleOverlayActive)
    button.args = button
    SetOverlayButtonActiveState(button,
                                sm.GetService('sensorSuite').IsOverlayActive())
    return topEntry