def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.SetMinSize([self.default_width, self.default_height]) self.SetCaption('Encounter Debug Window') self.sr.content.padding = 5 self.encounterSpawnServer = sm.RemoteSvc('encounterSpawnServer') debugContainer = uicls.Container(parent=self.sr.content) uicls.Button(parent=debugContainer, align=uiconst.TOBOTTOM, label='Start Encounter', func=self._StartSelectedEncounter, padding=(0, 3, 0, 0)) uicls.Button(parent=debugContainer, align=uiconst.TOBOTTOM, label='Stop Encounter', func=self._StopSelectedEncounter, padding=(0, 5, 0, 0)) uicls.Button(parent=debugContainer, align=uiconst.TOBOTTOM, label='Clear Results', func=self._ClearResults, padding=(0, 5, 0, 0)) self.results = uicls.EditCore(parent=debugContainer, align=uiconst.TOBOTTOM, padding=(0, 5, 0, 0), readonly=True, name='results') self.encounterScroll = uicls.Scroll(parent=debugContainer, name='encounterScroll', align=uiconst.TOALL) self.encounterScroll.LoadContent( contentList=self._GetAvailableEncounters())
def ApplyAttributes(self, attributes): super(uicls.AnimationDebugWindow, self).ApplyAttributes(attributes) self.SetCaption('Animation Debug Draw') parent = self.GetMainArea() parent.SetAlign(uiconst.TOALL) parent.padding = 5 self.entityClient = sm.GetService('entityClient') self.animationDebugClient = sm.GetService('animationDebugClient') uicls.Checkbox(parent=parent, text='Draw position trace', checked=self.animationDebugClient.IsPositionTrace(), callback=self.OnPositionTraceCheckbox, align=uiconst.TOTOP) uicls.Checkbox(parent=parent, text='Draw velocity trace', checked=self.animationDebugClient.IsVelocityTrace(), callback=self.OnVelocityTraceCheckbox) uicls.Checkbox(parent=parent, text='Draw rotational trace', checked=self.animationDebugClient.IsRotationalTrace(), callback=self.OnRotationalTraceCheckbox) uicls.Checkbox( parent=parent, text='Draw Char Controller', checked=self.animationDebugClient.IsPlayerAvatarDebugDraw(), callback=self.OnPlayerAvatarDebugDraw) uicls.Checkbox( parent=parent, text='Draw Morpheme Skeleton', checked=self.animationDebugClient.IsAnimationSkeletonEnabled(), callback=self.SetAnimationSkeletonDraw) uicls.Checkbox( parent=parent, text='Draw Mesh Skeleton', checked=self.animationDebugClient.IsMeshSkeletonEnabled(), callback=self.SetMeshSkeletonDraw) uicls.Checkbox(parent=parent, text='Draw Net Controller', checked=self.animationDebugClient.IsNetDebugDraw(), callback=self.OnNetDebugDraw) uicls.Checkbox( parent=parent, text='Draw Net History', checked=self.animationDebugClient.IsNetDebugDrawHistory(), callback=self.OnNetDebugDrawHistory) uicls.Button(parent=parent, align=uiconst.TOBOTTOM, padding=(0, 5, 0, 0), label='Reload Animation Network', func=self.OnReloadAnimationNetwork) button = uicls.Button(parent=parent, align=uiconst.TOBOTTOM, label='Reload Static States', func=self.OnReloadStaticStates) self.SetMinSize([button.width + 10, 250])
def ApplyAttributes(self, attributes): super(uicls.AIDebugWindow, self).ApplyAttributes(attributes) self.SetMinSize([self.default_width, self.default_height]) self.SetCaption('AI Debug Window') self.sr.content.padding = 5 self.perceptionClient = sm.GetService('perceptionClient') self.aimingClient = sm.GetService('aimingClient') clientContainer = uicls.Container(parent=self.sr.content, align=uiconst.TOLEFT_PROP, width=0.5) uicls.Line(parent=clientContainer, align=uiconst.TORIGHT) uicls.Label(parent=clientContainer, align=uiconst.TOTOP, text='----- CLIENT -----', pos=(0, 0, 0, 0), padding=(5, 5, 5, 5)) uicls.Checkbox(parent=clientContainer, text='Perception', checked=self.perceptionClient.GetPerceptionManager( session.worldspaceid).IsDebugRendering(), callback=self.OnTogglePerception) uicls.Checkbox(parent=clientContainer, text='Aiming', checked=self.aimingClient.GetAimingManager( session.worldspaceid).IsDebugRendering(), callback=self.OnToggleAiming) uicls.Button(parent=clientContainer, align=uiconst.CENTERBOTTOM, label='Gaze at Nearest', func=self.GazeNearest, top=6) serverContainer = uicls.Container(parent=self.sr.content, align=uiconst.TORIGHT_PROP, width=0.5) uicls.Label(parent=serverContainer, align=uiconst.TOTOP, text='----- SERVER -----', padding=(5, 5, 5, 5)) uicls.Checkbox(parent=serverContainer, text='Perception', checked=self.perceptionClient.GetPerceptionManager( session.worldspaceid).IsDebugRenderingServer(), callback=self.OnTogglePerceptionServer) uicls.Checkbox(parent=serverContainer, text='Aiming', checked=self.aimingClient.GetAimingManager( session.worldspaceid).IsDebugRenderingServer(), callback=self.OnToggleAimingServer) uicls.Button(parent=serverContainer, align=uiconst.CENTERBOTTOM, label='Gaze at Nearest', func=self.GazeNearestServer, top=6)
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) if hasattr(self, 'SetTopparentHeight'): self.SetTopparentHeight(0) self.container = uicls.Container(parent=self.sr.main, align=uiconst.TOALL) else: self.container = uicls.Container(parent=self.sr.content, align=uiconst.TOALL) self.optionsContainer = uicls.Container(parent=self.container, align=uiconst.TOTOP, height=32) self.cppCaptureChk = uicls.Checkbox(parent=self.optionsContainer, text='C++ capture', checked=blue.statistics.isCppCaptureEnabled, callback=self._OnCppCaptureChk, align=uiconst.TOTOP) self.buttonContainer = uicls.GridContainer(parent=self.container, align=uiconst.TOALL, columns=2, rows=2) self.startBtn = uicls.Button(parent=self.buttonContainer, align=uiconst.TOALL, label='Start', func=self._Start) self.stopBtn = uicls.Button(parent=self.buttonContainer, align=uiconst.TOALL, label='Stop', func=self._Stop) self.pauseBtn = uicls.Button(parent=self.buttonContainer, align=uiconst.TOALL, label='Pause', func=self._Pause) self.resumeBtn = uicls.Button(parent=self.buttonContainer, align=uiconst.TOALL, label='Resume', func=self._Resume) uthread.new(self._CheckStatus)
def CreateWindow(self): toppar = uicls.Container(name='options', parent=self, align=uiconst.TOTOP, height=54) sidepar = uicls.Container(name='sidepar', parent=toppar, align=uiconst.TORIGHT, width=54) icon = uicls.Button(parent=toppar, icon='ui_77_32_41', iconSize=20, align=uiconst.BOTTOMRIGHT, left=6, func=self.Navigate, args=1) icon.hint = localization.GetByLabel('UI/Common/Next') self.sr.fwdBtn = icon icon = uicls.Button(parent=toppar, icon='ui_77_32_42', iconSize=20, align=uiconst.BOTTOMRIGHT, left=26, func=self.Navigate, args=-1) icon.hint = localization.GetByLabel('UI/Common/Previous') self.sr.backBtn = icon uicls.Container(name='push', parent=toppar, align=uiconst.TOTOP, height=6) optlist = [[localizationUtil.FormatNumeric(10), 10], [localizationUtil.FormatNumeric(25), 25], [localizationUtil.FormatNumeric(50), 50], [localizationUtil.FormatNumeric(100), 100], [localizationUtil.FormatNumeric(500), 500]] countcombo = uicls.Combo(label=localization.GetByLabel('UI/Common/PerPage'), parent=toppar, options=optlist, name='membersperpage', callback=self.OnComboChange, width=92, pos=(2, 36, 0, 0)) self.sr.MembersPerPage = countcombo viewOptionsList1 = [[localization.GetByLabel('UI/Corporations/Common/Roles'), VIEW_ROLES], [localization.GetByLabel('UI/Corporations/Common/GrantableRoles'), VIEW_GRANTABLE_ROLES], [localization.GetByLabel('UI/Corporations/Common/Titles'), VIEW_TITLES]] viewOptionsList2 = [] for roleGrouping in self.sr.roleGroupings.itervalues(): viewOptionsList2.append([localization.GetByMessageID(roleGrouping.roleGroupNameID), roleGrouping.roleGroupID]) i = 0 for optlist, label, config, defval in [(viewOptionsList1, localization.GetByLabel('UI/Common/ViewMode'), 'viewtype', 1000), (viewOptionsList2, localization.GetByLabel('UI/Common/Type'), 'rolegroup', None)]: combo = uicls.Combo(label=label, parent=toppar, options=optlist, name=config, callback=self.OnComboChange, width=146, pos=(countcombo.left + countcombo.width + 6 + i * 152, countcombo.top, 0, 0)) setattr(self.sr, config + 'Combo', combo) i += 1 self.sr.scroll = uicls.Scroll(name='journal', parent=self, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.scroll.OnColumnChanged = self.OnColumnChanged buttons = [[localization.GetByLabel('UI/Common/Buttons/SaveChanges'), self.SaveChanges, (), 81]] btns = uicls.ButtonGroup(btns=buttons) self.children.insert(0, btns)
def ConstructMainCont(self): self.spriteCont.Flush() self.mainItem = None self.mainTransform = None self.mainSprite = None self.codeEdit = None if self.mode is MODE_NORMAL: self.mainTransform = uicls.Transform(parent=self.spriteCont, align=uiconst.CENTER, pos=(0, 0, 128, 128)) self.mainSprite = uicls.Sprite( parent=self.mainTransform, align=uiconst.CENTER, pos=(0, 0, 128, 128), texturePath='res:/UI/Texture/CorpLogoLibs/419.png', texturePathSecondary='res:/UI/Texture/colorgradient.dds') elif self.mode is MODE_CODE: self.codeEdit = uicls.SinglelineEdit( parent=self.spriteCont, align=uiconst.TOTOP, label='Code that returns a UI object:', heigt=15, padding=(10, 30, 150, 0), setvalue=settings.user.ui.Get('TestAnimationsWndCode', 'uicore.layer.sidePanels')) uicls.Button(parent=self.spriteCont, align=uiconst.TOPLEFT, label='Assign result', top=60, left=5, func=self.OnAssignCodeBtn) elif self.mode is MODE_INPUT: self.mainItem = self.inputObj
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: self.sr.searchbutt = uicls.Button( parent=editParent, label=localization.GetByLabel('UI/Common/Search'), func=self.OnSearch, btn_default=0, align=uiconst.TOPRIGHT) else: self.sr.searchbutt.state = uiconst.UI_NORMAL elif self.sr.searchbutt != None: self.sr.searchbutt.state = uiconst.UI_HIDDEN
def Startup(self, *args): self.sr.selection = None self.sr.hilite = None self.OnSelectCallback = None self.sr.label = uicls.EveLabelSmall( text=localization.GetByLabel('UI/Neocom/NextDNAModification'), parent=self, left=8, top=4, maxLines=1) self.sr.respecTime = uicls.EveLabelMedium(text='', parent=self, left=8, top=18, maxLines=1) self.sr.numberOfRemaps = uicls.EveLabelMedium(text='', parent=self, left=8, top=38, maxLines=1, state=uiconst.UI_HIDDEN) self.sr.respecButton = uicls.Button( parent=self, label=localization.GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/Attributes/RemapStatsNow' ), align=uiconst.TOPRIGHT, pos=(2, 16, 0, 0), func=self.OpenRespecWindow, args=(False, )) self.hint = localization.GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/Attributes/CharacterSheetHint' )
def DrawLeftSide(self): self.sr.leftside = uicls.Container(name='leftside', parent=self.sr.main, align=uiconst.TOLEFT, width=256) uicls.Container(name='push', parent=self.sr.leftside, align=uiconst.TOTOP, height=6) self.sr.leftBottomPanel = uicls.Container(name='leftBottomPanel', parent=self.sr.leftside, align=uiconst.TOBOTTOM, height=26) self.sr.leftMainPanel = uicls.Container(name='leftMainPanel', parent=self.sr.leftside, align=uiconst.TOALL, pos=(const.defaultPadding, 0, const.defaultPadding, 0)) dummyParent = uicls.Container(name='dummy', parent=self.sr.leftMainPanel, align=uiconst.TOALL, pos=(0, 0, 0, 0)) ownerParent = uicls.Container(name='ownerParent', parent=dummyParent, align=uiconst.TOTOP, height=20) uicls.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 = uicls.Combo(label=None, parent=ownerParent, options=options, name='savedFittingsCombo', select=selected, callback=self.ChangeOwnerFilter, pos=(1, 1, 0, 0), align=uiconst.TOALL) searchContainer = uicls.Container(name='searchContainer', parent=dummyParent, align=uiconst.TOTOP, top=const.defaultPadding, height=20) self.sr.searchTextField = uicls.SinglelineEdit(name='searchTextField', parent=searchContainer, align=uiconst.TOLEFT, width=160, maxLength=40, left=1) self.sr.searchButton = uicls.Button(parent=searchContainer, label=localization.GetByLabel('UI/Common/Buttons/Search'), align=uiconst.CENTERRIGHT, func=self.Search) self.sr.scroll = uicls.Scroll(parent=dummyParent, align=uiconst.TOALL, padding=(0, const.defaultPadding, 0, const.defaultPadding)) self.sr.scroll.multiSelect = 0 buttonContainer = uicls.Container(name='', parent=self.sr.leftBottomPanel, pos=(0, 0, 0, 0)) parent = self.sr.fitButtons = uicls.ButtonGroup(btns=[[localization.GetByLabel('UI/Commands/Export'), self.ExportFittings, ()], [localization.GetByLabel('UI/Commands/Import'), self.ImportFittings, ()]], parent=buttonContainer, idx=0) self.exportButton = parent.GetBtnByLabel(localization.GetByLabel('UI/Commands/Export')) self.DrawFittings()
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.isTabStop = True self.currData = None self.bottomCont = uicls.Container(parent=self.sr.main, align=uiconst.TOBOTTOM, height=25) self.mainScreen = MainScreen(parent=self.sr.main, default_align=uiconst.TOPLEFT) self.mainScreen.SetNewsTickerData( *sm.GetService('holoscreen').GetNewsTickerData()) playlist = sm.GetService('holoscreen').playlist options = [(cls.__guid__, (cls, dataFunc)) for cls, dataFunc in playlist] self.combo = uicls.Combo(parent=self.bottomCont, options=options, pos=(10, 0, 150, 0), width=150, align=uiconst.TOPLEFT, callback=self.OnCombo) uicls.Button(parent=self.bottomCont, label='Reload', func=self.UpdateScreen, align=uiconst.TOPLEFT, pos=(165, 0, 100, 0)) self.checkbox = uicls.Checkbox(parent=self.bottomCont, text='Render to screen', align=uiconst.TOPLEFT, pos=(230, 0, 250, 0), checked=False, callback=self.OnCheckboxChanged) uicls.EveLabelMedium(parent=self.bottomCont, text='Press R to reload', align=uiconst.TOPRIGHT) self.checkbox.OnKeyDown = self.OnKeyDown
def ActivateKillRightMenu(self, menuParent): cont = menuParent.AddContainer(align=uiconst.TOTOP, padding=const.defaultPadding) cont.GetEntryWidth = lambda mc=cont: 230 charName = cfg.eveowners.Get(self.charID).name charNamelabel = localization.GetByLabel( 'UI/Contracts/ContractsWindow/ShowInfoLink', showInfoName=charName, info=('showinfo', const.typeCharacterAmarr, self.charID)) if self.price is not None: headerText = localization.GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/BuyKillRight') explainText = localization.GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/PurchaseLabel', charName=charNamelabel) priceText = localization.GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/AcativationCost', costAmount=util.FmtISK(self.price, 0)) else: headerText = localization.GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/ActivateKillRight') explainText = localization.GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/ActivateLabel', charName=charNamelabel) priceText = '' headerLabel = uicls.EveLabelLarge(text=headerText, parent=cont, align=uiconst.TOTOP, state=uiconst.UI_NORMAL, bold=True) helpTextCont = uicls.Container(name='helpTextCont', parent=cont, align=uiconst.TOTOP, height=40, padTop=const.defaultPadding) helpText = uicls.EveLabelMedium(text=explainText, parent=helpTextCont, state=uiconst.UI_NORMAL, align=uiconst.TOTOP, color=(1.0, 0.0, 0.0, 0.8)) buttonCont = uicls.Container(name='buttonCont', parent=cont, align=uiconst.TOTOP, height=20) priceLabel = uicls.EveLabelMedium(text=priceText, parent=buttonCont) buttonLabel = localization.GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/Activate') if self.price is None: self.func = 'ActivateKillRight' self.params = (self.killRightID, self.charID, self.shipID) else: self.func = 'BuyKillRight' self.params = (self.killRightID, self.charID, self.shipID, self.price) self.activateBtn = uicls.Button(parent=buttonCont, label=buttonLabel, align=uiconst.TORIGHT, func=self.ActivateKillRight)
def ApplyAttributes(self, attributes): super(uicls.CameraDebugWindow, self).ApplyAttributes(attributes) self.SetMinSize([self.default_width, self.default_height]) self.SetCaption('Camera Debug Window') self.sr.content.padding = (5, 16, 5, 5) self.debugSelectionClient = sm.GetService('debugSelectionClient') self.cameraDebugClient = sm.GetService('cameraDebugClient') self.cameraClient = sm.GetService('cameraClient') self.cameraStack = uicls.Label(parent=self.sr.content, align=uiconst.TOPLEFT, text=self.PrintCameraStack()) buttonContainer = uicls.Container(parent=self.sr.content, align=uiconst.TOBOTTOM, height=70, padding=(150, 0, 150, 0)) self.toggleCamera = uicls.Button(parent=buttonContainer, align=uiconst.TOBOTTOM, label='Activate Normal Camera', func=self.OnToggleDebugCamera) self.toggleCamUpdate = uicls.Button(parent=buttonContainer, align=uiconst.TOBOTTOM, label='Toggle Camera Update', func=self.OnToggleDebugCameraUpdate, hint='Toggle between updating the debug, and normal camera.') self.showCamCheckBox = uicls.Checkbox(parent=buttonContainer, aligh=uiconst.TOBOTTOM, text='Show Normal Camera', checked=False, callback=self.OnSnowNormalCameraCheckbox) self.cameraClient.AddSharedCamera('Debug Camera', cameras.DebugCamera()) if type(self.cameraClient.GetActiveCamera()) is cameras.DebugCamera: self.DisableDebugCamera() self.EnableDebugCamera() sm.GetService('navigation').hasControl = False
def Load(self, parentWindow, lpfnQueryCompleted = None): self.lpfnQueryCompleted = lpfnQueryCompleted parentWindow.left = parentWindow.width = parentWindow.height = const.defaultPadding wndForm = uicls.Container(name='form', parent=parentWindow, align=uiconst.TOALL, pos=(0, 0, 0, 0)) self.wndForm = wndForm self.scrollQuery = uicls.Scroll(name='queryinput', parent=wndForm, height=100, align=uiconst.TOTOP) uicls.Container(name='push', parent=wndForm, align=uiconst.TOTOP, height=const.defaultPadding) self.wndSearchBuilderToolbar = uicls.Container(name='searchtoolbar', parent=wndForm, align=uiconst.TOTOP, height=18) optionsList = [[localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/LogicalOR'), LOGICAL_OPERATOR_OR], [localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/LogicalAND'), LOGICAL_OPERATOR_AND]] combo = uicls.Combo(label='', parent=self.wndSearchBuilderToolbar, options=optionsList, name='join_operator', callback=self.OnComboChange, width=50, pos=(1, 0, 0, 0), align=uiconst.TOLEFT) self.comboJoinOperator = combo self.comboJoinOperator.state = uiconst.UI_HIDDEN combo = uicls.Combo(label='', parent=self.wndSearchBuilderToolbar, options=self.propertyList, name='property', callback=self.OnComboChange, width=128, pos=(const.defaultPadding, 0, 0, 0), align=uiconst.TOLEFT) self.comboProperty = combo combo = uicls.Combo(label='', parent=self.wndSearchBuilderToolbar, options=self.optionsByProperty[self.comboProperty.GetValue()], name='operator', callback=self.OnComboChange, width=80, pos=(const.defaultPadding, 0, 0, 0), align=uiconst.TOLEFT) combo.OnChange = self.OnComboChange self.comboOperator = combo wndInputControlArea = uicls.Container(name='inputArea', parent=self.wndSearchBuilderToolbar, align=uiconst.TOALL, pos=(0, 0, 0, 0)) self.wndInputFieldArea = wndInputControlArea self.ShowAppropriateInputField() wndOptionsBar = uicls.Container(name='options', parent=wndForm, align=uiconst.TOTOP, height=40) self.addEditButton = uicls.Button(parent=wndOptionsBar, label=localization.GetByLabel('UI/Commands/AddItem'), func=self.AddSearchTerm, btn_default=0, align=uiconst.TOPRIGHT) self.saveEditButton = uicls.Button(parent=wndOptionsBar, label=localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/Save'), pos=(self.addEditButton.width + 6, 0, 0, 0), func=self.SaveEditedSearchTerm, btn_default=0, align=uiconst.TOPRIGHT) self.cancelEditButton = uicls.Button(parent=wndOptionsBar, label=localization.GetByLabel('UI/Commands/Cancel'), pos=(self.saveEditButton.left + self.saveEditButton.width + 6, 0, 0, 0), func=self.CancelEditedSearchTerm, btn_default=0, align=uiconst.TOPRIGHT) self.saveEditButton.state = uiconst.UI_HIDDEN self.cancelEditButton.state = uiconst.UI_HIDDEN uicls.Checkbox(text=localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/SearchTitles'), parent=wndOptionsBar, configName='FMBQsearchTitles', retval=None, checked=settings.user.ui.Get('FMBQsearchTitles', 0), groupname=None, callback=self.CheckBoxChange, align=uiconst.TOPLEFT, pos=(0, 4, 400, 0)) uicls.Checkbox(text=localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/IncludeImpliedRoles'), parent=wndOptionsBar, configName='FMBQincludeImplied', retval=None, checked=settings.user.ui.Get('FMBQincludeImplied', 0), groupname=None, callback=self.CheckBoxChange, align=uiconst.TOPLEFT, pos=(0, 20, 400, 0)) wndButtonBar = uicls.Container(name='execute', parent=wndForm, align=uiconst.TOTOP, height=16) button = uicls.Button(parent=wndButtonBar, label=localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/ExecuteQuery'), func=self.ExecuteQuery, btn_default=0, align=uiconst.CENTER) wndButtonBar.height = button.height return wndForm
def ApplyAttributes(self, attributes): uicls.Container.ApplyAttributes(self, attributes) uicls.Label(parent=self, pos=(20, 200, 300, 20), maxLines=1, text='Hello_world!') uicls.Button(parent=self, pos=(20, 230, 300, 20), label='Push!', mouseupfunc=self.HandleButton)
def ApplyAttributes(self, attributes): uicls.Container.ApplyAttributes(self, attributes) uicls.Label(parent=self, pos=(20, 200, 300, 20), maxLines=1, text='Second') uicls.Button(parent=self, pos=(20, 230, 300, 20), label='Next', mouseupfunc=self.parent.AcceptPage2)
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.SetCaption(localization.GetByLabel('UI/Notepad/Notepad')) self.SetWndIcon('ui_49_64_2') self.SetTopparentHeight(0) self.SetMinSize((256, 128)) self.HideMainIcon() self.sr.main.padding = const.defaultPadding self.sr.nav = uicls.Container(name='nav', align=uiconst.TOLEFT, width=settings.user.ui.Get('notepadscrollistwidth', 128), parent=self.sr.main, idx=0) divider = xtriui.Divider(name='divider', align=uiconst.TOLEFT, idx=1, width=const.defaultPadding, parent=self.sr.main, state=uiconst.UI_NORMAL) divider.Startup(self.sr.nav, 'width', 'x', 100, 256) self.sr.navbuttons = uicls.Container(name='navbuttons', align=uiconst.TOBOTTOM, parent=self.sr.nav, height=38) self.sr.newfolder = uicls.Button(parent=self.sr.navbuttons, label=localization.GetByLabel('UI/Notepad/NewFolder'), padTop=4, align=uiconst.TOTOP, func=self.NewFolderClick) self.sr.newnote = uicls.Button(parent=self.sr.navbuttons, label=localization.GetByLabel('UI/Notepad/NewNote'), padTop=4, align=uiconst.TOTOP, func=self.NewNote, args=(0,)) self.sr.navbuttons.height = sum([ each.height + each.padTop + each.padBottom for each in self.sr.navbuttons.children ]) + 4 self.sr.senderlist = uicls.Scroll(name='senderlist', parent=self.sr.nav) self.sr.senderlist.OnDelete = self.OnDelete self.sr.senderlist.multiSelect = 0 self.sr.note = uicls.Container(name='notecontainer', align=uiconst.TOALL, parent=self.sr.main, pos=(0, 0, 0, 0)) self.sr.titlecont = uicls.Container(name='titlecontainer', align=uiconst.TOTOP, height=48, parent=self.sr.note) uicls.Frame(parent=self.sr.titlecont, padBottom=const.defaultPadding) uicls.Container(name='push', align=uiconst.TORIGHT, width=7, parent=self.sr.titlecont) uicls.Container(name='push', align=uiconst.TOTOP, height=9, parent=self.sr.titlecont) self.sr.icon = uicls.Icon(parent=self.sr.titlecont, pos=(7, 7, 32, 32)) self.sr.titletext = uicls.EveLabelMedium(text='', parent=self.sr.titlecont, align=uiconst.TOALL, padLeft=46) self.sr.browser = uicls.EditPlainText(parent=self.sr.note, showattributepanel=1, counterMax=3900, countWithTags=True) self.sr.browser.sr.window = self self.sr.browser.allowPrivateDrops = 1 self.OnScale_ = self._OnResize divider.OnSizeChanging = self.OnDividerMove self.starting = 1 import log log.LogInfo('Starting Notepad') self.bms = None self.folders = {} self.notes = {} self.bookmarknotes = {} self.charnotes = {} self.settings = {} self.settingStrs = {} self.notedata = {} self.lastid = 0 uthread.new(self.LoadNotesData)
def ConstructLayout(self): cont = uicls.Container(parent=self.sr.main, align=uiconst.TOALL, padding=const.defaultPadding) if boot.region == 'optic': nameValue = localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Home/NameAlliance', allianceName=cfg.eveowners.Get(session.corpid).ownerName) else: nameValue = localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Home/NameAlliance', languageID=localization.LOCALE_SHORT_ENGLISH, allianceName=cfg.eveowners.Get(session.corpid).ownerName) self.nameEdit = uicls.SinglelineEdit( parent=cont, label=localization.GetByLabel('UI/Common/Name'), align=uiconst.TOTOP, maxLength=100, padTop=12, setvalue=nameValue) shortNameCont = uicls.Container(parent=cont, align=uiconst.TOTOP, height=30, padTop=20) suggestBtn = uicls.Button( parent=shortNameCont, align=uiconst.TOPRIGHT, label=localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Home/SuggestCommand' ), func=self.GetSuggestedTickerNames) editWidth = self.width - suggestBtn.width - 16 self.shortNameEdit = uicls.SinglelineEdit( parent=shortNameCont, label=localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Home/ShortName'), align=uiconst.TOPLEFT, maxLength=5, width=editWidth) self.urlEdit = uicls.SinglelineEdit( parent=cont, label=localization.GetByLabel('UI/Common/URL'), align=uiconst.TOTOP, maxLenght=2048, padTop=12) editLabel = uicls.EveLabelSmall( parent=cont, text=localization.GetByLabel('UI/Common/Description'), height=16, align=uiconst.TOTOP, padTop=12) self.descriptionEdit = uicls.EditPlainText(parent=cont, align=uiconst.TOTOP, maxLength=5000, height=80)
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.minsize = (540, 200) self.zactionClient = sm.GetService('zactionClient') self.entityClient = sm.GetService('entityClient') self.playerEntID = self.entityClient.GetPlayerEntity().entityID self.selectedEntID = self.playerEntID self.entityIDs = [] for sceneID, scene in self.entityClient.scenes.iteritems(): for entityID, entity in scene.entities.iteritems(): if entity.HasComponent('action') and entity.HasComponent('info'): displayName = entity.info.name + ' - ' + str(entity.entityID) self.entityIDs.append((displayName, entity.entityID, '')) self.currentActionID = None self.selected = None self.selectedDo = None self.selectedForce = None def OnSelectEntity(entry, label, value): self.selectedEntID = value self.availableActions.LoadContent(contentList=self._GetAvailableActions(), keepPosition=True) self.curActionLabel = uicls.LabelCore(parent=self.sr.content, align=uiconst.TOTOP, text='Current action:', pos=(0, 0, 0, 0), padding=(5, 5, 5, 5)) maincontainer = uicls.Container(parent=self.sr.content, align=uiconst.TOALL, pos=(0, 0, 0, 0)) self.entityDropdown = uicls.Combo(parent=maincontainer, options=self.entityIDs, select=self.playerEntID, name='entitySelect', callback=OnSelectEntity, align=uiconst.TOTOP, pos=(0, 0, 0, 0)) splitcontainer = uicls.Container(parent=maincontainer, align=uiconst.TOALL, pos=(0, 0, 0, 0)) rightcontainer = uicls.Container(parent=splitcontainer, align=uiconst.TORIGHT, pos=(0, 0, 250, 0), padding=(5, 5, 5, 5)) leftcontainer = uicls.Container(parent=splitcontainer, align=uiconst.TOALL, pos=(0, 0, 0, 0), padding=(5, 5, 5, 5)) uicls.LabelCore(parent=leftcontainer, align=uiconst.TOTOP, text='Available Actions:', pos=(0, 0, 0, 0), padding=(5, 5, 5, 5)) self.buttonContainer = uicls.Container(parent=leftcontainer, align=uiconst.TOBOTTOM, pos=(0, 0, 8, 8), padding=(5, 5, 5, 5)) self.availableActions = uicls.Scroll(parent=leftcontainer, name='zactionScroll', align=uiconst.TOALL, pos=(0, 0, 0, 0)) self.availableActions.LoadContent(contentList=self._GetAvailableActions(), keepPosition=True) self.startButton = uicls.Button(parent=self.buttonContainer, align=uiconst.CENTER, label='Do Action!', func=self.DoAction, pos=(0, 0, 0, 0)) uicls.LabelCore(parent=rightcontainer, align=uiconst.TOTOP, text='All Actions:', pos=(0, 0, 0, 0), padding=(5, 5, 5, 5)) self.rightButtonContainer = uicls.Container(parent=rightcontainer, align=uiconst.TOBOTTOM, pos=(0, 0, 8, 8), padding=(5, 5, 5, 5)) self.allActions = uicls.Scroll(parent=rightcontainer, name='allActionScroll', align=uiconst.TOALL, pos=(0, 0, 0, 0)) self.allActions.LoadContent(contentList=self._GetAllActions(), keepPosition=True) self.forceButton = uicls.Button(parent=self.rightButtonContainer, align=uiconst.CENTER, label='Force Action!', func=self.ForceAction, pos=(0, 0, 0, 0)) sm.RegisterNotify(self) self.sr.updateTimer = base.AutoTimer(100, self._UpdateCurrentAction)
def ApplyAttributes(self, attributes): self._ready = False uicls.Window.ApplyAttributes(self, attributes) self.graphs = trinity.GraphManager() self.graphs.SetEnabled(True) if hasattr(self, 'SetTopparentHeight'): self.SetTopparentHeight(0) self.container = uicls.Container(parent=self.sr.main, align=uiconst.TOALL) else: self.container = uicls.Container(parent=self.sr.content, align=uiconst.TOALL) self.settingsContainer = uicls.Container(parent=self.container, align=uiconst.TOTOP, height=30) self.showTimersChk = uicls.Checkbox(parent=self.settingsContainer, align=uiconst.TOLEFT, text='Timers', checked=True, width=120, height=30, callback=self.PopulateScroll) self.showMemoryChk = uicls.Checkbox(parent=self.settingsContainer, align=uiconst.TOLEFT, text='Memory counters', checked=True, width=120, height=30, callback=self.PopulateScroll) self.showLowCountersChk = uicls.Checkbox(parent=self.settingsContainer, align=uiconst.TOLEFT, text='Low counters', checked=True, width=120, height=30, callback=self.PopulateScroll) self.showHighCountersChk = uicls.Checkbox(parent=self.settingsContainer, align=uiconst.TOLEFT, text='High counters', checked=True, width=120, height=30, callback=self.PopulateScroll) self.resetBtn = uicls.Button(parent=self.settingsContainer, align=uiconst.TORIGHT, label='Reset peaks', width=120, height=30, func=self.PopulateScroll) self.refreshBtn = uicls.Button(parent=self.settingsContainer, align=uiconst.TORIGHT, label='Refresh', width=120, height=30, func=self.PopulateScroll) self.scroll = uicls.Scroll(parent=self.container, id='blueGraphsScroll', align=uiconst.TOTOP, height=200) self.graphsContainer = uicls.Container(parent=self.container, align=uiconst.TOALL) self._ready = True self.PopulateScroll()
def ApplyAttributes(self, attributes): super(uicls.DebugSelectionWindow, self).ApplyAttributes(attributes) self.SetMinSize([40, self.default_height]) self.SetCaption('Debug Selection') self.sr.content.padding = 5 self.debugSelectionClient = sm.GetService('debugSelectionClient') self.debugSelectionClient._SetUpdateFunc(self._UpdateSelectionEntity) self.displayName = uicls.Label(parent=self.sr.content, align=uiconst.TOTOP, text=' ', padding=(0, 5, 0, 5)) topContainer = uicls.Container(parent=self.sr.content, align=uiconst.CENTER, height=25) bottomContainer = uicls.Container(parent=self.sr.content, align=uiconst.CENTERBOTTOM, height=25) width = 0 width += uicls.Button(parent=topContainer, align=uiconst.TOLEFT, label='Select Player', padding=(2, 0, 2, 0), func=self._SelectPlayer).width + 4 width += uicls.Button(parent=topContainer, align=uiconst.TOLEFT, label='Select Target', padding=(2, 0, 2, 0), func=self._SelectSelected).width width += uicls.Button(parent=topContainer, align=uiconst.TOLEFT, label='Clear Selection', padding=(2, 0, 2, 0), func=self._ClearSelection).width + 4 topContainer.width = width width = 0 width += uicls.Button(parent=bottomContainer, align=uiconst.TOLEFT, label='Select Previous', padding=(2, 0, 2, 0), func=self._SelectPrevious).width + 4 width += uicls.Button(parent=bottomContainer, align=uiconst.TOLEFT, label='Select Next', padding=(2, 0, 2, 0), func=self._SelectNext).width + 4 bottomContainer.width = width self.SetMinSize([max(bottomContainer.width, topContainer.width) + 10, self.default_height]) self._UpdateSelectionEntity(self.debugSelectionClient.GetSelectedID(), ' ')
def PrepareNavigationBar(self): mainArea = self.GetMainArea() self.navigationBar = uicls.Container(name='navBar', parent=mainArea, align=uiconst.TOTOP, height=24, padBottom=4) buttonParent = uicls.Container(name='buttonParent', parent=self.navigationBar, align=uiconst.TORIGHT, padRight=const.defaultPadding) goBtn = uicls.Button(parent=buttonParent, label=localization.GetByLabel('UI/Browser/Go'), func=self.OnGoBtn, align=uiconst.CENTER) buttonParent.width = goBtn.width iconContainer = uicls.Container(name='sslIndicator', parent=self.navigationBar, align=uiconst.TORIGHT, width=20, padRight=const.defaultPadding) uicls.Icon(name='sslIcon', icon='res:/UI/Texture/classes/Browser/sslIcon.png', parent=iconContainer, pos=(-2, -1, 24, 24), hint=localization.GetByLabel('UI/Browser/SecureConnection'), ignoreSize=True, state=uiconst.UI_NORMAL) self.sslIconContainer = iconContainer self.urlInput = uicls.SinglelineEdit(name='urlInput', parent=self.navigationBar, padTop=1, padRight=const.defaultPadding, maxLength=1630, autoselect=True, align=uiconst.TOTOP) self.urlInput.OnReturn = self.BrowseTo self.urlInput.OnHistoryClick = self.OnHistoryClicked
def ConstructLayout(self, *args): topCont = uicls.Container(name='topCont', align=uiconst.TOTOP, height=14, parent=self.sr.main) left = const.defaultPadding self.sr.buttonContainer = uicls.Container(name='buttonContainer', align=uiconst.TOBOTTOM, parent=self.sr.main) self.checkAllCB = uicls.Checkbox( text=localization.GetByLabel('UI/Shared/CheckAllOn'), parent=topCont, align=uiconst.TOTOP, height=16, padLeft=left, callback=self.CheckAll, checked=True) left = const.defaultPadding self.sr.filenameLabel = uicls.EveLabelMedium( text=localization.GetByLabel('UI/Common/Files/FileName'), parent=self.sr.buttonContainer, top=const.defaultPadding, left=left, state=uiconst.UI_NORMAL) left += self.sr.filenameLabel.width + const.defaultPadding self.sr.filename = uicls.SinglelineEdit(name='filename', parent=self.sr.buttonContainer, pos=(left, const.defaultPadding, 150, 0), align=uiconst.TOPLEFT) self.sr.filename.SetMaxLength(32) left += self.sr.filename.width + const.defaultPadding self.sr.exportBtn = uicls.Button( parent=self.sr.buttonContainer, label=localization.GetByLabel('UI/Commands/Export'), func=self.Export, btn_default=1, idx=0, pos=(left, const.defaultPadding, 0, 0)) self.sr.buttonContainer.height = self.sr.filename.height + 10 self.sr.scrolllistcontainer = uicls.Container( name='scrolllistcontainer', align=uiconst.TOALL, parent=self.sr.main, pos=(0, 0, 0, 0)) self.sr.scroll = uicls.Scroll( name='scroll', parent=self.sr.scrolllistcontainer, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.ConstructScrollList()
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) if hasattr(self, 'SetTopparentHeight'): self.SetTopparentHeight(0) if self.sr.main is None: self.sr.main = uicls.Container(parent=self.sr.maincontainer) self.mainItem = None self.mainSprite = None self.mainTransform = None self.inputObj = attributes.get('animObj', None) self.codeEdit = None self.duration = 0.5 self.loops = 1 self.curveSet = None if self.inputObj: self.mode = MODE_INPUT else: self.mode = MODE_NORMAL self.topCont = uicls.Container(name='topCont', parent=self.sr.main, align=uiconst.TOTOP, height=20) self.mainCont = uicls.Container(name='mainCont', parent=self.sr.main, align=uiconst.TOTOP, height=200) self.topRightCont = uicls.Container(name='topRightCont', parent=self.mainCont, align=uiconst.TORIGHT, width=100) self.spriteCont = uicls.Container(name='spriteCont', parent=self.mainCont) self.buttonCont = uicls.GridContainer(name='buttonCont', parent=self.sr.main, align=uiconst.TOBOTTOM, height=30, columns=3, lines=1) self.bottomCont = uicls.Container(name='bottomCont', parent=self.sr.main) self.ConstructTopCont() self.ConstructTopRightCont() self.ConstructBottomCont() self.ConstructMainCont() btns = [('Uncheck all', self.UncheckAll, ()), ('Stop all', self.StopAllAnimations, ()), ('Play selected', self.PlaySelected, ())] for label, func, args in btns: uicls.Button(parent=uicls.Container(parent=self.buttonCont), label=label, func=func, align=uiconst.CENTER)
def ApplyAttributes(self, attributes): import uicls import uiconst uicls.Window.ApplyAttributes(self, attributes) uicls.Button(parent=self.sr.maincontainer, align=uiconst.TOLEFT, label="UIDebugger", func=self.OpenUIDebugger) uicls.Button(parent=self.sr.maincontainer, align=uiconst.TOLEFT, label="Dungeon Editor", func=self.OpenDungeonEditor) uicls.Button(parent=self.sr.maincontainer, align=uiconst.TOLEFT, label="Paint Direction Vectors", func=self.StartPaintingDirectionVectors) #uicls.Button(self.sr.maincontainer, align=uiconst.TOLEFT, label="Camera Settings", func=self.OpenCameraSettings) uicls.Button(parent=self.sr.maincontainer, align=uiconst.TOLEFT, label="Start RC", func=self.ToggleRemoteConsole)
def ApplyAttributes(self, attributes): uicls.SE_GenericCore.ApplyAttributes(self, attributes) self.checkbox = uicls.Checkbox(parent=self, align=uiconst.CENTERLEFT, pos=(45, 0, 16, 16), idx=0) self.checkbox.data = {} self.checkbox.OnChange = self.CheckBoxChange self.btn = uicls.Button(parent=self, align=uiconst.TOLEFT, fixedwidth=45, label='Play', func=self.PlayAnimation)
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.SetTopparentHeight(4) self.collectingFpsStats = False self.fpsStats = [] self.fpsLabel = uicls.Label(parent=self.sr.main, left=4, width=80, fontsize=18) self.fpsStat = blue.statistics.Find('FPS') self.legendContainer = uicls.GridContainer(parent=self.sr.main, align=uiconst.TORIGHT, width=28, columns=1, padRight=4, padBottom=4) self.startStatsBtn = uicls.Button(parent=self.sr.main, align=uiconst.BOTTOMLEFT, label='Start Collecting Stats', left=5, top=10, func=self.StartCollectingFpsStats) self.stopStatsBtn = uicls.Button(parent=self.sr.main, align=uiconst.BOTTOMLEFT, label='Stop Collecting Stats', left=5, top=10, func=self.StopCollectingFpsStats, state=uiconst.UI_HIDDEN) self.timeLabel = uicls.Label(parent=self.sr.main, align=uiconst.BOTTOMLEFT, left=142, top=11, width=100, fontsize=12) self.labels = [] for i in xrange(4): label = uicls.Label(parent=self.legendContainer, align=uiconst.TOTOP, width=20, top=-4) self.labels.append(label) graphContainer = uicls.Container(parent=self.sr.main, align=uiconst.TOALL, padLeft=4, padRight=4, padBottom=4) gr = uicls.GraphRenderer(parent=graphContainer, align=uiconst.TOALL) self.renderer = gr.renderer self.renderer.scaleChangeCallback = self.ScaleChangeHandler if self.fpsStat: uthread.new(self.UpdateFpsLabel)
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.loadingShowcontent = 0 self.SetScope('station_inflight') self.SetMinSize([400, 250]) self.SetCaption(localization.GetByLabel('UI/Chat/ChannelWindow/Channels')) self.SetWndIcon('ui_9_64_2') self.SetTopparentHeight(70) self.sr.inpt = inpt = uicls.SinglelineEdit(name='input', parent=self.sr.topParent, maxLength=60, left=74, top=20, width=86, label=localization.GetByLabel('UI/Chat/ChannelWindow/Channels')) joinBtn = uicls.Button(parent=self.sr.topParent, label=localization.GetByLabel('UI/Chat/ChannelWindow/Join'), pos=(inpt.left, inpt.top + inpt.height + 4, 0, 0), func=self.JoinChannelFromBtn, args='self', btn_default=1) createBtn = uicls.Button(parent=self.sr.topParent, label=localization.GetByLabel('UI/Chat/ChannelWindow/Create'), pos=(joinBtn.left + joinBtn.width + 2, joinBtn.top, 0, 0), func=self.CreateChannelFromBtn, args='self') self.sr.inpt.width = max(100, joinBtn.left + joinBtn.width - inpt.left) channelsMaillist = uicls.Container(name='channelsMaillist', parent=self.sr.main, left=const.defaultPadding, top=const.defaultPadding, width=const.defaultPadding, height=const.defaultPadding) self.sr.scroll = uicls.Scroll(parent=channelsMaillist) self.sr.scroll.multiSelect = 0 self.ShowContent()
def Test(cls): uicls.Window.CloseIfOpen(windowID='LayoutGrid') wnd = uicls.Window.Open(windowID='LayoutGrid') wnd.SetTopparentHeight(0) main = wnd.GetMainArea() wnd._scrollContainer = uicls.ScrollContainer(parent=main, padding=4) wnd._scrollContainer.verticalScrollBar.align = uiconst.TORIGHT_NOPUSH wnd._scrollContainer.horizontalScrollBar.align = uiconst.TOBOTTOM_NOPUSH grid = uicls.LayoutGrid(parent=wnd._scrollContainer, align=uiconst.TOTOP, name='LayoutGrid', state=uiconst.UI_NORMAL, columns=5, cellPadding=12, cellSpacing=16, cellBgColor=(1, 1, 1, 0.1)) lorem = u'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque rutrum neque ut metus pharetra malesuada. Vivamus mollis vulputate ornare. Quisque condimentum interdum arcu, nec pellentesque tellus venenatis non. Fusce nec feugiat libero. Nulla non velit felis. Morbi accumsan interdum erat sodales egestas. In mauris lorem, cursus et posuere sit amet, aliquet sit amet turpis. Maecenas tincidunt fringilla congue. Maecenas eu nibh quis mauris placerat vulputate. Curabitur condimentum arcu ut dui aliquet quis blandit ligula consectetur. Morbi consectetur egestas tortor, ut interdum nibh viverra id. Proin mattis eleifend dignissim. In eget laoreet nisl. ' grid.SetColumnWidth(1, COLUMN_WIDTH_FILL) grid.SetColumnWidth(2, COLUMN_WIDTH_FILL) grid.AddCell(cellObject=uicls.Button(label='Bless', align=uiconst.CENTER), rowSpan=2) t = uicls.EveLabelMedium(text=lorem, align=uiconst.TOTOP) grid.AddCell(cellObject=t, colSpan=3, rowSpan=3) grid.AddCell() uicls.Button(label='Hallo', parent=grid) uicls.SinglelineEdit(align=uiconst.TOPLEFT, parent=grid) grid.AddCell() grid.AddCell(bgColor=(1, 0, 0, 0.25)) uicls.Button(label='Bless', align=uiconst.CENTER, parent=grid) t = uicls.EveLabelMedium( text='Quisque rutrum neque ut metus pharetra malesuada', align=uiconst.TOTOP) grid.AddCell(cellObject=t, bgColor=(0, 0, 1, 0.25)) grid.AddCell() uicls.EveLabelMedium(text='Vivamus mollis vulputate ornare', align=uiconst.TOTOP, parent=grid) return grid
def ShowSearch(self, *args): if not self.sr.search_inited: search_cont = uicls.Container(name='search_cont', parent=self, height=36, align=uiconst.TOTOP, idx=1) self.sr.search_cont = search_cont catOptions = [(localization.GetByLabel('UI/Common/All'), None)] categories = [] for c in cfg.invcategories: if c.categoryID > 0: categories.append([c.categoryName, c.categoryID, c.published]) categories.sort() for c in categories: if c[2]: catOptions.append((c[0], c[1])) typeOptions = [(localization.GetByLabel('UI/Corporations/Common/Offices'), 'offices'), (localization.GetByLabel('UI/Corporations/Assets/Impounded'), 'junk'), (localization.GetByLabel('UI/Corporations/Assets/InSpace'), 'property'), (localization.GetByLabel('UI/Corporations/Assets/Deliveries'), 'deliveries')] left = 5 top = 17 self.sr.fltType = c = uicls.Combo(label=localization.GetByLabel('UI/Common/Where'), parent=search_cont, options=typeOptions, name='flt_type', select=settings.user.ui.Get('corp_assets_filter_type', None), callback=self.ComboChange, width=90, pos=(left, top, 0, 0)) left += c.width + 4 self.sr.fltCategories = c = uicls.Combo(label=localization.GetByLabel('UI/Corporations/Assets/ItemCategory'), parent=search_cont, options=catOptions, name='flt_category', select=settings.user.ui.Get('corp_assets_filter_categories', None), callback=self.ComboChange, width=90, pos=(left, top, 0, 0)) left += c.width + 4 grpOptions = [(localization.GetByLabel('UI/Common/All'), None)] self.sr.fltGroups = c = uicls.Combo(label=localization.GetByLabel('UI/Corporations/Assets/ItemGroup'), parent=search_cont, options=grpOptions, name='flt_group', select=settings.user.ui.Get('corp_assets_filter_groups', None), callback=self.ComboChange, width=90, pos=(left, top, 0, 0)) left += c.width + 4 self.sr.fltItemType = c = uicls.SinglelineEdit(name='flt_exacttype', parent=search_cont, label=localization.GetByLabel('UI/Corporations/Assets/ItemTypeExact'), setvalue=settings.user.ui.Get('corp_assets_filter_itemtype', ''), width=106, top=top, left=left, isTypeField=True) left += c.width + 4 c.OnFocusLost = self.ParseItemType self.sr.fltQuantity = c = uicls.SinglelineEdit(name='flt_quantity', parent=search_cont, label=localization.GetByLabel('UI/Corporations/Assets/MinQuantity'), setvalue=str(settings.user.ui.Get('corp_assets_filter_quantity', '')), width=60, top=top, left=left) left += c.width + 4 c = self.sr.fltSearch = uicls.Button(parent=search_cont, label=localization.GetByLabel('UI/Common/Search'), func=self.Search, pos=(left, top, 0, 0), btn_default=1) self.PopulateGroupCombo(isSel=True) self.sr.search_inited = 1 self.sr.search_cont.state = uiconst.UI_PICKCHILDREN self.sr.scroll.Load(fixedEntryHeight=42, contentList=[], sortby='label', headers=uix.GetInvItemDefaultHeaders()[:], noContentHint=localization.GetByLabel('UI/Corporations/Assets/NoItemsFound'))
def ToggleRemoteConsole(self, a): import uicls import uiconst self.sr.maincontainer.children.remove( self.sr.maincontainer.children[9] ) # TODO: Nick: Fix this hardcoded garbage if possible if self.console_state == 0: uicls.Button(parent=self.sr.maincontainer, align=uiconst.TOLEFT, label="RC Running..", func=self.ToggleRemoteConsole) self.console_state = 1 sm.GetService("insider").start_remote_console()