def AddLayout(self): pad = const.defaultPadding uicontrols.WndCaptionLabel(text=evetypes.GetGroupName(self.typeID), subcaption=localization.GetByLabel('UI/UpgradeWindow/TypeUpgradesTo', type1=self.typeID, type2=self.GetUpgradeTypeID()), parent=self.sr.topParent, align=uiconst.RELATIVE) uicontrols.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 = uiprimitives.Container(name='footer', parent=self.sr.main, align=uiconst.TOBOTTOM, pos=(0, 0, 0, 25), padding=(pad, pad, pad, pad)) uiprimitives.Line(align=uiconst.TOBOTTOM, parent=self.sr.main) self.sr.iconContainer = uiprimitives.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 = uicontrols.ButtonGroup(btns=btns, parent=self.sr.footer, line=0) self.transferBtn = btns.GetBtnByIdx(0)
def ApplyAttributes(self, attributes): uicontrols.Window.ApplyAttributes(self, attributes) self.SetTopparentHeight(64) self.SetWndIcon(self.default_iconNum) uicontrols.WndCaptionLabel(text='EVEModX Manager', parent=self.sr.topParent, align=uiconst.RELATIVE, subcaption='Version: ' + settings.VERSION) self.installedMods = Container(name='installedMods', parent=self.sr.main) self.modRepo = Container(name='modRepo', parent=self.sr.main) self.modScroll = ScrollContainer(name='modScroll', parent=self.installedMods, align=uiconst.TOALL, padding=const.defaultPadding, showUnderlay=True) self.tabs = uicontrols.TabGroup(name='tabs', parent=self.sr.main, tabs=[('Installed Mods', self.installedMods, self, 'installedMods'), ('Mod Repository', self.modRepo, self, 'modRepo')], idx=0) for mod_name, mod_obj in sorted( sm.GetService('EVEModXSvc').mods.iteritems()): ModEntry(parent=self.modScroll, data=mod_obj)
def ApplyAttributes(self, attributes): uicontrols.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.SetMinSize([350, 270]) self.SetWndIcon(self.iconNum, mainTop=-4) uicontrols.WndCaptionLabel( text=localization.GetByLabel('UI/Station/Repair/RepairFacilities'), parent=self.sr.topParent, align=uiconst.RELATIVE) self.scope = 'station' btns = uicontrols.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)]) 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 = uiprimitives.Container(name='scroll', align=uiconst.TORIGHT, parent=self.sr.topParent, left=const.defaultPadding, width=200) self.sr.scroll = uicontrols.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 = uicontrols.EveLabelSmall(text='', parent=cont, name='avgDamage', left=8, top=0, state=uiconst.UI_NORMAL, align=uiconst.BOTTOMRIGHT) self.sr.totalCost = uicontrols.EveLabelSmall(text='', parent=cont, name='totalCost', left=8, top=12, state=uiconst.UI_NORMAL, align=uiconst.BOTTOMRIGHT) uthread.new(self.DisplayItems)
def ApplyAttributes(self, attributes): uicontrols.Window.ApplyAttributes(self, attributes) self.scope = 'station_inflight' self.soldict = {} self.sr.main = uiutil.GetChild(self, 'main') self.SetWndIcon(self.iconNum, mainTop=-5) self.SetMinSize([350, 200]) uicontrols.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 = uicontrols.Scroll( name='scroll', parent=self.sr.main, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.settingsParent = uiprimitives.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 = uicontrols.TabGroup(name='tabparent', parent=self.sr.main, idx=0, tabs=maintabs, groupID='capitaljumprangepanel')
def ApplyAttributes(self, attributes): uicontrols.Window.ApplyAttributes(self, attributes) self.readOnly = attributes.readOnly self.MakeUnResizeable() self.SetCaption( localization.GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/NavScroll/Attributes')) self.SetWndIcon(self.iconNum) self.godma = sm.StartService('godma') self.skillHandler = sm.StartService('skills').GetSkillHandler() uicontrols.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.attributePerception, const.attributeMemory, const.attributeWillpower, const.attributeIntelligence, const.attributeCharisma ] self.implantTypes = [19540, 19551, 19553, 19554, 19555] self.attributeIcons = [ 'ui_22_32_5', 'ui_22_32_4', 'ui_22_32_2', 'ui_22_32_3', 'ui_22_32_1' ] self.attributeLabels = [ localization.GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/Attributes/AttributePerception' ), localization.GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/Attributes/AttributeMemory' ), localization.GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/Attributes/AttributeWillpower' ), localization.GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/Attributes/AttributeIntelligence' ), localization.GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/Attributes/AttributeCharisma' ) ] 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) uicontrols.WndCaptionLabel(text=caption, subcaption=subcaption, parent=self.toparea, align=uiconst.RELATIVE) return self.toparea
def ApplyAttributes(self, attributes): uicontrols.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(self.iconNum) self.MakeUnstackable() uicontrols.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)
def ApplyAttributes(self, attributes): uicontrols.Window.ApplyAttributes(self, attributes) self.pathfinder = sm.GetService('clientPathfinderService') self.key = None self.invalidateOpenState_regitems = 1 self.invalidateOpenState_allitems = 1 self.invalidateOpenState_conitems = 1 self.invalidateOpenState_sysitems = 1 self.safetyCont = None self.searchlist = None self.pending = None self.loading = 0 self.SetScope('station_inflight') self.SetWndIcon('res:/ui/Texture/WindowIcons/assets.png', mainTop=-6) 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) ] uicontrols.WndCaptionLabel( text=localization.GetByLabel( 'UI/Inventory/AssetsWindow/PersonalAssets'), subcaption=localization.GetByLabel( 'UI/Inventory/AssetsWindow/DelayedFiveMinutes'), parent=self.sr.topParent, align=uiconst.RELATIVE) self.nameHelper = SearchNamesHelper(sm.GetService('ui')) self.assetKeywordSearch = AssetKeywordSearch(self.nameHelper, sm.GetService('ui'), sm.GetService('map'), sm.GetService('godma'), localization, cfg) self.searchKeywords = self.assetKeywordSearch.GetSearchKeywords() self.searchText = None self.scrollPosition = defaultdict(float) self.Refresh()
def ApplyAttributes(self, attributes): uicontrols.Window.ApplyAttributes(self, attributes) charID = attributes.charID stationID = attributes.stationID self.selectedTokens = {} self.SetCaption(localization.GetByLabel('UI/RedeemWindow/RedeemItem')) self.SetMinSize([640, 260]) self.SetWndIcon(self.iconNum) self.NoSeeThrough() self.SetScope('all') self.charID = charID self.stationID = stationID self.uiSvc = sm.StartService('ui') h = self.sr.topParent.height - 2 self.sr.picParent = uiprimitives.Container(name='picpar', parent=self.sr.topParent, align=uiconst.TORIGHT, width=h, height=h, left=const.defaultPadding, top=const.defaultPadding) self.sr.pic = uiprimitives.Sprite(parent=self.sr.picParent, align=uiconst.RELATIVE, left=1, top=3, height=h, width=h) sm.GetService('photo').GetPortrait(charID, 64, self.sr.pic) self.state = uiconst.UI_NORMAL self.sr.windowCaption = uicontrols.WndCaptionLabel( text=localization.GetByLabel('UI/RedeemWindow/RedeemItem'), parent=self.sr.topParent, align=uiconst.RELATIVE) tp = 5 self.redeemingAmountLabel = uicontrols.EveLabelMedium( text=self.GetTextForRedeemingAmountLabel(0), parent=self.sr.topParent, top=tp, left=60, state=uiconst.UI_DISABLED, align=uiconst.TOPRIGHT) tp += self.redeemingAmountLabel.textheight if stationID: text = localization.GetByLabel( 'UI/RedeemWindow/ItemsDeliveryLocation', solarSystem=cfg.evelocations.Get( self.uiSvc.GetStation(self.stationID).solarSystemID)) self.redeemToLabel = uicontrols.EveLabelMedium( text=text, parent=self.sr.topParent, top=tp, left=60, state=uiconst.UI_DISABLED, align=uiconst.TOPRIGHT) else: text = localization.GetByLabel( 'UI/RedeemWindow/IncorrectPlayerLocation') uicontrols.EveLabelMedium(text=text, parent=self.sr.topParent, top=tp, left=60, state=uiconst.UI_DISABLED, align=uiconst.TOPRIGHT) uiprimitives.Container(name='push', parent=self.sr.main, align=uiconst.TOLEFT, width=const.defaultPadding) uiprimitives.Container(name='push', parent=self.sr.main, align=uiconst.TORIGHT, width=const.defaultPadding) btns = [ (localization.GetByLabel('UI/RedeemWindow/RedeemSelectedItems'), self.RedeemSelected, (), 84) ] self.sr.redeemBtn = uicontrols.ButtonGroup(btns=btns, parent=self.sr.main, unisize=1) self.sr.itemsScroll = uicontrols.Scroll(parent=self.sr.main, padTop=const.defaultPadding) self.sr.itemsScroll.hiliteSorted = 0 uiprimitives.Container(name='push', parent=self.sr.main, align=uiconst.TOBOTTOM, width=6) uthread.new(self.UpdateRedeemingWindowContent) return self
def Layout(self): self.SetMinSize([560, 400]) self.SetWndIcon(self.iconNum) 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 = uicontrols.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 = uiprimitives.Container(name='footer', parent=self.sr.main, align=uiconst.TOBOTTOM, pos=(0, 0, 0, 25), padding=(pad * 2, 0, pad, 2)) self.sr.cols = uiprimitives.Container(name='colums', parent=self.sr.main, align=uiconst.TOALL, padding=(pad, 0, 0, 0)) uiprimitives.Line(parent=self.sr.cols, align=uiconst.TOTOP) uiprimitives.Line(parent=self.sr.cols, align=uiconst.TOBOTTOM) self.sr.leftColumn = uiprimitives.Container(name='leftColumn', parent=self.sr.cols, align=uiconst.TOLEFT, padding=(pad, pad, pad, pad), clipChildren=True) self.sr.rightColumn = uiprimitives.Container(name='rightColumn', parent=self.sr.cols, align=uiconst.TOLEFT, padding=(pad, pad, pad, pad), clipChildren=True) colTopHeight = 45 self.sr.customsHeader = uiprimitives.Container(name='customsHeader', parent=self.sr.leftColumn, align=uiconst.TOTOP, padding=(pad, 0, pad, pad), pos=(0, 0, 0, colTopHeight)) self.sr.customsList = uiprimitives.Container(name='customsList', parent=self.sr.leftColumn, align=uiconst.TOALL, state=uiconst.UI_PICKCHILDREN) self.sr.customsHeaderTitle = uicontrols.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=planetCommonUI.PLANET_COLOR_STORAGE, left=0, top=25, state=uiconst.UI_HIDDEN, align=uiconst.TOPLEFT) self.sr.spaceportHeader = uiprimitives.Container(name='spaceportHeader', parent=self.sr.rightColumn, align=uiconst.TOTOP, padding=(pad, 0, pad, pad), pos=(0, 0, 0, colTopHeight)) self.sr.spaceportList = uiprimitives.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=planetCommonUI.PLANET_COLOR_STORAGE, left=0, top=25, state=uiconst.UI_HIDDEN, align=uiconst.TOPRIGHT) self.sr.spaceportCombo = uicontrols.Combo(label=None, parent=self.sr.spaceportHeader, options=[], name='imex_import_select', callback=self.OnSpaceportComboChanged, width=70, align=uiconst.TOTOP) self.sr.transferCostLabel = uicontrols.EveLabelSmall(parent=self.sr.footer, state=uiconst.UI_NORMAL, top=7) btns = [(localization.GetByLabel('UI/PI/Common/CustomsOfficeTransfer'), self.ConfirmCommodityTransfer, (), None)] btns = uicontrols.ButtonGroup(btns=btns, parent=self.sr.footer, line=0, align=uiconst.TOPRIGHT) self.transferBtn = btns.GetBtnByIdx(0) self.__OnResizeUpdate() self.sr.customsListScroll = uicontrols.Scroll(parent=self.sr.customsList, name='customsList') self.sr.spaceportListScroll = uicontrols.Scroll(parent=self.sr.spaceportList, name='spaceportList')