Exemple #1
0
 def ApplyAttributes(self, attributes):
     uicls.Window.ApplyAttributes(self, attributes)
     self.contracts = {}
     self.stuff = {}
     self.SetWndIcon('33_4', mainTop=-8)
     self.SetMinSize([350, 270])
     self.SetCaption(
         localization.GetByLabel('UI/Insurance/InsuranceWindow/Title'))
     uicls.WndCaptionLabel(
         text=localization.GetByLabel('UI/Insurance/InsuranceWindow/Title'),
         parent=self.sr.topParent,
         align=uiconst.RELATIVE)
     self.scope = 'station'
     btns = uicls.ButtonGroup(btns=[(localization.GetByLabel(
         'UI/Insurance/InsuranceWindow/Commands/Insure'),
                                     self.InsureFromBtn, None, 81)],
                              line=1)
     self.sr.main.children.append(btns)
     self.sr.insureBtns = btns
     self.sr.scroll = uicls.Scroll(
         parent=self.sr.main,
         padding=(const.defaultPadding, const.defaultPadding,
                  const.defaultPadding, const.defaultPadding))
     self.sr.scroll.sr.id = 'insurance'
     self.sr.scroll.multiSelect = 0
     self.sr.scroll.sr.minColumnWidth = {
         localization.GetByLabel('UI/Common/Type'): 30
     }
     self.ShowInsuranceInfo()
Exemple #2
0
 def ApplyAttributes(self, attributes):
     uicls.Window.ApplyAttributes(self, attributes)
     self.scope = 'station_inflight'
     self.soldict = {}
     self.sr.main = uiutil.GetChild(self, 'main')
     self.SetWndIcon('ui_53_64_11', mainTop=-8)
     self.SetMinSize([350, 200])
     self.SetCaption(
         localization.GetByLabel(
             'UI/CapitalNavigation/CapitalNavigationWindow/CapitalNavigationLabel'
         ))
     uicls.WndCaptionLabel(
         text=localization.GetByLabel(
             'UI/CapitalNavigation/CapitalNavigationWindow/CapitalNavigationLabel'
         ),
         subcaption=localization.GetByLabel(
             'UI/CapitalNavigation/CapitalNavigationWindow/OnlinedStarbaseMessage'
         ),
         parent=self.sr.topParent,
         align=uiconst.RELATIVE)
     self.sr.scroll = uicls.Scroll(
         name='scroll',
         parent=self.sr.main,
         padding=(const.defaultPadding, const.defaultPadding,
                  const.defaultPadding, const.defaultPadding))
     self.sr.settingsParent = uicls.Container(
         name='settingsParent',
         parent=self.sr.main,
         align=uiconst.TOALL,
         state=uiconst.UI_HIDDEN,
         idx=1,
         pos=(const.defaultPadding, const.defaultPadding,
              const.defaultPadding, const.defaultPadding),
         clipChildren=1)
     maintabs = [
         [
             localization.GetByLabel(
                 'UI/CapitalNavigation/CapitalNavigationWindow/JumpTo'),
             self.sr.scroll, self, 'jumpto', self.sr.scroll
         ],
         [
             localization.GetByLabel(
                 'UI/CapitalNavigation/CapitalNavigationWindow/WithinRange'
             ), self.sr.scroll, self, 'inrange', self.sr.scroll
         ]
     ]
     shipID = util.GetActiveShip()
     if shipID and sm.GetService('clientDogmaIM').GetDogmaLocation(
     ).GetItem(shipID).groupID == const.groupTitan:
         maintabs.insert(1, [
             localization.GetByLabel(
                 'UI/CapitalNavigation/CapitalNavigationWindow/BridgeTo'),
             self.sr.scroll, self, 'bridgeto', self.sr.scroll
         ])
     self.sr.maintabs = uicls.TabGroup(name='tabparent',
                                       parent=self.sr.main,
                                       idx=0,
                                       tabs=maintabs,
                                       groupID='capitaljumprangepanel')
 def ApplyAttributes(self, attributes):
     uicls.TrustedSitePromptWindowCore.ApplyAttributes(self, attributes)
     self.SetWndIcon('ui_9_64_4')
     uicls.WndCaptionLabel(
         text=localization.GetByLabel('UI/Browser/TrustPrompt/Header'),
         parent=self.sr.topParent,
         align=uiconst.RELATIVE)
     self.SetMinSize((430, 300))
Exemple #4
0
 def ApplyAttributes(self, attributes):
     uicls.Window.ApplyAttributes(self, attributes)
     self.homeStation = None
     self.potentialHomeStations = None
     self.cloneTypeID = None
     sm.RegisterNotify(self)
     self.SetWndIcon('ui_18_128_3', mainTop=-8)
     self.SetMinSize([350, 270])
     self.SetCaption(localization.GetByLabel('UI/Medical/Medical'))
     currentSkillPoints = sm.GetService('skills').GetSkillPoints()
     uicls.WndCaptionLabel(
         text=localization.GetByLabel('UI/Medical/Cloning'),
         subcaption=localization.GetByLabel(
             'UI/Medical/Clone/CurrentSkillPoints',
             skillPoints=util.FmtAmt(currentSkillPoints)),
         parent=self.sr.topParent,
         align=uiconst.RELATIVE)
     self.scope = 'station'
     cloneButtons = [
         ('medicalServicesChangeStationBtn',
          localization.GetByLabel('UI/Medical/Clone/ChangeStation'),
          self.PickNewHomeStation, None, 81),
         ('medicalServicesUpgradeCloneBtn',
          localization.GetByLabel('UI/Medical/Clone/UpgradeClone'),
          self.PickNewCloneType, None, 81)
     ]
     btns = uicls.ButtonGroup(btns=cloneButtons,
                              line=1,
                              forcedButtonNames=True)
     self.sr.main.children.append(btns)
     self.sr.cloneBtns = btns
     btns = uicls.ButtonGroup(btns=[
         (localization.GetByLabel('UI/Medical/JumpClone/Install'),
          self.InstallClone, (), 84),
         (localization.GetByLabel('UI/Medical/JumpClone/Destroy'),
          self.DestroyClone, (), 84)
     ],
                              line=1)
     self.sr.main.children.append(btns)
     self.sr.jumpcloneBtns = btns
     tabs = ([
         localization.GetByLabel('UI/Medical/Clone'), self.sr.main, self,
         'podclone', self.sr.cloneBtns
     ], [
         localization.GetByLabel('UI/Medical/JumpClone'), self.sr.main,
         self, 'jumpclone', self.sr.jumpcloneBtns
     ])
     self.maintabs = uicls.TabGroup(name='tabparent',
                                    parent=self.sr.main,
                                    idx=1)
     self.maintabs.Startup(tabs, 'clonespanel')
     self.sr.scroll = uicls.Scroll(
         parent=self.sr.main,
         padding=(const.defaultPadding, const.defaultPadding,
                  const.defaultPadding, const.defaultPadding))
Exemple #5
0
 def ApplyAttributes(self, attributes):
     dirpath = os.path.join(
         blue.win32.SHGetFolderPath(blue.win32.CSIDL_PERSONAL), 'EVE',
         'Overview')
     attributesdirpath = dirpath
     form.ImportBaseWindow.ApplyAttributes(self, attributes)
     self.SetCaption(
         localization.GetByLabel('UI/Overview/ImportOverviewSettings'))
     uicls.WndCaptionLabel(
         text=localization.GetByLabel('UI/Overview/ImportOverviewSettings'),
         parent=self.sr.topParent)
     self.sr.fileScroll.multiSelect = False
Exemple #6
0
 def ApplyAttributes(self, attributes):
     dirpath = os.path.join(
         blue.win32.SHGetFolderPath(blue.win32.CSIDL_PERSONAL), 'EVE',
         'Fittings')
     attributes.dirpath = dirpath
     form.ImportBaseWindow.ApplyAttributes(self, attributes)
     self.SetCaption(localization.GetByLabel('UI/Fitting/ImportFittings'))
     self.SetWndIcon('ui_17_128_4')
     self.fittingSvc = sm.StartService('fittingSvc')
     uicls.WndCaptionLabel(
         text=localization.GetByLabel('UI/Fitting/ImportFittings'),
         parent=self.sr.topParent)
Exemple #7
0
 def ApplyAttributes(self, attributes):
     uicls.Window.ApplyAttributes(self, attributes)
     self.readOnly = attributes.readOnly
     self.SetMinSize([500, 440])
     self.MakeUnResizeable()
     self.SetCaption(
         localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/NavScroll/Attributes'))
     self.SetWndIcon('ui_2_64_16')
     self.godma = sm.StartService('godma')
     self.skillHandler = self.godma.GetSkillHandler()
     uicls.WndCaptionLabel(
         text=localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/Attributes/NeuralRemapping'
         ),
         subcaption=localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/Attributes/NeuralRemappingTagline'
         ),
         parent=self.sr.topParent,
         align=uiconst.RELATIVE)
     self.attributes = [
         const.attributeIntelligence, const.attributePerception,
         const.attributeCharisma, const.attributeWillpower,
         const.attributeMemory
     ]
     self.implantTypes = [19554, 19540, 19555, 19553, 19551]
     self.attributeIcons = [
         'ui_22_32_3', 'ui_22_32_5', 'ui_22_32_1', 'ui_22_32_2',
         'ui_22_32_4'
     ]
     self.attributeLabels = [
         localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/Attributes/AttributeIntelligence'
         ),
         localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/Attributes/AttributePerception'
         ),
         localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/Attributes/AttributeCharisma'
         ),
         localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/Attributes/AttributeWillpower'
         ),
         localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/Attributes/AttributeMemory'
         )
     ]
     self.currentAttributes = {}
     self.implantModifier = {}
     self.unspentPts = 0
     self.ConstructLayout()
     self.Load()
 def LoadTop(self, icon, caption, subcaption=None):
     uiutil.FlushList(self.toparea.children[1:])
     if icon is None and caption is None:
         self.toparea.state = uiconst.UI_HIDDEN
     else:
         self.toparea.state = uiconst.UI_DISABLED
     self.toparea.children[0].top = -4
     if icon is not None:
         self.toparea.children[0].LoadIcon(icon)
     uicls.WndCaptionLabel(text=caption,
                           subcaption=subcaption,
                           parent=self.toparea,
                           align=uiconst.RELATIVE)
     return self.toparea
    def ApplyAttributes(self, attributes):
        uicls.Window.ApplyAttributes(self, attributes)
        self.planet = attributes.planet
        self.path = attributes.path
        if not self.path or len(self.path) < 2:
            raise UserError('CreateRouteTooShort')
        colony = self.planet.GetColony(session.charid)
        self.sourcePin = colony.GetPin(self.path[0])
        self.destinationPin = None
        minBandwidth = None
        prevID = None
        pin = None
        for pinID in self.path:
            pin = colony.GetPin(pinID)
            if not pin:
                raise UserError('RouteFailedValidationPinDoesNotExist')
            if prevID is None:
                prevID = pinID
                continue
            link = colony.GetLink(pin.id, prevID)
            if link is None:
                raise UserError('RouteFailedValidationLinkDoesNotExist')
            if minBandwidth is None or minBandwidth > link.GetTotalBandwidth():
                minBandwidth = link.GetTotalBandwidth()
            prevID = pinID

        self.availableBandwidth = minBandwidth
        sourceName = planetCommon.GetGenericPinName(self.sourcePin.typeID,
                                                    self.sourcePin.id)
        self.SetCaption(
            localization.GetByLabel('UI/PI/Common/ExpeditedTransferFrom',
                                    sourceName=sourceName))
        self.SetMinSize([500, 400])
        self.SetWndIcon('ui_7_64_16')
        self.MakeUnstackable()
        uicls.WndCaptionLabel(text=localization.GetByLabel(
            'UI/PI/Common/PreparingExpeditedTransferOrder'),
                              subcaption=localization.GetByLabel(
                                  'UI/PI/Common/ExpeditedTransferSubHeading'),
                              parent=self.sr.topParent,
                              align=uiconst.RELATIVE)
        self.ConstructLayout()
        self.SetSourcePinGaugeInfo()
        self.scope = 'station_inflight'
        self.ResetPinContents()
        self.SetDestination(colony.GetPin(self.path[-1]))
        self.OnResizeUpdate()
        self.updateTimer = base.AutoTimer(100, self.SetNextTransferText)
Exemple #10
0
 def ApplyAttributes(self, attributes):
     uicls.Window.ApplyAttributes(self, attributes)
     self.key = None
     self.invalidateOpenState_regitems = 1
     self.invalidateOpenState_allitems = 1
     self.invalidateOpenState_conitems = 1
     self.invalidateOpenState_sysitems = 1
     self.searchlist = None
     self.pending = None
     self.loading = 0
     self.SetScope('station_inflight')
     self.SetCaption(localization.GetByLabel('UI/Inventory/AssetsWindow/Assets'))
     self.SetWndIcon('ui_7_64_13', mainTop=-8, size=128)
     self.SetMainIconSize(64)
     self.sr.topParent.state = uiconst.UI_DISABLED
     self.sortOptions = [(localization.GetByLabel('UI/Common/Name'), 0), (localization.GetByLabel('UI/Common/NumberOfJumps'), 1), (localization.GetByLabel('UI/Common/NumberOfItems'), 2)]
     uicls.WndCaptionLabel(text=localization.GetByLabel('UI/Inventory/AssetsWindow/PersonalAssets'), subcaption=localization.GetByLabel('UI/Inventory/AssetsWindow/DelayedFiveMinutes'), parent=self.sr.topParent, align=uiconst.RELATIVE)
     self.searchKeywords = assets.GetSearchKeywords()
     self.scrollPosition = defaultdict(float)
     self.Refresh()
Exemple #11
0
 def AddLayout(self):
     pad = const.defaultPadding
     uicls.WndCaptionLabel(text=cfg.invgroups.Get(
         cfg.invtypes.Get(self.typeID).groupID).groupName,
                           subcaption=localization.GetByLabel(
                               'UI/UpgradeWindow/TypeUpgradesTo',
                               type1=self.typeID,
                               type2=self.GetUpgradeTypeID()),
                           parent=self.sr.topParent,
                           align=uiconst.RELATIVE)
     uicls.Icon(parent=self.sr.topParent,
                align=uiconst.TOPLEFT,
                state=uiconst.UI_DISABLED,
                pos=(0, 0, 64, 64),
                padding=(pad, pad, pad, pad),
                typeID=self.typeID)
     self.sr.footer = uicls.Container(name='footer',
                                      parent=self.sr.main,
                                      align=uiconst.TOBOTTOM,
                                      pos=(0, 0, 0, 25),
                                      padding=(pad, pad, pad, pad))
     uicls.Line(align=uiconst.TOBOTTOM, parent=self.sr.main)
     self.sr.iconContainer = uicls.Container(name='iconContainer',
                                             parent=self.sr.main,
                                             align=uiconst.TOALL,
                                             padding=(pad + 5, pad + 5, 0,
                                                      0),
                                             columns=4)
     self.sr.iconContainer.OnDropData = self.OnDropData
     self.sr.iconContainer.OnDragEnter = self.OnDragEnter
     self.sr.iconContainer.OnDragExit = self.OnDragExit
     btns = [(localization.GetByLabel('UI/UpgradeWindow/StartUpgrade'),
              self.InitiateUpgrade, (), None)]
     self.buttons = btns = uicls.ButtonGroup(btns=btns,
                                             parent=self.sr.footer,
                                             line=0)
     self.transferBtn = btns.GetBtnByIdx(0)
Exemple #12
0
 def Layout(self):
     self.SetMinSize([560, 400])
     self.SetWndIcon('53_11')
     self.SetTopparentHeight(56)
     self.MakeUnstackable()
     checkIsMyCorps = self.customsOfficeItem.ownerID == session.corpid
     checkIsStationManager = session.corprole & const.corpRoleStationManager == const.corpRoleStationManager
     if checkIsMyCorps and checkIsStationManager:
         self.SetHeaderIcon()
         self.settingsIcon = self.sr.headerIcon
         self.settingsIcon.state = uiconst.UI_NORMAL
         self.settingsIcon.GetMenu = self.GetSettingsMenu
         self.settingsIcon.expandOnLeft = 1
         self.settingsIcon.hint = localization.GetByLabel(
             'UI/DustLink/ConfigureOrbital')
     self.windowCaption = uicls.WndCaptionLabel(
         text=localization.GetByLabel(
             'UI/PI/Common/PlanetaryCustomsOfficeName',
             planetName=cfg.evelocations.Get(self.planet.planetID).name),
         subcaption=localization.GetByLabel(
             'UI/PI/Common/ImportExportSubHeading'),
         parent=self.sr.topParent,
         align=uiconst.RELATIVE)
     self.SetCaption(
         localization.GetByLabel('UI/PI/Common/PlanetaryCustomsOfficeName',
                                 planetName=cfg.evelocations.Get(
                                     self.planet.planetID).name))
     pad = const.defaultPadding
     self.sr.footer = uicls.Container(name='footer',
                                      parent=self.sr.main,
                                      align=uiconst.TOBOTTOM,
                                      pos=(0, 0, 0, 25),
                                      padding=(pad * 2, 0, pad, 2))
     self.sr.cols = uicls.Container(name='colums',
                                    parent=self.sr.main,
                                    align=uiconst.TOALL,
                                    padding=(pad, 0, 0, 0))
     uicls.Line(parent=self.sr.cols, align=uiconst.TOTOP)
     uicls.Line(parent=self.sr.cols, align=uiconst.TOBOTTOM)
     self.sr.leftColumn = uicls.Container(name='leftColumn',
                                          parent=self.sr.cols,
                                          align=uiconst.TOLEFT,
                                          padding=(pad, pad, pad, pad),
                                          clipChildren=True)
     self.sr.rightColumn = uicls.Container(name='rightColumn',
                                           parent=self.sr.cols,
                                           align=uiconst.TOLEFT,
                                           padding=(pad, pad, pad, pad),
                                           clipChildren=True)
     colTopHeight = 45
     self.sr.customsHeader = uicls.Container(name='customsHeader',
                                             parent=self.sr.leftColumn,
                                             align=uiconst.TOTOP,
                                             padding=(pad, 0, pad, pad),
                                             pos=(0, 0, 0, colTopHeight))
     self.sr.customsList = uicls.Container(name='customsList',
                                           parent=self.sr.leftColumn,
                                           align=uiconst.TOALL,
                                           state=uiconst.UI_PICKCHILDREN)
     self.sr.customsHeaderTitle = uicls.Label(text=localization.GetByLabel(
         'UI/PI/Common/PlanetaryCustomsOffice'),
                                              parent=self.sr.customsHeader,
                                              align=uiconst.TOPLEFT,
                                              fontsize=16,
                                              state=uiconst.UI_NORMAL)
     self.sr.customsGauge = uicls.Gauge(
         parent=self.sr.customsHeader,
         value=0.0,
         color=planetCommon.PLANET_COLOR_STORAGE,
         left=0,
         top=25,
         state=uiconst.UI_HIDDEN,
         align=uiconst.TOPLEFT)
     self.sr.spaceportHeader = uicls.Container(name='spaceportHeader',
                                               parent=self.sr.rightColumn,
                                               align=uiconst.TOTOP,
                                               padding=(pad, 0, pad, pad),
                                               pos=(0, 0, 0, colTopHeight))
     self.sr.spaceportList = uicls.Container(name='spaceportList',
                                             parent=self.sr.rightColumn,
                                             align=uiconst.TOALL,
                                             state=uiconst.UI_PICKCHILDREN)
     self.sr.spaceportGauge = uicls.Gauge(
         parent=self.sr.spaceportHeader,
         value=0.0,
         color=planetCommon.PLANET_COLOR_STORAGE,
         left=0,
         top=25,
         state=uiconst.UI_HIDDEN,
         align=uiconst.TOPRIGHT)
     self.sr.spaceportCombo = uicls.Combo(
         label=None,
         parent=self.sr.spaceportHeader,
         options=[],
         name='imex_import_select',
         callback=self.OnSpaceportComboChanged,
         width=70,
         align=uiconst.TOTOP)
     self.sr.transferCostLabel = uicls.EveLabelSmall(
         parent=self.sr.footer, state=uiconst.UI_NORMAL, top=7)
     btns = [(localization.GetByLabel('UI/PI/Common/CustomsOfficeTransfer'),
              self.ConfirmCommodityTransfer, (), None)]
     btns = uicls.ButtonGroup(btns=btns,
                              parent=self.sr.footer,
                              line=0,
                              align=uiconst.TOPRIGHT)
     self.transferBtn = btns.GetBtnByIdx(0)
     self.__OnResizeUpdate()
     self.sr.customsListScroll = uicls.Scroll(parent=self.sr.customsList,
                                              name='customsList')
     self.sr.spaceportListScroll = uicls.Scroll(
         parent=self.sr.spaceportList, name='spaceportList')
Exemple #13
0
 def ApplyAttributes(self, attributes):
     uicls.Window.ApplyAttributes(self, attributes)
     self.invCookie = None
     self.invReady = 0
     self.optionsByItemType = {}
     self.itemToRepairDescription = ''
     self.repairSvc = util.Moniker('repairSvc', session.stationid2)
     self.invCache = sm.GetService('invCache')
     self.SetCaption(
         localization.GetByLabel('UI/Station/Repair/RepairShopHeader'))
     self.SetMinSize([350, 270])
     self.SetWndIcon('ui_18_128_4', mainTop=-8)
     uicls.WndCaptionLabel(
         text=localization.GetByLabel('UI/Station/Repair/RepairFacilities'),
         parent=self.sr.topParent,
         align=uiconst.RELATIVE)
     self.scope = 'station'
     btns = uicls.ButtonGroup(btns=[
         (localization.GetByLabel('UI/Commands/PickNewItem'),
          self.DisplayItems, (), 84),
         (localization.GetByLabel('UI/Commands/RepairItem'),
          self.QuoteItems, (), 84),
         (localization.GetByLabel('UI/Commands/RepairAll'), self.DoNothing,
          (), 84)
     ],
                              line=1)
     self.sr.main.children.append(btns)
     self.sr.pickSelect = btns
     self.sr.pickBtn = self.sr.pickSelect.GetBtnByLabel(
         localization.GetByLabel('UI/Commands/PickNewItem'))
     self.sr.selBtn = self.sr.pickSelect.GetBtnByLabel(
         localization.GetByLabel('UI/Commands/RepairItem'))
     self.sr.repairAllBtn = self.sr.pickSelect.GetBtnByLabel(
         localization.GetByLabel('UI/Commands/RepairAll'))
     cont = uicls.Container(name='scroll',
                            align=uiconst.TORIGHT,
                            parent=self.sr.topParent,
                            left=const.defaultPadding,
                            width=200)
     self.sr.scroll = uicls.Scroll(
         parent=self.sr.main,
         padding=(const.defaultPadding, const.defaultPadding,
                  const.defaultPadding, const.defaultPadding))
     self.sr.scroll.sr.minColumnWidth = {
         localization.GetByLabel('UI/Common/Type'): 30
     }
     self.sr.avgDamage = uicls.EveLabelSmall(text='',
                                             parent=cont,
                                             name='avgDamage',
                                             left=8,
                                             top=0,
                                             state=uiconst.UI_NORMAL,
                                             align=uiconst.BOTTOMRIGHT)
     self.sr.totalCost = uicls.EveLabelSmall(text='',
                                             parent=cont,
                                             name='totalCost',
                                             left=8,
                                             top=12,
                                             state=uiconst.UI_NORMAL,
                                             align=uiconst.BOTTOMRIGHT)
     uthread.new(self.DisplayItems)
Exemple #14
0
 def ApplyAttributes(self, attributes):
     uicls.BrowserSettingsWindowCore.ApplyAttributes(self, attributes)
     self.SetWndIcon('ui_9_64_4')
     uicls.WndCaptionLabel(text=localization.GetByLabel(
         'UI/Browser/BrowserSettings/BrowserSettingsCaption'),
                           parent=self.sr.topParent)