def ApplyAttributes(self, attributes): uicls.Container.ApplyAttributes(self, attributes) self.events = [] self.settingsName = self.__guid__.split('.')[1] + 'ignoreEvents' settings.user.ui.Set(self.settingsName, self.default_ignoreEvents) self.ignoreEvents = settings.user.ui.Get(self.settingsName, self.default_ignoreEvents) self.updatePending = False self.showMax = 100 self.scrollUpdateRequested = False self.isPaused = False self.rightCont = uicls.Container(name='rightCont', parent=self, align=uiconst.TORIGHT, width=150, padding=3) uicls.Label(parent=self.rightCont, align=uiconst.TOTOP, text='<color=red>IGNORE LIST</color>') uicls.Label( parent=self.rightCont, align=uiconst.TOBOTTOM, text='Right-click logged entries to add that event type to ignore') self.ignoreScroll = uicls.Scroll(parent=self.rightCont, align=uiconst.TOALL) self._UpdateIgnoreScroll() btns = (('Clear', self.ResetEventData, ()), ('<color=green>Pause logging</color>', self.PauseResumeLogging, ())) btnGroup = uicls.ButtonGroup(parent=self, btns=btns) self.pauseResumeBtn = btnGroup.GetBtnByIdx(1) self.scroll = uicls.Scroll(parent=self, align=uiconst.TOALL, padding=3) uthread.new(self._UpdateScrollThread)
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 PanelShowSchematics(self): self.schematicsCont = cont = uicls.Container(parent=self.actionCont, name='schematicsCont', pos=(0, 0, 0, 155), align=uiconst.TOTOP, state=uiconst.UI_HIDDEN) self.schematicsScroll = uicls.Scroll(parent=cont, name='schematicsScroll', align=uiconst.TOTOP, height=148) self.schematicsScroll.Startup() self.schematicsScroll.sr.id = 'planetProcessorSchematicsScroll' self.schematicsScroll.multiSelect = False self.schematicsScroll.HideUnderLay() self.schematicsScroll.OnSelectionChange = self.OnSchematicScrollSelectionChange uicls.Frame(parent=self.schematicsScroll, color=(1.0, 1.0, 1.0, 0.2)) self.LoadSchematicsScroll() self.selectedSchematicCont = uicls.Container( parent=cont, name='selectedSchematicCont', pos=(0, 0, 0, 0), padding=(0, 7, 0, 0), align=uiconst.TOALL, state=uiconst.UI_PICKCHILDREN) return cont
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.SetCaption(localization.GetByLabel('UI/Accessories/Log/Log')) self.SetMinSize([256, 100]) self.SetWndIcon('ui_34_64_4', hidden=True) self.SetTopparentHeight(0) self.SetScope('all') margin = const.defaultPadding scroll = uicls.Scroll(parent=self.sr.main, padding=const.defaultPadding) scroll.padTop = 20 scroll.Load(contentList=[], fixedEntryHeight=18, headers=[localization.GetByLabel('UI/Common/DateWords/Time'), localization.GetByLabel('UI/Accessories/Log/Type'), localization.GetByLabel('UI/Accessories/Log/Message')]) scroll.sr.id = 'logScroll' self.sr.scroll = scroll self.settingMenu = uicls.UtilMenu(menuAlign=uiconst.TOPLEFT, parent=self.sr.main, align=uiconst.TOPLEFT, GetUtilMenu=self.GetNotificationsSettingsMenu, left=const.defaultPadding, label=localization.GetByLabel('UI/Accessories/Log/CombatSettings'), texturePath='res:/UI/Texture/Icons/38_16_229.png', closeTexturePath='res:/UI/Texture/Icons/38_16_230.png') self.filterMenu = uicls.UtilMenu(menuAlign=uiconst.TOPRIGHT, parent=self.sr.main, align=uiconst.TOPRIGHT, GetUtilMenu=self.GetLogFilterMenu, left=const.defaultPadding, width=20, height=20, iconSize=16, texturePath='res:/UI/Texture/Icons/38_16_205.png') self.localizedMessages = {'error': localization.GetByLabel('UI/Accessories/Log/LogError'), 'warning': localization.GetByLabel('UI/Accessories/Log/LogWarn'), 'slash': localization.GetByLabel('UI/Accessories/Log/LogSlash'), 'combat': localization.GetByLabel('UI/Accessories/Log/LogCombat'), 'notify': localization.GetByLabel('UI/Accessories/Log/LogNotify'), 'question': localization.GetByLabel('UI/Accessories/Log/LogQuestion'), 'info': localization.GetByLabel('UI/Accessories/Log/LogInfo'), 'hint': localization.GetByLabel('UI/Accessories/Log/LogHint')} self.LoadAllMessages() self.timer = base.AutoTimer(1000, self.CheckMessages)
def InitCloneFacilityPanel(self): panel = self.sr.clonefacilityPanel btns = [(localization.GetByLabel('UI/Ship/ShipConfig/Invite'), self.InviteClone, (), 84), (localization.GetByLabel('UI/Ship/ShipConfig/Destroy'), self.DestroyClone, (), 84)] self.cloneFacilityButtons = uicls.ButtonGroup(btns=btns, parent=panel) if not session.solarsystemid: self.cloneFacilityButtons.GetBtnByIdx(0).Disable() numClones = int(0) totalClones = int( getattr( sm.GetService('godma').GetItem(self.shipItem.itemID), 'maxJumpClones', 0)) text = localization.GetByLabel('UI/Ship/ShipConfig/NumJumpClones', numClones=numClones, totalClones=totalClones) self.sr.cloneInfo = uicls.EveLabelSmall( text=text, parent=panel, align=uiconst.TOTOP, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, 0), state=uiconst.UI_NORMAL) self.sr.clonescroll = uicls.Scroll(name='clonescroll', parent=panel, padding=const.defaultPadding) self.cloneinited = 1
def CreateWindow(self): self.sr.inited = 1 self.sr.rejectedContainer = uicls.Container(name='rejectedContainer', align=uiconst.TOTOP, parent=self, pos=(0, 0, 0, 18)) showRejectedLabel = localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Applications/ShowRejected' ) self.sr.viewRejected = uicls.Checkbox(text=showRejectedLabel, parent=self.sr.rejectedContainer, configName='viewRejected', retval=1, checked=0, groupname=None, callback=self.CheckBoxChecked, align=uiconst.TOPLEFT, pos=(const.defaultPadding, const.defaultPadding, 150, 0)) self.sr.scroll = uicls.Scroll( name='applications', parent=self, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.tabs = uicls.TabGroup(name='tabparent', parent=self, idx=0) allianceLabel = localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Alliance') myApplicationsLabel = localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Applications/MyApplications' ) self.sr.tabs.Startup( [[allianceLabel, self, self, 'alliance'], [myApplicationsLabel, self, self, 'myApplications']], 'allianceApplications')
def PanelShowProducts(self): cont = uicls.Container(parent=self.actionCont, pos=(0, 0, 0, 200), align=uiconst.TOTOP, state=uiconst.UI_HIDDEN) self.productScroll = scroll = uicls.Scroll(parent=cont, name='productsScroll', align=uiconst.TOTOP, height=175) scroll.HideUnderLay() self.LoadProductScroll() uicls.Frame(parent=scroll, color=(1.0, 1.0, 1.0, 0.2)) self.buttonContainer = uicls.Container(parent=self.actionCont, pos=(0, 0, 0, 30), align=uiconst.TOBOTTOM, state=uiconst.UI_PICKCHILDREN) btns = [[ localization.GetByLabel('UI/PI/Common/CreateRoute'), self._CreateRoute, 'productScroll' ]] self.createRouteButton = uicls.ButtonGroup(btns=btns, parent=cont, line=False, alwaysLite=True) btns = [[ localization.GetByLabel('UI/PI/Common/DeleteRoute'), self._DeleteRoute, () ]] self.deleteRouteButton = uicls.ButtonGroup(btns=btns, parent=cont, line=False, alwaysLite=True) self.createRouteButton.state = uiconst.UI_HIDDEN self.deleteRouteButton.state = uiconst.UI_HIDDEN return cont
def Load(self, args): toparea = sm.GetService('corpui').LoadTop('ui_7_64_11', localization.GetByLabel('UI/Corporations/BaseCorporationUI/MemberList'), localization.GetByLabel('UI/Corporations/Common/UpdateDelay')) if not self.sr.Get('inited', 0): self.sr.inited = 1 toppar = uicls.Container(name='options', parent=self, align=uiconst.TOTOP, height=18, top=10) viewOptionsList2 = [(localization.GetByLabel('UI/Common/All'), None)] self.sr.roleGroupings = sm.GetService('corp').GetRoleGroupings() for grp in self.sr.roleGroupings.itervalues(): if grp.roleGroupID in (1, 2): for c in grp.columns: role = c[1][0][1] viewOptionsList2.append([role.shortDescription, role.roleID]) i = 0 self.sr.fltRole = uicls.Combo(label=localization.GetByLabel('UI/Corporations/Common/Role'), parent=toppar, options=viewOptionsList2, name='rolegroup', callback=self.OnFilterChange, width=146, pos=(5, 0, 0, 0)) i += 1 self.sr.fltOnline = c = uicls.Checkbox(text=localization.GetByLabel('UI/Corporations/CorporationWindow/Members/Tracking/OnlineOnly'), parent=toppar, configName='online', retval=1, checked=0, align=uiconst.TOPLEFT, callback=self.OnFilterChange, pos=(self.sr.fltRole.width + 16, 0, 250, 0)) memberIDs = sm.GetService('corp').GetMemberIDs() cfg.eveowners.Prime(memberIDs) self.sr.scroll = uicls.Scroll(name='member_tracking', parent=self, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.ShowMemberTracking()
def Load(self, args): sm.GetService('corpui').LoadTop( '50_16', localization.GetByLabel( 'UI/Corporations/CorporationWindow/Members/Decorations/CorpMemberDecorations' )) if not self.sr.Get('inited', 0): if const.corpRolePersonnelManager & eve.session.corprole == const.corpRolePersonnelManager: btns = [] btns.append([ localization.GetByLabel( 'UI/Corporations/CorporationWindow/Members/Decorations/CreateDecorationButton' ), self.CreateDecorationForm, None, None ]) self.toolbarContainer = uicls.Container( name='toolbarContainer', align=uiconst.TOBOTTOM, parent=self) buttons = uicls.ButtonGroup(btns=btns, parent=self.toolbarContainer) self.toolbarContainer.height = 20 if not len( btns) else buttons.height self.sr.scroll = uicls.Scroll( name='decorations', parent=self, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.scroll.sr.id = 'corp_decorations_scroll' self.sr.inited = 1 self.LoadDecorations()
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) shipID = attributes.shipID cargoList = attributes.cargoList bp = sm.GetService('michelle').GetBallpark() if not bp: return slimItem = bp.slimItems[shipID] shipName = uix.GetSlimItemName(slimItem) self.SetCaption( localization.GetByLabel('UI/Ship/ShipScan/ShipNameCargo', shipName=shipName, cargoListLen=len(cargoList))) self.SetMinSize([200, 200]) self.SetWndIcon('ui_3_64_11', mainTop=-13) self.DefineButtons(uiconst.CLOSE) self.sr.scroll = uicls.Scroll( parent=self.sr.main, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) t = uicls.EveHeaderSmall( text=localization.GetByLabel('UI/Ship/ShipScan/hdrCargoScan'), parent=self.sr.topParent, left=8, state=uiconst.UI_DISABLED, align=uiconst.BOTTOMLEFT)
def PanelShowStats(self, *args): cont = uicls.Container(parent=self.actionCont, pos=(0, 0, 0, 175), align=uiconst.TOTOP, state=uiconst.UI_HIDDEN) self.statsScroll = scroll = uicls.Scroll(parent=cont, name='StatsScroll', align=uiconst.TOTOP, height=170) scroll.HideUnderLay() uicls.Frame(parent=scroll, color=(1.0, 1.0, 1.0, 0.2)) scrolllist = [] link = self.pin.link strCpuUsage = localization.GetByLabel('UI/PI/Common/TeraFlopsAmount', amount=int(link.GetCpuUsage())) data = util.KeyVal( label='%s<t>%s' % (localization.GetByLabel('UI/PI/Common/CpuUsage'), strCpuUsage)) scrolllist.append(listentry.Get('Generic', data=data)) strPowerUsage = localization.GetByLabel('UI/PI/Common/MegaWattsAmount', amount=int( link.GetPowerUsage())) data = util.KeyVal(label='%s<t>%s' % (localization.GetByLabel('UI/PI/Common/PowerUsage'), strPowerUsage)) scrolllist.append(listentry.Get('Generic', data=data)) scroll.Load(contentList=scrolllist, headers=[ localization.GetByLabel('UI/PI/Common/Attribute'), localization.GetByLabel('UI/Common/Value') ]) return cont
def CreateWindow(self): btns = [] self.toolbarContainer = uicls.Container(name='toolbarContainer', align=uiconst.TOBOTTOM, parent=self) if eve.session.allianceid is None: corporation = sm.GetService('corp').GetCorporation( eve.session.corpid) if corporation.ceoID == eve.session.charid: createAllianceLabel = localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Home/CreateAlliance' ) btns.append( [createAllianceLabel, self.CreateAllianceForm, None, None]) elif const.corpRoleChatManager & eve.session.corprole == const.corpRoleChatManager: addBulletinLabel = localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Home/AddBulletin') btns.append([addBulletinLabel, self.AddBulletin, None, None]) if len(btns): buttons = uicls.ButtonGroup(btns=btns, parent=self.toolbarContainer) self.toolbarContainer.height = 20 if not len(btns) else buttons.height bulletinParent = uicls.Container(name='bulletinParent', parent=self, align=uiconst.TOALL, pos=(0, 0, 0, 0)) uicls.Container(name='push', parent=bulletinParent, align=uiconst.TOLEFT, width=const.defaultPadding) self.messageArea = uicls.Scroll(parent=bulletinParent) self.messageArea.HideBackground() self.messageArea.RemoveActiveFrame() if session.allianceid is not None: self.LoadBulletins()
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.zactionLoggerSvc = attributes['service'] self.entityClient = sm.GetService('entityClient') self.playerEntID = self.entityClient.GetPlayerEntity().entityID self.entityList = [] self.categoryList = [] self.selectedCategory = self.DEFAULT_COMBO_OPTION self.selectedEntity = self.DEFAULT_COMBO_OPTION self.lineNumber = 0 self.comboElementVersion = 0 self.minsize = (540, 200) self.maincontainer = uicls.Container(parent=self.sr.content, align=uiconst.TOALL, pos=(0, 0, 0, 0), padding=(5, 5, 5, 5), padTop=20) self.combatLogLines = uicls.Scroll(parent=self.maincontainer, name='logScroll', align=uiconst.TOALL, pos=(0, 0, 0, 0), padTop=20) self.entityCombo = uicls.Combo(parent=self.maincontainer, callback=self._ForceEntityUpdate, name='entityCombo', align=uiconst.TOPLEFT, width=350) self.categoryCombo = uicls.Combo(parent=self.maincontainer, callback=self._ForceCategoryUpdate, name='categoryCombo', align=uiconst.TOPRIGHT, width=150) self._GetCombatLogLines(bForceUpdate=True) self.sr.updateTimer = base.AutoTimer(100, self._GetCombatLogLines)
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.contracts = {} self.stuff = {} self.SetWndIcon('33_4', mainTop=-8) self.SetMinSize([350, 270]) self.SetCaption( localization.GetByLabel('UI/Insurance/InsuranceWindow/Title')) uicls.WndCaptionLabel( text=localization.GetByLabel('UI/Insurance/InsuranceWindow/Title'), parent=self.sr.topParent, align=uiconst.RELATIVE) self.scope = 'station' btns = uicls.ButtonGroup(btns=[(localization.GetByLabel( 'UI/Insurance/InsuranceWindow/Commands/Insure'), self.InsureFromBtn, None, 81)], line=1) self.sr.main.children.append(btns) self.sr.insureBtns = btns self.sr.scroll = uicls.Scroll( parent=self.sr.main, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.scroll.sr.id = 'insurance' self.sr.scroll.multiSelect = 0 self.sr.scroll.sr.minColumnWidth = { localization.GetByLabel('UI/Common/Type'): 30 } self.ShowInsuranceInfo()
def ConstructWarzonePanel(self): self.warzonePanel.Flush() self.warzoneControl = uicls.FWWarzoneControl(parent=self.warzonePanel, align=uiconst.TOTOP, padding=(0, 10, 0, 10)) bottomCont = uicls.Container(parent=self.warzonePanel, align=uiconst.TOALL, height=0.3) systemStatsCont = uicls.DragResizeCont(name='systemStatsCont', settingsID='FWsystemStatsCont', parent=bottomCont, align=uiconst.TORIGHT_PROP, minSize=0.1, maxSize=0.5, defaultSize=0.45) mapCont = uicls.Container(parent=bottomCont, align=uiconst.TOALL) uicls.GradientSprite(bgParent=mapCont, rotation=-pi / 2, rgbData=[(0, (0.3, 0.3, 0.3))], alphaData=[(0, 0.1), (0.9, 0.0)]) self.bracketParent = uicls.Container(name='bracketCont', parent=mapCont, clipChildren=True) self.sceneContainerNav = form.SceneContainerBaseNavigation( parent=mapCont, state=uiconst.UI_NORMAL) self.sceneContainerNav.cursor = uiconst.UICURSOR_DRAGGABLE self.sceneContainer = form.SceneContainerBrackets(parent=mapCont, align=uiconst.TOALL) self.sceneContainerNav.Startup(self.sceneContainer) self.ConstructMap() self.systemsScroll = uicls.Scroll(name='systemsScroll', parent=systemStatsCont) self.systemsScroll.sr.id = 'FWSystemsScroll' self.UpdateSystemsScroll()
def PanelShowStorage(self): cont = uicls.Container(parent=self.actionCont, pos=(0, 0, 0, 200), align=uiconst.TOTOP, state=uiconst.UI_HIDDEN) self.storageContentScroll = scroll = uicls.Scroll( parent=cont, name='storageContentsScroll', align=uiconst.TOTOP, height=175) scroll.HideUnderLay() uicls.Frame(parent=scroll, color=(1.0, 1.0, 1.0, 0.2)) self.LoadStorageContentScroll() self.buttonContainer = uicls.Container(parent=self.actionCont, pos=(0, 0, 0, 30), align=uiconst.TOBOTTOM, state=uiconst.UI_PICKCHILDREN) btns = [[ localization.GetByLabel('UI/PI/Common/CreateRoute'), self._CreateRoute, 'storageContentScroll' ], [ localization.GetByLabel('UI/PI/Common/ExpeditedTransfer'), self._CreateTransfer, None ]] self.createRouteButton = uicls.ButtonGroup(btns=btns, parent=cont, line=False, alwaysLite=True) return cont
def ApplyAttributes(self, attributes): super(uicls.EntityMonitor, self).ApplyAttributes(attributes) self.SetMinSize([self.default_width, self.default_height]) self.SetHeight(self.default_height) self.entityID = attributes.get('entID', 0) self.SetCaption('Entity Monitor for %d' % self.entityID) self.entityClient = sm.GetService('entityClient') self.sr.content.scroll = uicls.Scroll(parent=self.sr.content, top=14, padding=5) self.componentNodes = {} self.componentDataNodes = {} clientNodeData = { 'decoClass': uicls.SE_ListGroupCore, 'GetSubContent': self.GetClientNodes, 'label': 'Client', 'id': ('location', 'Client'), 'showicon': 'hide', 'showlen': False, 'state': 'locked' } self.clientNode = uicls.ScrollEntryNode(**clientNodeData) serverNodeData = { 'decoClass': uicls.SE_ListGroupCore, 'GetSubContent': self.GetServerNodes, 'label': 'Server', 'id': ('location', 'Server'), 'showicon': 'hide', 'showlen': False, 'state': 'locked' } self.serverNode = uicls.ScrollEntryNode(**serverNodeData) self.thread = uthread.new(self.LoadEntityThread)
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.specialGroups = util.GetNPCGroups() self.scope = 'inflight' self.SetCaption( localization.GetByLabel('UI/Inflight/Scanner/ScannerFilterEditor')) self.SetMinSize([300, 250]) self.SetWndIcon() self.SetTopparentHeight(0) self.sr.main = uiutil.GetChild(self, 'main') topParent = uicls.Container(name='topParent', parent=self.sr.main, height=64, align=uiconst.TOTOP) topParent.padRight = 6 topParent.padLeft = 6 uicls.EveHeaderSmall( text=localization.GetByLabel('UI/Inflight/Scanner/FilterName'), parent=topParent, state=uiconst.UI_DISABLED, idx=0, top=2) nameEdit = uicls.SinglelineEdit(name='name', parent=topParent, setvalue=None, align=uiconst.TOTOP, maxLength=64) nameEdit.top = 16 self.sr.nameEdit = nameEdit hint = uicls.EveLabelMedium(text=localization.GetByLabel( 'UI/Inflight/Scanner/SelectGroupsToFilter'), parent=topParent, align=uiconst.TOTOP) hint.top = 4 self.sr.topParent = topParent self.sr.scroll = uicls.Scroll( parent=self.sr.main, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.scroll.multiSelect = 0 self.DefineButtons( uiconst.OKCANCEL, okLabel=localization.GetByLabel('UI/Common/Buttons/Save'), okFunc=self.SaveChanges, cancelFunc=self.Close) self.scanGroupsNames = { const.probeScanGroupAnomalies: localization.GetByLabel('UI/Inflight/Scanner/CosmicAnomaly'), const.probeScanGroupSignatures: localization.GetByLabel('UI/Inflight/Scanner/CosmicSignature'), const.probeScanGroupShips: localization.GetByLabel('UI/Inflight/Scanner/Ship'), const.probeScanGroupStructures: localization.GetByLabel('UI/Inflight/Scanner/Structure'), const.probeScanGroupDronesAndProbes: localization.GetByLabel('UI/Inflight/Scanner/DroneAndProbe') } self.Maximize() self.OnResizeUpdate()
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.scope = 'station_inflight' self.soldict = {} self.sr.main = uiutil.GetChild(self, 'main') self.SetWndIcon('ui_53_64_11', mainTop=-8) self.SetMinSize([350, 200]) self.SetCaption( localization.GetByLabel( 'UI/CapitalNavigation/CapitalNavigationWindow/CapitalNavigationLabel' )) uicls.WndCaptionLabel( text=localization.GetByLabel( 'UI/CapitalNavigation/CapitalNavigationWindow/CapitalNavigationLabel' ), subcaption=localization.GetByLabel( 'UI/CapitalNavigation/CapitalNavigationWindow/OnlinedStarbaseMessage' ), parent=self.sr.topParent, align=uiconst.RELATIVE) self.sr.scroll = uicls.Scroll( name='scroll', parent=self.sr.main, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.settingsParent = uicls.Container( name='settingsParent', parent=self.sr.main, align=uiconst.TOALL, state=uiconst.UI_HIDDEN, idx=1, pos=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding), clipChildren=1) maintabs = [ [ localization.GetByLabel( 'UI/CapitalNavigation/CapitalNavigationWindow/JumpTo'), self.sr.scroll, self, 'jumpto', self.sr.scroll ], [ localization.GetByLabel( 'UI/CapitalNavigation/CapitalNavigationWindow/WithinRange' ), self.sr.scroll, self, 'inrange', self.sr.scroll ] ] shipID = util.GetActiveShip() if shipID and sm.GetService('clientDogmaIM').GetDogmaLocation( ).GetItem(shipID).groupID == const.groupTitan: maintabs.insert(1, [ localization.GetByLabel( 'UI/CapitalNavigation/CapitalNavigationWindow/BridgeTo'), self.sr.scroll, self, 'bridgeto', self.sr.scroll ]) self.sr.maintabs = uicls.TabGroup(name='tabparent', parent=self.sr.main, idx=0, tabs=maintabs, groupID='capitaljumprangepanel')
def DrawRightSide(self): self.sr.rightside = uicls.Container(name='rightside', parent=self.sr.main, align=uiconst.TOALL, pos=(0, 0, 0, 0)) a = uicls.Container(name='push', parent=self.sr.rightside, align=uiconst.TOTOP, height=6) self.sr.rightBottomPanel = uicls.Container(name='rightBottomPanel', parent=self.sr.rightside, align=uiconst.TOBOTTOM, height=26) self.sr.rightMainPanel = uicls.Container(name='rightMainPanel', parent=self.sr.rightside, align=uiconst.TOALL, pos=(0, 0, 0, 0)) topParent = uicls.Container(parent=self.sr.rightMainPanel, align=uiconst.TOTOP, height=80) topLeftParent = uicls.Container(parent=topParent, align=uiconst.TOLEFT, width=70) topRightParent = uicls.Container(parent=topParent, align=uiconst.TOALL, pos=(0, 0, 0, 0)) bottomParent = uicls.Container(parent=self.sr.rightMainPanel, align=uiconst.TOALL, pos=(0, 0, 0, 0)) uicls.Container(name='push', parent=bottomParent, align=uiconst.TOTOP, height=const.defaultPadding) uicls.Container(name='push', parent=bottomParent, align=uiconst.TOBOTTOM, height=const.defaultPadding) uicls.Container(name='push', parent=bottomParent, align=uiconst.TOLEFT, width=const.defaultPadding) uicls.Container(name='push', parent=bottomParent, align=uiconst.TORIGHT, width=const.defaultPadding) uicls.Frame(parent=bottomParent) self.sr.shipIcon = uicls.Icon(parent=topParent, state=uiconst.UI_HIDDEN, size=64, left=const.defaultPadding, ignoreSize=True) self.sr.techicon = uicls.Sprite(name='techIcon', parent=topParent, align=uiconst.RELATIVE, left=const.defaultPadding, width=16, height=16, idx=0) self.sr.dragIcon = dragIcon = xtriui.FittingDraggableIcon(name='theicon', align=uiconst.TOPLEFT, parent=topParent, height=64, width=64, top=const.defaultPadding, left=const.defaultPadding) dragIcon.Startup(self.fitting) dragIcon.hint = localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/FittingIconHint') dragIcon.OnClick = self.ClickDragIcon dragIcon.state = uiconst.UI_NORMAL fittingNameContainer = uicls.Container(parent=topRightParent, align=uiconst.TOTOP, height=20) self.sr.fittingName = uicls.SinglelineEdit(name='fittingName', parent=fittingNameContainer, align=uiconst.TOPLEFT, pos=(const.defaultPadding, 1, 120, 0), maxLength=40) shipInfoContainer = uicls.Container(parent=topRightParent, align=uiconst.TOTOP, height=20) self.sr.shipTypeName = uicls.EveLabelMedium(text='', parent=shipInfoContainer, align=uiconst.RELATIVE, state=uiconst.UI_NORMAL, left=const.defaultPadding) self.sr.infoicon = uicls.InfoIcon(parent=shipInfoContainer, size=16, left=1, top=0, idx=0, state=uiconst.UI_HIDDEN) self.sr.infoicon.OnClick = self.ShowInfo self.sr.radioButton = uicls.Container(name='', parent=topRightParent, align=uiconst.TOPLEFT, height=50, width=100, top=fittingNameContainer.height + shipInfoContainer.height) radioBtns = [] for cfgname, value, label, checked, group in [['fittingNone', session.charid, localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/Personal'), self.ownerID == None, 'ownership'], ['fittingOwnerCorporation', session.corpid, localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/Corporation'), self.ownerID == session.corpid, 'ownership']]: radioBtns.append(uicls.Checkbox(text=label, parent=self.sr.radioButton, configName=cfgname, retval=value, checked=checked, groupname=group, callback=None)) self.sr.radioButtons = radioBtns self.sr.fittingDescription = uicls.EditPlainText(setvalue=None, parent=bottomParent, align=uiconst.TOALL, maxLength=400) self.sr.fittingInfo = uicls.Scroll(name='fittingInfoScroll', parent=bottomParent) tabs = [[localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/Fittings'), self.sr.fittingInfo, self, None, self.sr.fittingInfo], [localization.GetByLabel('UI/Common/Description'), self.sr.fittingDescription, self, None, self.sr.fittingDescription]] self.fittingInfoTab = uicls.TabGroup(name='tabparent', parent=bottomParent, idx=0) self.fittingInfoTab.Startup(tabs, 'fittingInfoTab') self.sr.fittingInfo.Startup() self.sr.saveDeleteButtons = uicls.ButtonGroup(btns=[[localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/Fit'), self.Fit, ()], [localization.GetByLabel('UI/Common/Buttons/Save'), self.Save, ()], [localization.GetByLabel('UI/Common/Buttons/Delete'), self.Delete, ()]], parent=self.sr.rightBottomPanel, idx=0)
def Prepare_OptionMenu_(self): uicore.layer.menu.Flush() menu = uicls.Container(parent=uicore.layer.menu, pos=(0, 0, 200, 200), align=uiconst.RELATIVE) menu.sr.scroll = uicls.Scroll(parent=menu) uicls.Fill(parent=menu, color=(0.0, 0.0, 0.0, 1.0)) return (menu, menu.sr.scroll, uicls.SE_Generic)
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.homeStation = None self.potentialHomeStations = None self.cloneTypeID = None sm.RegisterNotify(self) self.SetWndIcon('ui_18_128_3', mainTop=-8) self.SetMinSize([350, 270]) self.SetCaption(localization.GetByLabel('UI/Medical/Medical')) currentSkillPoints = sm.GetService('skills').GetSkillPoints() uicls.WndCaptionLabel( text=localization.GetByLabel('UI/Medical/Cloning'), subcaption=localization.GetByLabel( 'UI/Medical/Clone/CurrentSkillPoints', skillPoints=util.FmtAmt(currentSkillPoints)), parent=self.sr.topParent, align=uiconst.RELATIVE) self.scope = 'station' cloneButtons = [ ('medicalServicesChangeStationBtn', localization.GetByLabel('UI/Medical/Clone/ChangeStation'), self.PickNewHomeStation, None, 81), ('medicalServicesUpgradeCloneBtn', localization.GetByLabel('UI/Medical/Clone/UpgradeClone'), self.PickNewCloneType, None, 81) ] btns = uicls.ButtonGroup(btns=cloneButtons, line=1, forcedButtonNames=True) self.sr.main.children.append(btns) self.sr.cloneBtns = btns btns = uicls.ButtonGroup(btns=[ (localization.GetByLabel('UI/Medical/JumpClone/Install'), self.InstallClone, (), 84), (localization.GetByLabel('UI/Medical/JumpClone/Destroy'), self.DestroyClone, (), 84) ], line=1) self.sr.main.children.append(btns) self.sr.jumpcloneBtns = btns tabs = ([ localization.GetByLabel('UI/Medical/Clone'), self.sr.main, self, 'podclone', self.sr.cloneBtns ], [ localization.GetByLabel('UI/Medical/JumpClone'), self.sr.main, self, 'jumpclone', self.sr.jumpcloneBtns ]) self.maintabs = uicls.TabGroup(name='tabparent', parent=self.sr.main, idx=1) self.maintabs.Startup(tabs, 'clonespanel') self.sr.scroll = uicls.Scroll( parent=self.sr.main, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding))
def Load(self, args): if not self.sr.Get('inited', False): self.sr.inited = 1 btns = None self.toolbarContainer = uicls.Container(name='toolbarContainer', align=uiconst.TOBOTTOM, parent=self) if btns is not None: self.toolbarContainer.height = btns.height else: self.toolbarContainer.state = uiconst.UI_HIDDEN self.sr.contacts = form.ContactsForm(name='corpcontactsform', parent=self, pos=(0, 0, 0, 0)) self.sr.contacts.Setup('corpcontact') self.sr.scroll = uicls.Scroll( name='standings', parent=self, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.tabs = uicls.TabGroup(name='tabparent', parent=self, idx=0) self.sr.tabs.Startup([ [ localization.GetByLabel( 'UI/Corporations/CorporationWindow/Standings/CorpContacts' ), self.sr.contacts, self, 'corpcontact' ], [ localization.GetByLabel( 'UI/Corporations/CorporationWindow/Standings/LikedBy'), self.sr.scroll, self, 'mystandings_to_positive' ], [ localization.GetByLabel( 'UI/Corporations/CorporationWindow/Standings/DislikedBy' ), self.sr.scroll, self, 'mystandings_to_negative' ] ], 'corporationstandings', autoselecttab=1) return sm.GetService('corpui').LoadTop( 'ui_7_64_6', localization.GetByLabel( 'UI/Corporations/CorporationWindow/Standings/CorpStandings')) self.SetHint() if type(args) == types.StringType and args.startswith('mystandings_'): self.sr.standingtype = args if args == 'mystandings_to_positive': positive = True else: positive = False self.ShowStandings(positive) else: self.sr.contacts.LoadContactsForm('corpcontact')
def Expand(self): self.expanding = 1 if sm.GetService('connection').IsConnected(): eve.Message('ComboExpand') log.LogInfo('Combo', self.name, 'expanding') colorpar = uicls.Container(name='colors', align=uiconst.TOPLEFT, width=130, height=133) uicore.layer.menu.children.insert(0, colorpar) colorscroll = uicls.Scroll(parent=colorpar) colors = [((1.0, 1.0, 1.0, 1.0), 'white'), ((0.7, 0.7, 0.7, 1.0), 'grey 70%'), ((0.3, 0.3, 0.3, 1.0), 'grey 30%'), ((0.0, 0.0, 0.0, 1.0), 'black'), ((1.0, 1.0, 0.0, 1.0), 'yellow'), ((0.0, 1.0, 0.0, 1.0), 'green'), ((1.0, 0.0, 0.0, 1.0), 'red'), ((0.0, 0.0, 1.0, 1.0), 'blue'), ((0.5, 0.5, 0.0, 1.0), 'dark yellow'), ((0.0, 0.5, 0.0, 1.0), 'dark green'), ((0.5, 0.0, 0.0, 1.0), 'dark red'), ((0.0, 0.0, 0.5, 1.0), 'dark blue'), ((0.5, 0.0, 0.5, 1.0), 'dark mangenta'), ((0.0, 1.0, 1.0, 1.0), 'cyan'), ((1.0, 0.0, 1.0, 1.0), 'mangenta'), ((0.0, 0.5, 1.0, 1.0), 'dark blue'), ((1.0, 0.5, 0.0, 1.0), 'dark blue')] x = y = 0 scrolllist = [] icons = [] for each in colors: color, labelstr = each icons.append((None, color, color, self.PickCol)) x += 1 if x == 4: scrolllist.append(listentry.Get('Icons', {'icons': icons})) icons = [] y += 1 x = 0 colorscroll.Load(32, contentList=scrolllist) uiutil.Update(colorpar) colorpar.left, colorpar.top = self.sr.color.absoluteLeft, [ self.sr.color.absoluteTop + self.sr.color.height, self.sr.color.absoluteTop - colorpar.height ][self.sr.color.absoluteTop + self.sr.color.height + colorpar.height > uicore.desktop.height] colorpar.state = uiconst.UI_NORMAL self.sr.colorpar = _weakref.ref(colorscroll) uicore.event.RegisterForTriuiEvents(uiconst.UI_MOUSEUP, self.OnGlobalClick) self.expanding = 0 self.expanded = 1 log.LogInfo('Colors', self.name, 'expanded')
def CreateWindow(self): toppar = uicls.Container(name='options', parent=self, align=uiconst.TOTOP, height=36) uicls.Container(name='push', parent=toppar, align=uiconst.TOTOP, height=6) viewOptionsList1 = [[ localization.GetByLabel('UI/Corporations/Common/Roles'), VIEW_ROLES ], [ localization.GetByLabel( 'UI/Corporations/Common/GrantableRoles'), VIEW_GRANTABLE_ROLES ]] viewOptionsList2 = [] for roleGrouping in self.sr.roleGroupings.itervalues(): viewOptionsList2.append([ localization.GetByMessageID(roleGrouping.roleGroupNameID), roleGrouping.roleGroupID ]) i = 0 for optlist, label, config, defval, width in [ (viewOptionsList1, localization.GetByLabel('UI/Common/View'), 'viewtype', 1000, 146), (viewOptionsList2, localization.GetByLabel('UI/Common/Type'), 'rolegroup', None, 146) ]: combo = uicls.Combo(label=label, parent=toppar, options=optlist, name=config, callback=self.OnComboChange, width=width, pos=(5 + i * (width + 4), 0, 0, 0), align=uiconst.BOTTOMLEFT) self.sr.Set(label, combo) i += 1 toppar.height = max(combo.height + 14, 36) self.sr.scroll = uicls.Scroll( name='journal', parent=self, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.scroll.OnColumnChanged = self.OnColumnChanged btns = uicls.ButtonGroup(btns=[[ localization.GetByLabel('UI/Common/Buttons/SaveChanges'), self.SaveChanges, (), 81 ]]) self.children.insert(0, btns)
def Load(self, key): alliancesLabel = localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Alliances') sm.GetService('corpui').LoadTop('ui_7_64_6', alliancesLabel) if not self.sr.Get('inited', 0): self.sr.inited = 1 self.sr.wndViewParent = uicls.Container(name='wndViewParent', align=uiconst.TOALL, pos=(0, 0, 0, 0), parent=self) if session.allianceid: self.sr.contacts = form.ContactsForm( name='alliancecontactsform', parent=self, pos=(0, 0, 0, 0), startupParams=()) self.sr.contacts.Setup('alliancecontact') else: self.sr.contacts = uicls.Scroll( name='alliancecontactsform', parent=self, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) homeLabel = localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Home') rnksLabel = localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Rankings') apliLabel = localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Applications') mbrsLabel = localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Members') cntcLabel = localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/AllianceContacts') tabs = [ [homeLabel, self.sr.wndViewParent, self, 'alliances_home'], [rnksLabel, self.sr.wndViewParent, self, 'alliances_rankings'], [ apliLabel, self.sr.wndViewParent, self, 'alliances_applications' ], [mbrsLabel, self.sr.wndViewParent, self, 'alliances_members'], [cntcLabel, self.sr.contacts, self, 'alliancecontact'] ] if session.allianceid is not None: bulletinsLabel = localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Bulletins') tabs.insert(0, [ bulletinsLabel, self.sr.wndViewParent, self, 'alliances_bulletins' ]) self.sr.tabs = uicls.TabGroup(name='tabparent', parent=self, idx=0) self.sr.tabs.Startup(tabs, 'corpaccounts') return self.LoadViewClass(key)
def PanelShowRoutes(self, *args): self.showRoutesCont = cont = uicls.Container(parent=self.actionCont, pos=(0, 0, 0, 168), align=uiconst.TOTOP, state=uiconst.UI_HIDDEN) self.routeScroll = uicls.Scroll(parent=cont, name='routeScroll', align=uiconst.TOTOP, height=160) self.routeScroll.multiSelect = False self.routeScroll.sr.id = 'planetBaseShowRoutesScroll' self.routeInfo = uicls.Container(parent=cont, pos=(0, 4, 0, 100), align=uiconst.TOTOP, state=uiconst.UI_HIDDEN) w = self.width / 2 - 10 self.routeInfoSource = CaptionAndSubtext( parent=self.routeInfo, caption=localization.GetByLabel('UI/PI/Common/Origin'), width=w) self.routeInfoDest = CaptionAndSubtext( parent=self.routeInfo, caption=localization.GetByLabel('UI/PI/Common/Destination'), width=w, top=38) self.routeInfoType = CaptionAndSubtext( parent=self.routeInfo, caption=localization.GetByLabel('UI/Common/Commodity'), width=w, left=w) self.routeInfoBandwidth = CaptionAndSubtext( parent=self.routeInfo, caption=localization.GetByLabel('UI/PI/Common/CapacityUsed'), width=w, left=w, top=38) btns = [] if self.pin.IsStorage() and hasattr(self, '_CreateRoute'): btns.append([ localization.GetByLabel('UI/PI/Common/CreateRoute'), self._CreateRoute, 'routeScroll' ]) btns.append([ localization.GetByLabel('UI/PI/Common/DeleteRoute'), self._DeleteRouteFromEntry, () ]) self.routeInfoBtns = uicls.ButtonGroup(btns=btns, parent=self.routeInfo, line=False, alwaysLite=True) self.LoadRouteScroll() self.routeScroll.HideUnderLay() uicls.Frame(parent=self.routeScroll, color=(1.0, 1.0, 1.0, 0.2)) return cont
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 DrawChanges(self): l = uicls.Line(parent=self.sr.worldOverview, align=uiconst.TOTOP, color=(0.0, 0.0, 0.0, 0.25)) l = uicls.Line(parent=self.sr.worldOverview, align=uiconst.TOTOP) changeContainer = uicls.Container(name='changeContainer', parent=self.sr.worldOverview, align=uiconst.TOALL, pos=(0, 0, 0, 0), padding=(const.defaultPadding, 6, const.defaultPadding, 6)) self.sr.changesScroll = uicls.Scroll(parent=changeContainer)