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))
def ApplyAttributes(self, attributes): uicontrols.Window.ApplyAttributes(self, attributes) self.tradeSession = attributes.tradeSession tradeItems = attributes.tradeItems self.tradedShips = [] self.SetWndIcon() buttonParent = FlowContainer(name='buttonParent', parent=self.sr.main, align=uiconst.TOBOTTOM, padding=6, autoHeight=True, centerContent=True, contentSpacing=(6, 6)) self.acceptButton = Button( parent=buttonParent, label=localization.GetByLabel('UI/PVPTrade/Accept'), func=self.OnClickAccept, align=uiconst.NOALIGN) Button(parent=buttonParent, label=localization.GetByLabel('UI/Common/Buttons/Cancel'), func=self.Cancel, align=uiconst.NOALIGN) sessionData = self.tradeSession.List() herID = sessionData.traders[not sessionData.traders.index(session. charid)] self.sr.herinfo = cfg.eveowners.Get(herID) mainCont = uiprimitives.Container(name='mainCont', parent=self.sr.main) self.sr.my = my = invCont.PlayerTrade( parent=mainCont, align=uiconst.TOTOP_PROP, height=0.5, itemID=sessionData.tradeContainerID, ownerID=session.charid, tradeSession=self.tradeSession, state=uiconst.UI_PICKCHILDREN, tradeItems=tradeItems) self.sr.myAccept = my.acceptIcon self.sr.myMoney = my.moneyLabel self.sr.her = her = invCont.PlayerTrade( parent=mainCont, align=uiconst.TOTOP_PROP, height=0.5, itemID=sessionData.tradeContainerID, ownerID=herID, tradeSession=self.tradeSession, state=uiconst.UI_PICKCHILDREN) self.sr.herAccept = her.acceptIcon self.sr.herMoney = her.moneyLabel offerBtn = Button( parent=my.topCont, label=localization.GetByLabel('UI/PVPTrade/OfferMoney'), func=self.OnClickOfferMoney, args=None, idx=0, pos=(2, 2, 0, 0), align=uiconst.TOPRIGHT) self.sr.myIx = sessionData.traders.index(eve.session.charid) self.sr.herIx = sessionData.traders.index(herID) self.OnMoneyOffer([0, 0]) self.SetCaption(self.GetWindowCaptionText())
def ApplyAttributes(self, attributes): self._ready = False self.detailsWindow = None Window.ApplyAttributes(self, attributes) self.SetTopparentHeight(8) self.settingsContainer = Container(parent=self.sr.main, align=uiconst.TOTOP, height=16, padding=8) self.filterEdit = SinglelineEdit(parent=self.settingsContainer, align=uiconst.TOLEFT, width=150, label='Filter:', OnReturn=self.PopulateScroll) Button(parent=self.settingsContainer, label='Reset', align=uiconst.TORIGHT, func=self.Reset, padRight=8) Button(parent=self.settingsContainer, label='Refresh', align=uiconst.TORIGHT, func=self.PopulateScroll, padRight=8) self.scroll = Scroll(parent=self.sr.main, id='pythonobjectscroll', align=uiconst.TOALL) self.Reset() self._ready = True
def ApplyAttributes(self, attributes): Window.ApplyAttributes(self, attributes) self.SetTopparentHeight(0) self.preSelectedItems = attributes.selectedItems self.outputPrice = 0 self.outputItemsCount = 0 mainCont = Container(name='mainCont', parent=self.sr.main, padding=const.defaultPadding) bottomCont = Container(name='bottomCont', parent=mainCont, align=uiconst.TOBOTTOM, height=36) reprocessingCont = Container(name='reprocessingCont', parent=mainCont, align=uiconst.TOALL) inputCont = Container(name='inputCont', parent=reprocessingCont, align=uiconst.TOLEFT_PROP, width=0.48) centerCont = Container(name='centerCont', parent=reprocessingCont, align=uiconst.TOLEFT_PROP, width=0.02) outputCont = Container(name='outputCont', parent=reprocessingCont, align=uiconst.TORIGHT_PROP, width=0.48) self.inputInfoCont = ReprocessInputContainer(name='inputInfo', parent=inputCont, dropFunc=self.AddItemByDrag, removeFunc=self.RemoveItem) self.outputInfoCont = ReprocessOutputContainer(name='outputInfo', parent=outputCont) self.loadingOverlay = Container(parent=self.inputInfoCont, idx=0) Fill(bgParent=self.loadingOverlay, color=(0.0, 0.0, 0.0, 0.3)) LoadingWheel(name='loadingWheel', parent=self.loadingOverlay, align=uiconst.CENTER, width=80, height=80) self.loadingOverlay.opacity = 0.0 self.controller = CreateReprocessingWindowController(self, self.inputInfoCont, self.outputInfoCont, sm.GetService('invCache'), sm.GetService('reprocessing'), GetActiveShip) self.inputInfoCont.captionLabel.text = GetByLabel('UI/Reprocessing/ReprocessingWindow/InputMaterials') self.outputInfoCont.captionLabel.text = GetByLabel('UI/Reprocessing/ReprocessingWindow/OutputResults') btnCont = Container(name='buttonCont', parent=bottomCont, align=uiconst.TOBOTTOM, height=36, idx=0, padding=(-4, 3, -4, -2)) GradientUnderlay(bgParent=btnCont) self.reprocessButton = Button(parent=btnCont, label=GetByLabel('UI/Reprocessing/ReprocessingWindow/ReprocessButton'), func=self.ReprocessItems, align=uiconst.CENTER, fixedheight=28) self.cancelButton = Button(parent=btnCont, label=GetByLabel('UI/Common/Buttons/Cancel'), func=self.Cancel, align=uiconst.CENTERRIGHT, left=8) self.DisableReprocessButton(disable=True) if self.preSelectedItems: start_tasklet(self.AddPreselectedItems, self.preSelectedItems)
def ConstructLayout(self): if not self.jobData: return if self.jobData.status == industry.STATUS_READY: self.deliverBtn = Button( name='deliverBtn', parent=self, align=uiconst.TOALL, label='<b>' + localization.GetByLabel('UI/Industry/Deliver'), func=self.OnDeliverBtn, padding=2) self.deliverBtn.width = self.deliverBtn.height = 0 self.deliverBtn.Blink(time=3000) self.Enable() else: self.Disable() gaugeCont = ContainerAutoSize(name='gaugeCont', parent=self, align=uiconst.TOBOTTOM) mainCont = Container(name='mainCont', parent=self) self.deliverBtn = None self.valueLabel = EveLabelMedium(parent=mainCont, align=uiconst.CENTERLEFT, left=4) if self.jobData.status == industry.STATUS_INSTALLED: color = industryUIConst.COLOR_MANUFACTURING if self.jobData.activityID == industry.MANUFACTURING else industryUIConst.COLOR_SCIENCE self.gauge = Gauge(parent=gaugeCont, align=uiconst.TOTOP, state=uiconst.UI_DISABLED, color=color, height=6, gaugeHeight=6, padTop=1, backgroundColor=(1.0, 1.0, 1.0, 0.05))
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 DrawLeftSide(self): self.sr.leftside = uiprimitives.Container(name='leftside', parent=self.sr.main, align=uiconst.TOLEFT, width=256) uiprimitives.Container(name='push', parent=self.sr.leftside, align=uiconst.TOTOP, height=6) self.sr.leftMainPanel = uiprimitives.Container(name='leftMainPanel', parent=self.sr.leftside, align=uiconst.TOALL, pos=(const.defaultPadding, 0, const.defaultPadding, 0)) dummyParent = uiprimitives.Container(name='dummy', parent=self.sr.leftMainPanel, align=uiconst.TOALL, pos=(0, 0, 0, 0)) ownerParent = uiprimitives.Container(name='ownerParent', parent=dummyParent, align=uiconst.TOTOP, height=20) uiprimitives.Container(name='push', parent=ownerParent, align=uiconst.TORIGHT, width=1) options = [(localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/PersonalFittings'), session.charid), (localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/CorporationFittings'), session.corpid)] selected = settings.user.ui.Get('savedFittingsCombo', None) if selected != session.charid and selected != session.corpid: selected = session.charid self.ownerID = selected self.sr.ownerCombo = uicontrols.Combo(label=None, parent=ownerParent, options=options, name='savedFittingsCombo', select=selected, callback=self.ChangeOwnerFilter, pos=(1, 1, 0, 0), align=uiconst.TOALL) searchContainer = uiprimitives.Container(name='searchContainer', parent=dummyParent, align=uiconst.TOTOP, top=const.defaultPadding, height=20) self.sr.searchTextField = uicontrols.SinglelineEdit(name='searchTextField', parent=searchContainer, align=uiconst.TOLEFT, width=160, maxLength=40, left=1) self.sr.searchTextField.OnReturn = self.Search self.sr.searchButton = uicontrols.Button(parent=searchContainer, label=localization.GetByLabel('UI/Common/Buttons/Search'), align=uiconst.CENTERRIGHT, func=self.Search) self.sr.scroll = uicontrols.Scroll(parent=dummyParent, align=uiconst.TOALL, padding=(0, const.defaultPadding, 0, const.defaultPadding)) self.sr.scroll.multiSelect = 0 fitButtons = FlowContainer(name='buttonParent', parent=self.sr.leftside, align=uiconst.TOBOTTOM, padding=6, autoHeight=True, centerContent=True, contentSpacing=uiconst.BUTTONGROUPMARGIN, idx=0) self.exportButton = Button(parent=fitButtons, label=localization.GetByLabel('UI/Commands/Export'), func=self.ExportFittings, align=uiconst.NOALIGN) self.importButton = Button(parent=fitButtons, label=localization.GetByLabel('UI/Commands/Import'), func=self.ImportFittings, align=uiconst.NOALIGN) if boot.region != 'optic': self.importFromClipboardButton = Button(parent=fitButtons, label=localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/ImportFromClipboard'), func=sm.GetService('fittingSvc').ImportFittingFromClipboard, align=uiconst.NOALIGN) self.importFromClipboardButton.hint = localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/ImportFromClipboardHint') self.DrawFittings()
def ApplyAttributes(self, attributes): Window.ApplyAttributes(self, attributes) self.isTesting = False self.startBtn = Button(name='self.startBtn', parent=self.sr.main, align=uiconst.CENTER, label='Start Test', func=self.OnStartBtn)
class UIPerformanceTestWnd(Window): default_caption = 'UI Performance Test Utility' default_windowID = 'UIPerformanceTestID' default_fixedWidth = 200 default_fixedHeight = 60 default_topParentHeight = 0 def ApplyAttributes(self, attributes): Window.ApplyAttributes(self, attributes) self.isTesting = False self.startBtn = Button(name='self.startBtn', parent=self.sr.main, align=uiconst.CENTER, label='Start Test', func=self.OnStartBtn) def OnStartBtn(self, *args): self.startBtn.Disable() self.RunAllTests() self.startBtn.Enable() def RunAllTests(self): self.HideScene() results = PerformanceTests().RunTests() self.ShowScene() self.DisplayResults(results) uicore.Message('CustomNotify', {'notify': 'All Tests successful. Results copied to clipboard'}) def HideScene(self): scene = sm.GetService('sceneManager').GetActiveScene() scene.display = False scene.update = False def ShowScene(self): scene = sm.GetService('sceneManager').GetActiveScene() scene.display = True scene.update = True def DisplayResults(self, results): txt = '' for description, stats in results: txt += '%s:\n' % description for t, value in stats: txt += '%.1f\t%6.2f\n' % (t / float(const.SEC), value) txt += '\n' txt += 'SUMMARY' totalTime = 0 for description, stats in results: txt += '\n%s:' % description values = [ value for t, value in stats ] txt += '\nMedian FPS: %s' % median(values) txt += '\nAverage FPS: %s' % (sum(values) / float(len(values))) txt += '\n' time = [ t for t, value in stats ] totalTime += time[-1] txt += '\nTotal time: %s' % (totalTime / float(const.SEC)) print txt blue.pyos.SetClipboardData(txt)
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()
def BuildUI(self): inv = sm.GetService('invCache').GetInventoryFromId(self.structureID) item = inv.GetItem() stationName = cfg.evelocations.Get(self.structureID).name or evetypes.GetName(item.typeID) stationText = GetShowInfoLink(item.typeID, stationName, itemID=self.structureID) self.nameLabel = EveLabelMedium(name='nameLabel', parent=self.sr.main, text=stationText, padLeft=10, align=uiconst.TOTOP, state=uiconst.UI_NORMAL) ownerText = GetShowInfoLink(const.typeCorporation, cfg.eveowners.Get(item.ownerID).name, itemID=item.ownerID) self.ownerLabel = EveLabelMedium(name='ownerLabel', parent=self.sr.main, text=ownerText, padLeft=10, align=uiconst.TOTOP, state=uiconst.UI_NORMAL) Button(parent=self.sr.main, align=uiconst.TOTOP, label='_Take control', func=self.TakeControl, padding=(10, 2, 10, 2)) self.AddCurrentShip() Button(parent=self.sr.main, align=uiconst.TOTOP, label='_Undock', func=self.Undock, padding=(10, 2, 10, 2))
def Startup(self, *args): LabelTextTop.Startup(self, args) self.statusText = '' self.changeAtTime = None self.isEnabled = True self.SetCorpFFStatus() helpIcon = MoreInfoIcon(parent=self, align=uiconst.CENTERRIGHT, hint=localization.GetByLabel('UI/Corporations/FriendlyFire/Description')) self.ffButton = Button(name='ffButton', align=uiconst.CENTERRIGHT, parent=self, label='', func=self.OnFFClick, left=20) self.UpdateButton() canEditCorp = not util.IsNPC(session.corpid) and const.corpRoleDirector & session.corprole == const.corpRoleDirector if not canEditCorp: self.ffButton.display = False
class FriendlyFireEntry(LabelTextTop): __guid__ = 'listentry.FriendlyFireEntry' def Startup(self, *args): LabelTextTop.Startup(self, args) self.statusText = '' self.changeAtTime = None self.isEnabled = True self.SetCorpFFStatus() helpIcon = MoreInfoIcon(parent=self, align=uiconst.CENTERRIGHT, hint=localization.GetByLabel('UI/Corporations/FriendlyFire/Description')) self.ffButton = Button(name='ffButton', align=uiconst.CENTERRIGHT, parent=self, label='', func=self.OnFFClick, left=20) self.UpdateButton() canEditCorp = not util.IsNPC(session.corpid) and const.corpRoleDirector & session.corprole == const.corpRoleDirector if not canEditCorp: self.ffButton.display = False def Load(self, node): LabelTextTop.Load(self, node) self.UpdateStatusText() def SetCorpFFStatus(self, myCorpAggressionSettings = None): if myCorpAggressionSettings is None: myCorpAggressionSettings = sm.GetService('crimewatchSvc').GetCorpAggressionSettings() now = blue.os.GetWallclockTime() self.isEnabled = myCorpAggressionSettings.IsFriendlyFireLegalAtTime(now) self.changeAtTime = myCorpAggressionSettings.GetNextPendingChangeTime(now) self.statusText = sm.GetService('corp').GetCorpFriendlyFireStatus(myCorpAggressionSettings) def UpdateStatusText(self): self.sr.text.SetText(self.statusText) def UpdateButton(self): if self.isEnabled: self.ffButton.SetLabel_(localization.GetByLabel('UI/Corporations/FriendlyFire/SetIllegalBtn')) else: self.ffButton.SetLabel_(localization.GetByLabel('UI/Corporations/FriendlyFire/SetLegalBtn')) if self.changeAtTime: self.ffButton.Disable() else: self.ffButton.Enable() def OnFFClick(self, *args): if self.isEnabled: confirmMsgText = 'ConfirmChangeFriendlyFireToIllegal' else: confirmMsgText = 'ConfirmChangeFriendlyFireToLegal' if eve.Message(confirmMsgText, {}, uiconst.OKCANCEL) != uiconst.ID_OK: return newAggressionSettings = sm.GetService('corp').GetCorpRegistry().RegisterNewAggressionSettings(not self.isEnabled) self.SetCorpFFStatus(newAggressionSettings) self.UpdateButton() self.UpdateStatusText()
def AddBuyAllBtn(self, tooltipPanel, missingDict): def BuyAll(*args): BuyMultipleTypesWithQty(missingDict) Button(parent=tooltipPanel, label=GetByLabel('UI/Market/MarketQuote/BuyAll'), func=BuyAll, align=uiconst.CENTER) if session.role & ROLE_GMH == ROLE_GMH: Button(parent=tooltipPanel, label='GM: Give all', func=self.GiveAllGM, align=uiconst.CENTERRIGHT, args=(missingDict, ))
def ApplyAttributes(self, attributes): self._ready = False Window.ApplyAttributes(self, attributes) self.SetTopparentHeight(8) top = Container(parent=self.sr.main, align=uiconst.TOTOP, height=128, padding=8) self.loadObjectCacheEnabledChk = Checkbox( parent=top, align=uiconst.TOTOP, text='Load Object Cache Enabled', width=120, checked=blue.resMan.loadObjectCacheEnabled, callback=self._OnLoadObjectCacheEnabledChk) self.attributes = Scroll(parent=top, align=uiconst.TOALL) bottom = LayoutGrid(parent=self.sr.main, align=uiconst.TOBOTTOM, height=100, columns=4, cellPadding=5) self.filterEdit = SinglelineEdit(parent=bottom, width=150, label='Filter:', OnReturn=self._OnRefresh) Button(parent=bottom, label='Refresh', func=self._OnRefresh, fixedwidth=80) Button(parent=bottom, label='Reload', func=self._OnReload, fixedwidth=80) Button(parent=bottom, label='Clear cache', func=self._OnClear, fixedwidth=80) Label(parent=self.sr.main, align=uiconst.TOTOP, text='<b>Resources', padLeft=8) self.scroll = Scroll(parent=self.sr.main, id='resmanmonitorscroll', align=uiconst.TOALL, padding=2) self.PopulateAttributes() self.PopulateScroll() uthread2.StartTasklet(self.RefreshAttributes)
def ConstructTopCont(self): self.topCont = Container(name='topCont', parent=self, align=uiconst.TOTOP, height=24) UtilMenu(parent=self.topCont, align=uiconst.CENTERLEFT, menuAlign=uiconst.BOTTOMLEFT, GetUtilMenu=self.GetSkillSettingsMenu, texturePath='res:/UI/Texture/SettingsCogwheel.png', width=16, height=16, iconSize=18) self.quickFilter = QuickFilterEdit(parent=self.topCont, align=uiconst.CENTERLEFT, width=80, left=18) self.quickFilter.ReloadFunction = self.QuickFilterReload btn = Button( parent=self.topCont, align=uiconst.CENTERRIGHT, label=GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/SkillTabs/OpenTrainingQueue' ), func=self.OpenSkillQueueWindow, name='characterSheetOpenTrainingQueue')
class JobStateContainer(Container): default_state = uiconst.UI_NORMAL def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.jobData = attributes.jobData self.ConstructLayout() self.UpdateValue() def ConstructLayout(self): if not self.jobData: return if self.jobData.status == industry.STATUS_READY: self.deliverBtn = Button(name='deliverBtn', parent=self, align=uiconst.TOALL, label='<b>' + localization.GetByLabel('UI/Industry/Deliver'), func=self.OnDeliverBtn, padding=2) self.deliverBtn.width = self.deliverBtn.height = 0 self.deliverBtn.Blink(time=3000) self.Enable() else: self.Disable() gaugeCont = ContainerAutoSize(name='gaugeCont', parent=self, align=uiconst.TOBOTTOM) mainCont = Container(name='mainCont', parent=self) self.deliverBtn = None self.valueLabel = EveLabelMedium(parent=mainCont, align=uiconst.CENTERLEFT, left=4) if self.jobData.status == industry.STATUS_INSTALLED: color = industryUIConst.COLOR_MANUFACTURING if self.jobData.activityID == industry.MANUFACTURING else industryUIConst.COLOR_SCIENCE self.gauge = Gauge(parent=gaugeCont, align=uiconst.TOTOP, state=uiconst.UI_DISABLED, color=color, height=6, gaugeHeight=6, padTop=1, backgroundColor=(1.0, 1.0, 1.0, 0.05)) def OnStatusChanged(self): self.Flush() self.ConstructLayout() if self.jobData.status == industry.STATUS_DELIVERED: uicore.animations.FadeTo(self.valueLabel, 0.0, 1.0) def UpdateValue(self, animate = False, num = 0): if not self.jobData or self.jobData.status in (industry.STATUS_READY, industry.STATUS_UNSUBMITTED): return if self.jobData.status == industry.STATUS_INSTALLED: progressRatio = self.jobData.GetJobProgressRatio() if progressRatio: self.gauge.SetValueInstantly(progressRatio) if animate and progressRatio != 1.0: self.gauge.AnimFlash(1.0, duration=3.0, timeOffset=num * 0.1) self.valueLabel.text = self.jobData.GetJobStateLabel() def OnDeliverBtn(self, *args): sm.GetService('industrySvc').CompleteJob(self.jobData.jobID) sm.GetService('audio').SendUIEvent('ind_jobDelivered') def OnNewJobData(self, jobData): self.jobData = jobData self.OnStatusChanged() self.UpdateValue(animate=True) def StartUpdate(self): uthread.new(self._UpdateThread) def _UpdateThread(self): while not self.destroyed: self.UpdateValue() blue.synchro.SleepWallclock(500)
def PrimeTimeMenu(self, menuParent): headerCont = menuParent.AddContainer(align=uiconst.TOTOP, height=20, padding=const.defaultPadding) EveLabelLargeBold(parent=headerCont, text=GetByLabel('UI/Sovereignty/SetSovereigntyHour'), align=uiconst.TOTOP) menuParent.AddSpace(height=10) text = menuParent.AddText( GetByLabel('UI/Sovereignty/SetNewVulnerabilityTimeDescription')) text.GetEntryWidth = lambda mc=text: 250 cont = menuParent.AddContainer(align=uiconst.TOTOP, height=60, padding=const.defaultPadding) myCont = Container(name='myCont', parent=cont, align=uiconst.TOTOP, height=22, padTop=10) currentPrimeHour = self.GetCurrentPrimeHour() self.primeTimeCombo = Combo(name='primeTimeCombo', parent=myCont, options=self.GetTimeComboOptions(), select=currentPrimeHour, width=150) setBtn = Button(name='SetPrimeTimeBtn', align=uiconst.TOPRIGHT, parent=myCont, label=GetByLabel('UI/Common/CommandSet'), func=self.SetPrimeTime)
def ApplyAttributes(self, attributes): Window.ApplyAttributes(self, attributes) self.oldCamID = None self.mainCont = Container(parent=self.sr.main, padding=5) Button(parent=self.mainCont, align=uiconst.TOTOP, label='Toggle Debug Camera', func=self.ToggleDebugCam, hint=BUTTONHINT) self.atLabel = Label(parent=self.mainCont, align=uiconst.TOTOP) stateCont = Container(parent=self.mainCont, align=uiconst.TOTOP, height=20, padTop=5) self.orbitLabel = StateCont(parent=stateCont, align=uiconst.TOLEFT, text='ORBIT', padRight=2) self.zoomLabel = StateCont(parent=stateCont, align=uiconst.TOLEFT, text='ZOOM', padRight=2) self.fovZoomLabel = StateCont(parent=stateCont, align=uiconst.TOLEFT, text='FOVZOOM', padRight=2) self.panLabel = StateCont(parent=stateCont, align=uiconst.TOLEFT, text='PAN', padRight=2) self.rotateLabel = StateCont(parent=stateCont, align=uiconst.TOLEFT, text='ROTATE', padRight=2) uthread.new(self.Update)
def LoadButtons(self): if self.destroyed: return btns = [] officeExists = sm.GetService('corp').GetOffice() is not None canRent = session.corprole & const.corpRoleCanRentOffice == const.corpRoleCanRentOffice canMove = session.corprole & const.corpRoleDirector == const.corpRoleDirector if canRent and not officeExists: rentLabel = localization.GetByLabel('UI/Station/Lobby/RentOffice') btns.append([rentLabel, self.RentOffice, None]) if canMove and officeExists: btns.append([localization.GetByLabel('UI/Station/Hangar/UnrentOffice'), self.UnrentOffice, None]) if canMove: isHQHere = sm.GetService('corp').GetCorporation().stationID == session.stationid2 if not isHQHere: hqLabel = localization.GetByLabel('UI/Station/Lobby/MoveHeadquartersHere') btns.append([hqLabel, self.SetHQ, None]) if not officeExists and sm.GetService('corp').HasCorpImpoundedItemsAtStation(): btns.append([localization.GetByLabel('UI/Inventory/ReleaseItems'), self.ReleaseImpoundedItems, None]) if sm.GetService('corp').DoesCharactersCorpOwnThisStation(): mgmtLabel = localization.GetByLabel('UI/Station/Lobby/StationManagement') btns.append([mgmtLabel, self.OpenStationManagement, None]) if self.destroyed: return self.officesButtons.Flush() for label, func, args in btns: Button(parent=self.officesButtons, label=label, func=func, args=args, align=uiconst.NOALIGN)
def ApplyAttributes(self, attributes): Window.ApplyAttributes(self, attributes) self.itemID = attributes.itemID self.typeID = attributes.typeID self.nameFilter = None self.stateManager = sm.GetService('godma').GetStateManager() self.SetCaption('Attribute Inspector') self.SetWndIcon(None) self.SetTopparentHeight(0) main = Container(name='main', parent=uiutil.GetChild(self, 'main'), pos=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) top = Container(name='top', parent=main, height=20, align=uiconst.TOTOP) Button(parent=top, label='Refresh', align=uiconst.TORIGHT, func=self.Refresh) self.input = SinglelineEdit(name='itemID', parent=top, width=-1, height=-1, align=uiconst.TOALL) self.input.readonly = not eve.session.role & ROLE_GMH self.input.OnReturn = self.Refresh self.input.SetValue(str(self.itemID)) Container(name='div', parent=main, height=5, align=uiconst.TOTOP) self.scroll = Scroll(parent=main) self.Refresh()
def ApplyAttributes(self, attributes): super(RenderJobProfiler, self).ApplyAttributes(attributes) self.SetCaption('Render Job Profiler') self._renderJob = None self.SetTopparentHeight(0) parent = self.GetMainArea() parent.SetAlign(uiconst.TOALL) parent.padding = 5 top = Container(parent=parent, align=uiconst.TOTOP, height=20) Label(text='Render Job', parent=top, align=uiconst.TOLEFT, padding=4) combo = Combo(parent=top, options=[(rj.name, rj) for rj in trinity.renderJobs.recurring], callback=self._OnRenderJob, align=uiconst.TOALL) bottom = Container(parent=parent, align=uiconst.TOBOTTOM, height=20, padding=2) Button(parent=bottom, align=uiconst.CENTER, label='Copy', func=self._Copy, args=()) self._scroll = Scroll(parent=parent, align=uiconst.TOALL, top=4) self._OnRenderJob(None, None, combo.selectedValue) uthread2.StartTasklet(self._UpdateTiming)
def OnLinkTypeChange(self, chkbox, *args): if chkbox.GetValue(): self.itemID = self.typeID = 0 self.key = chkbox.data['key'] text = uiutil.GetChild(chkbox, 'text') wnd = chkbox.FindParentByName( localization.GetByLabel('UI/Common/GenerateLink')) if not wnd: return editParent = uiutil.FindChild(wnd, 'editField') if editParent is not None: label = uiutil.FindChild(editParent, 'label') label.text = text.text edit = uiutil.FindChild(editParent, 'edit_txt') edit.SetValue('') self.sr.searchbutt = uiutil.FindChild(editParent, 'button') if self.key in ('char', 'corp', 'type', 'solarsystem', 'station'): if self.sr.searchbutt == None: from eve.client.script.ui.control.buttons import Button self.sr.searchbutt = Button( parent=editParent, label=localization.GetByLabel( 'UI/Common/SearchForItemType'), func=self.OnSearch, btn_default=0, align=uiconst.TOPRIGHT) else: self.sr.searchbutt.state = uiconst.UI_NORMAL edit.width = 55 elif self.sr.searchbutt != None: self.sr.searchbutt.state = uiconst.UI_HIDDEN edit.width = 0
def ApplyAttributes(self, attributes): uiprimitives.Container.ApplyAttributes(self, attributes) self.ownerID = attributes.ownerID if self.ownerID == session.charid: self.myView = True else: self.myView = False self.quickFilterSetting = 'applicationsQuickFilter_OwnerID%s' % self.ownerID self.filteringBy = settings.char.ui.Get(self.quickFilterSetting, '') self.showingOld = settings.char.ui.Get('applicationsShowOld_%s' % self.ownerID, False) self.InitViewingStatus() self.topContainer = uiprimitives.Container(parent=self, name='topContainer', align=uiconst.TOTOP, height=20, padding=const.defaultPadding) self.quickFilter = uicls.QuickFilterEdit(parent=self.topContainer, align=uiconst.CENTERRIGHT, setvalue=self.filteringBy) self.quickFilter.ReloadFunction = self.OnSearchFieldChanged self.quickFilter.OnReturn = self.SearchByCharacterName self.statusFilter = uicls.UtilMenu(parent=self.topContainer, align=uiconst.CENTERRIGHT, padding=(1, 1, 1, 1), left=103, GetUtilMenu=self.StatusFilterMenu, texturePath='res:/ui/texture/icons/38_16_205.png', hint=localization.GetByLabel('UI/Corporations/CorpApplications/FilterByStatus')) self.inviteButton = Button(name='inviteButton', align=uiconst.CENTERLEFT, parent=self.topContainer, label=localization.GetByLabel('UI/Corporations/CorpApplications/InviteToCorp'), func=self.OpenInviteWindow) if not const.corpRolePersonnelManager & session.corprole == const.corpRolePersonnelManager: self.inviteButton.display = False if self.myView: self.topContainer.display = False self.applicationContainer = uiprimitives.Container(name='applications', parent=self, align=uiconst.TOALL, padding=const.defaultPadding) self.applicationScroll = uicontrols.BasicDynamicScroll(name='applicationsScroll', parent=self.applicationContainer, align=uiconst.TOALL) self.applicationScroll.noContentHint = localization.GetByLabel('UI/Corporations/CorpApplications/NoApplicationsFound') self.applicationScroll.multiSelect = 0
def AddButton(self, label, func, args=None, fixedWidth=None, isModalResult=False, isDefault=False, isCancel=False, hint=None): if not self.fixedWidth: fixedWidth = None newbtn = Button(parent=self.subpar, label=label, func=func, args=args, btn_modalresult=isModalResult, btn_default=isDefault, btn_cancel=isCancel, fixedwidth=fixedWidth, name='%s_Btn' % label, fontStyle=self.fontStyle, fontFamily=self.fontFamily, fontPath=self.fontPath, fontsize=self.fontsize, hint=hint) self.sr.Set('%s_Btn' % label, newbtn) self.ResetLayout() return newbtn
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 CreateToolbarButton(self, func, label): Button(name=label, label=label, parent=self.buttonCont, align=uiconst.TOLEFT, padding=(8, 4, 0, 4), height=16, func=func)
def ConstructButtons(self): buttonParent = FlowContainer(name='buttonParent', parent=self.sr.main, align=uiconst.TOBOTTOM, padding=6, autoHeight=True, centerContent=True, contentSpacing=(6, 6)) self.acceptButton = Button(parent=buttonParent, label=GetByLabel('UI/PVPTrade/Accept'), func=self.Accept, align=uiconst.NOALIGN) Button(parent=buttonParent, label=GetByLabel('UI/Common/Buttons/Cancel'), func=self.Close, align=uiconst.NOALIGN) self.CanPlayerAcceptTrade()
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.canConfirm = False self.controller = attributes.controller positionCallback = attributes.positionCallback self.confirmCallback = attributes.confirmCallback self.nameChangedCallback = attributes.nameChangedCallback leftBtnCont = Container(parent=self, name='leftBtnCont', align=uiconst.TOLEFT, padLeft=10) rightBtnCont = Container(parent=self, name='rightBtnCont', align=uiconst.TORIGHT, padRight=10) self.positionBtn = Button( name='positionBtn', parent=rightBtnCont, align=uiconst.CENTERLEFT, func=positionCallback, label=GetByLabel('UI/Structures/Deployment/Position')) self.positionBtn.stepID = STEP_POSITION self.positionBtn.tooltip = self.POSITION_TOOLTIP self.positionBtn.tooltipDisabled = self.POSITION_DISABLED_TOOLTIP self.anchorBtn = Button( name='anchorBtn', parent=rightBtnCont, align=uiconst.CENTERLEFT, func=self.Confirm, label=GetByLabel('UI/Structures/Deployment/ConfirmDeployment')) self.anchorBtn.stepID = STEP_SCHEDULE self.anchorBtn.tooltip = self.ANCHOR_TOOLTIP self.anchorBtn.tooltipDisabled = self.ANCHOR_DISABLED_TOOLTIP self.leftBtns = [self.positionBtn, self.anchorBtn] self.SetBtnForStep(STEP_POSITION) cancelBtn = Button(name='cancelBtn', parent=leftBtnCont, align=uiconst.CENTERRIGHT, func=self.Cancel, label=GetByLabel('UI/Common/Cancel'), hint=GetByLabel(self.CANCEL_TOOLTIP)) maxBtnWidth = max(self.positionBtn.width, self.anchorBtn.width, cancelBtn.width) leftBtnCont.width = rightBtnCont.width = maxBtnWidth self.mouseCont = MouseCont(parent=self)
def ApplyAttributes(self, attributes): Window.ApplyAttributes(self, attributes) self.SetWndIcon(None) self.SetCaption('Window manager') self.SetTopparentHeight(10) self.SetMinSize([360, 220]) options = [] for wndCls in Window.__subclasses__(): options.append((wndCls.__name__, wndCls)) options.sort() topCont = Container(name='params', parent=self.sr.main, align=uiconst.TOTOP, pad=(5, 5, 5, 5), pos=(0, 10, 0, 30)) self.mainCont = Container(name='params', parent=self.sr.main, align=uiconst.TOTOP, pos=(0, 0, 0, 50), padding=(5, 15, 5, 5)) self.extrasCont = Container(name='params', parent=self.sr.main, align=uiconst.TOALL, padding=(5, 15, 5, 5)) self.combo = Combo(parent=topCont, label='Select window', options=options, name='', select=settings.user.ui.Get('windowManagerOpenWindow'), callback=self.OnComboChanged, pos=(5, 0, 0, 0), width=150, align=uiconst.TOPLEFT) self.startupArgs = SinglelineEdit(name='', label='attributes', parent=topCont, setvalue='', align=uiconst.TOPLEFT, left=165, width=100) Button(parent=topCont, label='Load', align=uiconst.RELATIVE, func=self.OpenWindow, pos=(300, 0, 0, 0)) self.filenameEdit = SinglelineEdit(name='', label='Location', parent=self.mainCont, setvalue='', align=uiconst.TOTOP, top=15, readonly=True) Label(text='RELOAD', parent=self.extrasCont, top=10, state=uiconst.UI_NORMAL) Line(parent=self.extrasCont, align=uiconst.TOTOP) buttonCont = Container(name='buttonCont', parent=self.extrasCont, align=uiconst.TOTOP, pos=(0, 30, 0, 30)) Button(parent=buttonCont, label='ShipUI', align=uiconst.TOLEFT, func=self.ReloadShipUI) Button(parent=buttonCont, label='NEOCOM', align=uiconst.TOLEFT, func=self.ReloadNeocom, padLeft=1) Button(parent=buttonCont, label='Info Panels', align=uiconst.TOLEFT, func=self.ReloadInfoPanels, padLeft=1) Button(parent=buttonCont, label='Lobby', align=uiconst.TOLEFT, func=self.ReloadLobby, padLeft=1) Button(parent=buttonCont, label='Overview', align=uiconst.TOLEFT, func=self.ReloadOverview, padLeft=1) Button(parent=buttonCont, label='Mapbrowser', align=uiconst.TOLEFT, func=self.ReloadMapBrowser, padLeft=1) self.UpdateInfo(self.combo.GetKey(), self.combo.GetValue())
def SetupDScanUI(self, directionBox): directionSettingsBox = Container(name='direction', parent=directionBox, align=uiconst.TOTOP, height=70, clipChildren=True, padLeft=2) self.sr.dirscroll = Scroll(name='dirscroll', parent=directionBox) self.sr.dirscroll.sr.id = 'scanner_dirscroll' presetGrid = LayoutGrid(parent=directionSettingsBox, columns=2, state=uiconst.UI_PICKCHILDREN, align=uiconst.TOPLEFT, left=0, top=3) paddingBtwElements = 8 checked = settings.user.ui.Get('scannerusesoverviewsettings', 0) self.sr.useoverview = Checkbox(text=GetByLabel('UI/Inflight/Scanner/UsePreset'), parent=presetGrid, configName='', retval=0, checked=checked, left=0, align=uiconst.TOPLEFT, callback=self.UseOverviewChanged, width=320, wrapLabel=False) presetSelected = settings.user.ui.Get('scanner_presetInUse', None) presetOptions = self.GetPresetOptions() self.presetsCombo = Combo(label='', parent=presetGrid, options=presetOptions, name='comboTabOverview', select=presetSelected, align=uiconst.TOPLEFT, width=120, left=10, callback=self.OnProfileInUseChanged) if not checked: self.presetsCombo.Disable() self.presetsCombo.opacity = 0.5 self.sr.useoverview.sr.label.opacity = 0.5 self.rangeCont = Container(parent=directionSettingsBox, name='rangeCont', align=uiconst.TOTOP, height=24, top=self.sr.useoverview.height) self.angleCont = Container(parent=directionSettingsBox, name='rangeCont', align=uiconst.TOTOP, height=24) textLeft = 2 rangeText = GetByLabel('UI/Inflight/Scanner/Range') rangeLabel = EveLabelSmall(text=rangeText, parent=self.rangeCont, align=uiconst.CENTERLEFT, state=uiconst.UI_DISABLED, left=textLeft) angleText = GetByLabel('UI/Inflight/Scanner/Angle') angleLabel = EveLabelSmall(text=angleText, parent=self.angleCont, align=uiconst.CENTERLEFT, state=uiconst.UI_DISABLED, left=textLeft) innerLeft = max(rangeLabel.textwidth, angleLabel.textwidth) + paddingBtwElements + textLeft innerRangeCont = Container(parent=self.rangeCont, align=uiconst.TOALL, padLeft=innerLeft) innderAngleCont = Container(parent=self.angleCont, align=uiconst.TOALL, padLeft=innerLeft) maxAuRange = 14.3 startingKmValue = settings.user.ui.Get('dir_scanrange', const.AU * maxAuRange) startingAuValue = ConvertKmToAu(startingKmValue) distanceSliderCont = Container(name='distanceSliderCont', parent=innerRangeCont, align=uiconst.CENTERLEFT, state=uiconst.UI_PICKCHILDREN, pos=(0, -1, 100, 18)) smallestAU = ConvertKmToAu(1000000) self.distanceSlider = Slider(name='distanceSlider', parent=distanceSliderCont, sliderID='distanceSlider', minValue=0, maxValue=maxAuRange, endsliderfunc=self.EndSetDistanceSliderValue, onsetvaluefunc=self.OnSetDistanceSliderValue, increments=[smallestAU, 1, 5, 10, maxAuRange], height=20, barHeight=10) self.distanceSlider.label.display = False self.distanceSlider.SetValue(startingAuValue, updateHandle=True, useIncrements=False) left = distanceSliderCont.width + paddingBtwElements maxAuRangeInKm = ConvertAuToKm(maxAuRange) self.dir_rangeinput = SinglelineEdit(name='dir_rangeinput', parent=innerRangeCont, ints=(0, maxAuRangeInKm), setvalue=startingKmValue, align=uiconst.CENTERLEFT, pos=(left, 0, 90, 0), maxLength=len(str(maxAuRangeInKm)) + 1, OnReturn=self.DirectionSearch) self.dir_rangeinput.OnChar = self.OnKmChar self.dir_rangeinput.OnMouseWheel = self.OnMouseWheelKm self.dir_rangeinput.ChangeNumericValue = self.ChangeNumericValueKm kmText = GetByLabel('UI/Inflight/Scanner/UnitKMAndSeparator') left = self.dir_rangeinput.left + self.dir_rangeinput.width + paddingBtwElements / 2 kmLabel = EveLabelSmall(text=kmText, parent=innerRangeCont, align=uiconst.CENTERLEFT, pos=(left, 0, 0, 0), state=uiconst.UI_DISABLED) left = kmLabel.left + kmLabel.textwidth + paddingBtwElements self.dir_rangeinputAu = SinglelineEdit(name='dir_rangeinputAu', parent=innerRangeCont, setvalue=startingAuValue, floats=(0, maxAuRange, 1), align=uiconst.CENTERLEFT, pos=(left, 0, 45, 0), maxLength=4, OnReturn=self.DirectionSearch) self.dir_rangeinputAu.OnChar = self.OnAuChar self.dir_rangeinputAu.OnMouseWheel = self.OnMouseWheelAu self.dir_rangeinputAu.ChangeNumericValue = self.ChangeNumericValueAu auText = GetByLabel('UI/Inflight/Scanner/UnitAU') left = self.dir_rangeinputAu.left + self.dir_rangeinputAu.width + paddingBtwElements / 2 auLabel = EveLabelSmall(text=auText, parent=innerRangeCont, align=uiconst.CENTERLEFT, pos=(left, 0, 0, 0), state=uiconst.UI_DISABLED) angleSliderCont = Container(name='sliderCont', parent=innderAngleCont, align=uiconst.CENTERLEFT, state=uiconst.UI_PICKCHILDREN, pos=(0, -1, 100, 18)) self.angleSliderLabel = EveLabelSmall(text='', parent=innderAngleCont, align=uiconst.CENTERLEFT, pos=(0, 0, 0, 0), state=uiconst.UI_DISABLED) startingAngle = settings.user.ui.Get('scan_angleSlider', 360) startingAngle = max(0, min(startingAngle, 360)) self.degreeCone = PieCircle(parent=innderAngleCont, left=0, align=uiconst.CENTERLEFT, setValue=startingAngle) self.degreeCone.opacity = 0.3 self.scanangle = DegToRad(startingAngle) angleSlider = Slider(name='angleSlider', parent=angleSliderCont, sliderID='angleSlider', startVal=startingAngle, minValue=5, maxValue=360, increments=[5, 15, 30, 60, 90, 180, 360], isEvenIncrementsSlider=True, endsliderfunc=self.EndSetAngleSliderValue, height=20, barHeight=10, setlabelfunc=self.UpdateAngleSliderLabel) left = angleSliderCont.width + paddingBtwElements self.angleSliderLabel.left = left + 5 self.degreeCone.left = left + 35 buttonText = GetByLabel('UI/Inflight/Scanner/Scan') scanButton = Button(parent=innderAngleCont, label=buttonText, align=uiconst.CENTERLEFT, pos=(4, 0, 0, 0), func=self.DirectionSearch) scanButton.left = auLabel.left + auLabel.textwidth - scanButton.width