def ApplyAttributes(self, attributes): uicontrols.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 = uiprimitives.Container(parent=self.sr.content, align=uiconst.TOALL, pos=(0, 0, 0, 0), padding=(5, 5, 5, 5), padTop=20) self.combatLogLines = uicontrols.Scroll(parent=self.maincontainer, name='logScroll', align=uiconst.TOALL, pos=(0, 0, 0, 0), padTop=20) self.entityCombo = uicontrols.Combo(parent=self.maincontainer, callback=self._ForceEntityUpdate, name='entityCombo', align=uiconst.TOPLEFT, width=350) self.categoryCombo = uicontrols.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 InitAssetFilters(self): sortKey = settings.char.ui.Get('corpAssetsSortKey', None) self.sr.filt_cont = uiprimitives.Container(align=uiconst.TOTOP, height=37, parent=self, top=2, idx=1) self.sr.sortcombo = uicontrols.Combo(label=localization.GetByLabel('UI/Common/SortBy'), parent=self.sr.filt_cont, options=[], name='sortcombo', select=sortKey, callback=self.Filter, width=100, pos=(5, 16, 0, 0)) l = self.sr.sortcombo.width + self.sr.sortcombo.left + const.defaultPadding self.sr.filtcombo = uicontrols.Combo(label=localization.GetByLabel('UI/Common/View'), parent=self.sr.filt_cont, options=[], name='filtcombo', select=None, callback=self.Filter, width=100, pos=(l, 16, 0, 0)) self.sr.filt_cont.height = self.sr.filtcombo.top + self.sr.filtcombo.height self.filt_inited = 1
def ShowSearch(self, *args): if not self.sr.search_inited: search_cont = uiprimitives.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 categoryID in evetypes.IterateCategories(): if categoryID > 0: categories.append([evetypes.GetCategoryNameByCategory(categoryID), categoryID, evetypes.IsCategoryPublishedByCategory(categoryID)]) categories.sort() for c in categories: if c[2]: catOptions.append((c[0], c[1])) typeOptions = [(localization.GetByLabel('UI/Corporations/Common/StationOffices'), FLAGNAME_OFFICES), (localization.GetByLabel('UI/Corporations/Assets/Impounded'), FLAGNAME_JUNK), (localization.GetByLabel('UI/Corporations/Assets/InSpace'), FLAGNAME_PROPERTY), (localization.GetByLabel('UI/Corporations/Assets/StationDeliveries'), FLAGNAME_DELIVERIES)] left = 5 top = 17 self.sr.fltType = c = uicontrols.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 = uicontrols.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 = uicontrols.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 = uicontrols.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 self.sr.fltQuantity = c = uicontrols.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 = uicontrols.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')) self.Search()
def CreateWindow(self): toppar = uiprimitives.Container(name='options', parent=self, align=uiconst.TOTOP, height=54) sidepar = uiprimitives.Container(name='sidepar', parent=toppar, align=uiconst.TORIGHT, width=54) icon = uicontrols.Button(parent=toppar, icon='res:/UI/Texture/Icons/77_32_41.png', iconSize=20, align=uiconst.BOTTOMRIGHT, left=4, func=self.Navigate, args=1) icon.hint = localization.GetByLabel('UI/Common/Next') self.sr.fwdBtn = icon icon = uicontrols.Button(parent=toppar, icon='res:/UI/Texture/Icons/77_32_42.png', iconSize=20, align=uiconst.BOTTOMRIGHT, left=30, func=self.Navigate, args=-1) icon.hint = localization.GetByLabel('UI/Common/Previous') self.sr.backBtn = icon uiprimitives.Container(name='push', parent=toppar, align=uiconst.TOTOP, height=6) optlist = [[localization.formatters.FormatNumeric(10), 10], [localization.formatters.FormatNumeric(25), 25], [localization.formatters.FormatNumeric(50), 50], [localization.formatters.FormatNumeric(100), 100], [localization.formatters.FormatNumeric(500), 500]] countcombo = uicontrols.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 = uicontrols.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 = uicontrols.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 = uicontrols.ButtonGroup(btns=buttons) self.children.insert(0, btns)
def ApplyAttributes(self, attributes): uicontrols.Window.ApplyAttributes(self, attributes) self.SetWndIcon(None) self.SetCaption('Window manager') self.SetTopparentHeight(10) self.SetMinSize([360, 220]) options = [] windowList = list(form.__dict__) windowList.sort() for i, f in enumerate(windowList): cp = form.__getattribute__(f) if inspect.isclass(cp) and issubclass(cp, uicontrols.Window): options.append((f, i)) topCont = uiprimitives.Container(name='params', parent=self.sr.main, align=uiconst.TOTOP, pad=(5, 5, 5, 5), pos=(0, 10, 0, 30)) self.mainCont = uiprimitives.Container(name='params', parent=self.sr.main, align=uiconst.TOTOP, pos=(0, 0, 0, 50), padding=(5, 15, 5, 5)) self.extrasCont = uiprimitives.Container(name='params', parent=self.sr.main, align=uiconst.TOALL, padding=(5, 15, 5, 5)) self.combo = uicontrols.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 = uicontrols.SinglelineEdit(name='', label='attributes', parent=topCont, setvalue='', align=uiconst.TOPLEFT, left=165, width=100) uicontrols.Button(parent=topCont, label='Load', align=uiconst.RELATIVE, func=self.OpenWindow, pos=(300, 0, 0, 0)) self.filenameEdit = uicontrols.SinglelineEdit(name='', label='Location', parent=self.mainCont, setvalue='', align=uiconst.TOTOP, top=15, readonly=True) uicontrols.Label(text='RELOAD', parent=self.extrasCont, top=10, state=uiconst.UI_NORMAL) uiprimitives.Line(parent=self.extrasCont, align=uiconst.TOTOP) buttonCont = uiprimitives.Container(name='buttonCont', parent=self.extrasCont, align=uiconst.TOTOP, pos=(0, 30, 0, 30)) uicontrols.Button(parent=buttonCont, label='ShipUI', align=uiconst.TOLEFT, func=self.ReloadShipUI) uicontrols.Button(parent=buttonCont, label='NEOCOM', align=uiconst.TOLEFT, func=self.ReloadNeocom, padLeft=1) uicontrols.Button(parent=buttonCont, label='Info Panels', align=uiconst.TOLEFT, func=self.ReloadInfoPanels, padLeft=1) uicontrols.Button(parent=buttonCont, label='Lobby', align=uiconst.TOLEFT, func=self.ReloadLobby, padLeft=1) uicontrols.Button(parent=buttonCont, label='Overview', align=uiconst.TOLEFT, func=self.ReloadOverview, padLeft=1) uicontrols.Button(parent=buttonCont, label='Mapbrowser', align=uiconst.TOLEFT, func=self.ReloadMapBrowser, padLeft=1) self.UpdateInfo(self.combo.GetKey(), self.combo.GetValue())
def AddCombo(self): self.new = uiprimitives.Container(name='comboField', parent=self.parent, align=uiconst.TOTOP, height=self.type.get('height', 20)) options = self.type.get( 'options', [(localization.GetByLabel('UI/Common/None'), None)]) self.code = uicontrols.Combo(label='', parent=self.new, options=options, name=self.type.get('key', 'combo'), select=self.type.get('setvalue', ''), padding=(self.leftPush, 2, 0, 2), align=uiconst.TOTOP, callback=self.type.get('callback', None), labelleft=self.leftPush, prefskey=self.type.get('prefskey', None)) self.new.height = self.code.height + self.code.padTop * 4 width = self.type.get('width', None) if width: self.code.SetAlign(uiconst.TOLEFT) self.code.width = width label = self.type.get('label', '') if label == '_hide': self.code.padLeft = 0 else: uicontrols.EveLabelSmall(text=label, parent=self.new, name='label', left=7, width=self.leftPush - 6, align=uiconst.CENTERLEFT)
def ApplyAttributes(self, attributes): uicontrols.Window.ApplyAttributes(self, attributes) self.isTabStop = True self.currData = None self.bottomCont = uiprimitives.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 = uicontrols.Combo(parent=self.bottomCont, options=options, pos=(10, 0, 150, 0), width=150, align=uiconst.TOPLEFT, callback=self.OnCombo) uicontrols.Button(parent=self.bottomCont, label='Reload', func=self.UpdateScreen, align=uiconst.TOPLEFT, pos=(165, 0, 100, 0)) self.checkbox = uicontrols.Checkbox(parent=self.bottomCont, text='Render to screen', align=uiconst.TOPLEFT, pos=(230, 0, 250, 0), checked=False, callback=self.OnCheckboxChanged) uicontrols.EveLabelMedium(parent=self.bottomCont, text='Press R to reload', align=uiconst.TOPRIGHT) self.checkbox.OnKeyDown = self.OnKeyDown
def ApplyAttributes(self, attributes): uicontrols.Window.ApplyAttributes(self, attributes) self.SetWndIcon(self.iconNum, mainTop=-10) self.SetCaption(localization.GetByLabel('UI/SystemMenu/DisplayAndGraphics/OptimizeSettings/Header')) self.SetMinSize([360, 240]) self.MakeUnResizeable() self.sr.windowCaption = uicontrols.CaptionLabel(text=localization.GetByLabel('UI/SystemMenu/DisplayAndGraphics/OptimizeSettings/Header'), parent=self.sr.topParent, align=uiconst.RELATIVE, left=70, top=15, state=uiconst.UI_DISABLED, fontsize=18) self.SetScope('all') main = self.sr.main optimizeSettingsOptions = [(localization.GetByLabel('UI/SystemMenu/DisplayAndGraphics/OptimizeSettings/OptimizeSettingsSelect'), None), (localization.GetByLabel('UI/SystemMenu/DisplayAndGraphics/OptimizeSettings/OptimizeSettingsMemory'), 1), (localization.GetByLabel('UI/SystemMenu/DisplayAndGraphics/OptimizeSettings/OptimizeSettingsPerformance'), 2), (localization.GetByLabel('UI/SystemMenu/DisplayAndGraphics/OptimizeSettings/OptimizeSettingsQuality'), 3)] combo = self.combo = uicontrols.Combo(label='', parent=main, options=optimizeSettingsOptions, name='', select=None, callback=self.OnComboChange, labelleft=0, align=uiconst.TOTOP) combo.SetHint(localization.GetByLabel('UI/SystemMenu/DisplayAndGraphics/OptimizeSettings/OptimizeSettingsSelect')) combo.padding = (6, 0, 6, 0) self.messageArea = uicls.EditPlainText(parent=main, readonly=1, hideBackground=1, padding=6) self.messageArea.HideBackground() self.messageArea.RemoveActiveFrame() uicontrols.Frame(parent=self.messageArea, color=(0.4, 0.4, 0.4, 0.5)) self.messageArea.SetValue(localization.GetByLabel('UI/SystemMenu/DisplayAndGraphics/OptimizeSettings/OptimizeSettingsSelectInfo')) btns = uicontrols.ButtonGroup(btns=[[localization.GetByLabel('UI/Common/Buttons/Apply'), self.Apply, (), 66], [localization.GetByLabel('UI/Common/Buttons/Cancel'), self.CloseByUser, (), 66]], parent=main, idx=0) return self
def ApplyAttributes(self, attributes): uiprimitives.Container.ApplyAttributes(self, attributes) self.filterType = None self.criteriaValue = None self.controller = attributes.controller condition = attributes.get('condition', None) self.isRemovable = attributes.get('isRemovable', False) self.removeButton = uicontrols.ButtonIcon( name='removeButton', parent=self, align=uiconst.TOLEFT, width=16, iconSize=9, texturePath='res:/UI/Texture/Icons/Minus.png', func=self.OnRemoveBtn) self.SetRemovable(self.isRemovable) self.filterTypeCombo = uicontrols.Combo( name='filterOptionsCombo', align=uiconst.TOLEFT_PROP, parent=self, width=0.3, padLeft=4, options=self.GetFilterTypeComboOptions(), callback=self.OnFilterTypeCombo) self.filterDetailCont = uiprimitives.Container(name='filterDetailCont', parent=self) if condition: self.SetFilterType(*condition)
def Load(self, args): if not self.sr.Get('inited', 0): self.sr.inited = 1 self.sr.wndButtonContainer = uiprimitives.Container(name='results', parent=self, align=uiconst.TOTOP, height=16) showHide = uiprimitives.Container(name='filters', parent=self.sr.wndButtonContainer, height=48, align=uiconst.TOTOP) uiprimitives.Line(parent=showHide, align=uiconst.TOTOP, top=15, color=(0.0, 0.0, 0.0, 0.25)) uiprimitives.Line(parent=showHide, align=uiconst.TOTOP) self.sr.showHide = showHide uicontrols.EveHeaderSmall(text=localization.GetByLabel('UI/Corporations/BaseCorporationUI/Query'), parent=showHide, left=8, top=3, state=uiconst.UI_NORMAL) a = uicontrols.EveHeaderSmall(text='', parent=showHide, left=18, top=3, state=uiconst.UI_NORMAL, align=uiconst.TOPRIGHT) a.OnClick = self.ShowHideQuery a.GetMenu = None self.sr.ml = a expander = uiprimitives.Sprite(parent=showHide, pos=(6, 2, 11, 11), name='expandericon', state=uiconst.UI_NORMAL, texturePath='res:/UI/Texture/Shared/expanderDown.png', align=uiconst.TOPRIGHT) expander.OnClick = self.ShowHideQuery self.sr.showHideExp = expander self.sr.wndButtonContainer.state = uiconst.UI_HIDDEN wndQueryForm = self.sr.wndQuery.Load(self, self.PopulateView) wndQueryForm.align = uiconst.TOTOP wndQueryForm.height = 180 self.sr.wndQueryForm = wndQueryForm wndForm = uiprimitives.Container(name='form', parent=self, align=uiconst.TOALL, pos=(0, 0, 0, 0)) self.sr.wndForm = wndForm wndOutputTypeArea = uiprimitives.Container(name='output_type', parent=wndForm, align=uiconst.TOTOP, height=24) uiprimitives.Container(name='push', parent=wndOutputTypeArea, align=uiconst.TOTOP, height=6) label = uiprimitives.Container(name='text', parent=wndOutputTypeArea, align=uiconst.TOLEFT, width=150) uicontrols.EveLabelMedium(text=localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/ShowResultsUsingLabel'), parent=label, align=uiconst.TOTOP, state=uiconst.UI_NORMAL) optlist = [[localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/SimpleList'), form.CorpMembersViewSimple], [localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/RoleManagementList'), form.CorpMembersViewRoleManagement], [localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/TaskManagementList'), form.CorpMembersViewTaskManagement]] countcombo = uicontrols.Combo(label='', parent=wndOutputTypeArea, options=optlist, name='resultViewType', callback=self.OnComboChange, width=146, align=uiconst.TOLEFT) self.sr.outputTypeCombo = countcombo self.sr.outputWindowContainer = None viewClass = self.sr.outputTypeCombo.GetValue() self.SwitchToView(viewClass) sm.GetService('corpui').LoadTop('res:/ui/Texture/WindowIcons/corporationmembers.png', localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/FindMemberInRole'))
def ApplyAttributes(self, attributes): uicontrols.Window.ApplyAttributes(self, attributes) self.folder = attributes.get('folder', None) self.ownerID = None if self.folder is None: self.SetCaption(localization.GetByLabel('UI/PeopleAndPlaces/NewFolder')) self.isNew = True else: self.SetCaption(localization.GetByLabel('UI/PeopleAndPlaces/EditFolder')) self.isNew = False self.SetMinSize([280, 110]) main = uiprimitives.Container(name='main', parent=self.sr.main, align=uiconst.TOALL, left=4, width=4) labelContainer = uiprimitives.Container(name='labelContainer', parent=main, align=uiconst.TOTOP, top=8, height=20, padding=(2, 2, 2, 2)) uicontrols.EveLabelMedium(text=localization.GetByLabel('UI/PeopleAndPlaces/Name'), parent=labelContainer, align=uiconst.TOLEFT, width=60) self.nameEdit = uicontrols.SinglelineEdit(name='nameEdit', setvalue=self.folder.folderName if self.folder else '', parent=labelContainer, align=uiconst.TOALL, width=0) self.nameEdit.OnReturn = self.Confirm sectionContainer = uiprimitives.Container(name='sectionContainer', parent=main, align=uiconst.TOTOP, top=8, height=20, padding=(2, 2, 2, 2)) uicontrols.EveLabelMedium(text=localization.GetByLabel('UI/PeopleAndPlaces/LocationSection'), parent=sectionContainer, align=uiconst.TOLEFT, width=60) if not self.isNew or util.IsNPCCorporation(session.corpid): if not self.isNew and self.folder.ownerID == session.corpid: sectionName = localization.GetByLabel('UI/PeopleAndPlaces/CorporationLocations') self.ownerID = session.corpid else: sectionName = localization.GetByLabel('UI/PeopleAndPlaces/PersonalLocations') self.ownerID = session.charid uicontrols.EveLabelMedium(text=sectionName, parent=sectionContainer, align=uiconst.TOALL, width=60) else: ownerID = settings.char.ui.Get('bookmarkFolderDefaultOwner', session.charid) self.sectionCombo = uicontrols.Combo(name='sectionCombo', parent=sectionContainer, align=uiconst.TOALL, width=0, select=ownerID, options=[(localization.GetByLabel('UI/PeopleAndPlaces/PersonalLocations'), session.charid), (localization.GetByLabel('UI/PeopleAndPlaces/CorporationLocations'), session.corpid)]) buttons = self.GetButtons() buttonGroup = uicontrols.ButtonGroup(name='buttonGroup', parent=main, btns=buttons) submitButton = buttonGroup.GetBtnByIdx(0) submitButton.OnSetFocus()
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 CreateCombo(self, options, width=0.5, select=None): return uicontrols.Combo(align=uiconst.TOLEFT_PROP, parent=self, width=width, padLeft=const.defaultPadding, options=options, select=None, callback=self.ApplyFilter)
def ConstructLayout(self): topCont = uiprimitives.Container(name='topCont', parent=self.sr.main, align=uiconst.TOTOP, height=135, clipChildren=True, padding=(const.defaultPadding, 0, const.defaultPadding, 0)) self.loadingCont = uiprimitives.Container(name='loadingCont', parent=self.sr.main, align=uiconst.TOALL) self.loadingText = uicontrols.EveCaptionMedium(text='', parent=self.loadingCont, align=uiconst.CENTER) self.loadingCont.display = True self.historyCont = uiprimitives.Container(name='historyCont', parent=self.sr.main, align=uiconst.TOALL, padding=(const.defaultPadding, const.defaultPadding * 2, const.defaultPadding, const.defaultPadding)) self.historyCont.display = False textCont = uiprimitives.Container(name='textCont', parent=topCont, align=uiconst.TOTOP, height=35) self.warDateLabel = uicontrols.EveLabelMedium(text='', parent=textCont, align=uiconst.CENTER) self.mutualWarLabel = uicontrols.EveLabelMedium(text=localization.GetByLabel('UI/Corporations/Wars/MutualWar'), parent=textCont, align=uiconst.CENTER) self.mutualWarLabel.display = False warInfoCont = uiprimitives.Container(name='buttonCont', parent=topCont, align=uiconst.TOBOTTOM, height=33) self.surrenderBtn = uicontrols.ButtonIcon(name='surrenderBtn', parent=warInfoCont, align=uiconst.TOLEFT, width=24, iconSize=24, texturePath='res:/UI/Texture/Icons/Surrender_64.png', func=self.OpenSurrenderWnd) self.surrenderBtn.display = False self.allyBtn = uicontrols.ButtonIcon(name='allyBtn', parent=warInfoCont, align=uiconst.TORIGHT, width=24, iconSize=24, texturePath='res:/UI/Texture/Icons/Mercenary_64.png', func=self.OpenAllyWnd) warCont = uiprimitives.Container(name='warCont', parent=topCont, align=uiconst.TOALL) attackerCont = uiprimitives.Container(name='attackerCont', parent=warCont, align=uiconst.TOLEFT_PROP, width=0.45) attackerLogoCont = uiprimitives.Container(name='attackerLogoCont', parent=attackerCont, align=uiconst.TORIGHT, width=64) self.attackerLogoDetailed = uiprimitives.Container(name='attackerLogoDetailed', parent=attackerLogoCont, align=uiconst.TOPRIGHT, width=64, height=64) attackerTextCont = uiprimitives.Container(name='attackerTextCont', parent=attackerCont, align=uiconst.TOALL, padding=(4, 0, 8, 4)) self.attackerNameLabel = uicontrols.EveLabelLarge(text='', parent=attackerTextCont, align=uiconst.TOPRIGHT, state=uiconst.UI_NORMAL) self.attackerISKLostLabel = uicontrols.EveLabelMedium(text='', parent=attackerTextCont, align=uiconst.CENTERRIGHT, height=16) self.attackerShipsLostLabel = uicontrols.EveLabelMedium(text='', parent=attackerTextCont, align=uiconst.BOTTOMRIGHT) centerCont = uiprimitives.Container(name='centerCont', parent=warCont, align=uiconst.TOLEFT_PROP, width=0.1) swords = uicontrols.Icon(name='warIcon', parent=centerCont, align=uiconst.CENTER, size=32, ignoreSize=True, state=uiconst.UI_NORMAL, opacity=0.3) swords.LoadIcon('res:/UI/Texture/WindowIcons/wars.png') swords.hint = localization.GetByLabel('UI/Corporations/Wars/Vs') defenderCont = uiprimitives.Container(name='defenderCont', parent=warCont, align=uiconst.TOLEFT_PROP, width=0.45) defenderLogoCont = uiprimitives.Container(name='defenderLogoCont', parent=defenderCont, align=uiconst.TOLEFT, width=64) self.defenderLogoDetailed = uiprimitives.Container(name='defenderLogoDetailed', parent=defenderLogoCont, align=uiconst.TOPLEFT, width=64, height=64) defenderTextCont = uiprimitives.Container(name='defenderTextCont', parent=defenderCont, align=uiconst.TOALL, padding=(8, 0, 4, 4)) self.defenderNameLabel = uicontrols.EveLabelLarge(text='', parent=defenderTextCont, state=uiconst.UI_NORMAL) self.defenderISKKilledLabel = uicontrols.EveLabelMedium(text='', parent=defenderTextCont, align=uiconst.CENTERLEFT, height=16) self.defenderShipsKilledLabel = uicontrols.EveLabelMedium(text='', parent=defenderTextCont, align=uiconst.BOTTOMLEFT) killsFilterCont = uiprimitives.Container(name='killsFilterCont', parent=self.historyCont, align=uiconst.TOTOP, height=24) killOptions = [(localization.GetByLabel('UI/Corporations/Wars/ShowAllKills'), None), (localization.GetByLabel('UI/Corporations/Wars/ShowAggressorKills'), 'attacker'), (localization.GetByLabel('UI/Corporations/Wars/ShowDefenderKills'), 'defender')] comboSetting = settings.user.ui.Get('killComboValue', 0) self.killsFilterCombo = uicontrols.Combo(name='killsFilterCombo', parent=killsFilterCont, options=killOptions, adjustWidth=True, select=comboSetting, callback=self.OnKillComboChange) showGraph = settings.user.ui.Get('killShowGraph', 0) self.showGraph = uicontrols.Checkbox(text=localization.GetByLabel('UI/Corporations/Wars/ShowGraph'), parent=killsFilterCont, padLeft=self.killsFilterCombo.width + const.defaultPadding, checked=showGraph, callback=self.ShowGraph) self.killsParent = uiprimitives.Container(name='killsParent', parent=self.historyCont, align=uiconst.TOALL) self.killsScroll = uicontrols.Scroll(name='killsScroll', parent=self.killsParent) self.killsByGroupParent = uiprimitives.Container(name='killsByGroupParent', parent=self.historyCont, align=uiconst.TOALL) killGroupsCont = uiprimitives.Container(name='killsFilterCont', parent=self.killsByGroupParent, align=uiconst.TOTOP, height=188) self.killGroupsTextCont = uiprimitives.Container(name='killGroupsTextCont', parent=killGroupsCont, align=uiconst.TOLEFT, width=90) self.killGroupsLegendCont = uiprimitives.Container(name='killGroupsTextCont', parent=killGroupsCont, align=uiconst.TOBOTTOM, height=20) self.killGroupsDataCont = uiprimitives.Container(name='killGroupsDataCont', parent=killGroupsCont, align=uiconst.TOALL, padding=(const.defaultPadding, 0, 0, const.defaultPadding), bgColor=util.Color.GetGrayRGBA(0.4, 0.2)) self.killGroupsScroll = uicontrols.Scroll(name='killGroupsScroll', parent=self.killsByGroupParent) self.LoadInfo(self.warID)
def ApplyAttributes(self, attributes): uicontrols.Window.ApplyAttributes(self, attributes) fileList = attributes.fileList self.selected = fileList[0][0] + '.pos' self.SetCaption('Assemble Starbase') self.MakeUnResizeable() self.SetMinSize([256, 256], 1) self.SetWndIcon(None) self.SetTopparentHeight(0) guts = uiprimitives.Container( parent=self.sr.main, pos=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding), align=uiconst.TOALL) uicontrols.Combo(label='Select POS file', parent=guts, options=fileList, name='fileselect', select=0, align=uiconst.TOTOP, pos=(0, 20, 0, 0), width=200, callback=self.OnComboChange) scroll = uicontrols.Scroll(parent=guts, padding=(0, const.defaultPadding, 0, const.defaultPadding)) scrolllist = [] for cfgname, var, label, group in [ ['posTowerAnchor', 'TowerAnchor', 'Anchor Control Tower', None], [ 'posTowerFuel', 'TowerFuel', 'Fuel Control Tower (for onlining)', None ], ['posTowerOnline', 'TowerOnline', 'Online Control Tower', None], ['posStructAnchor', 'StructAnchor', 'Anchor All Structures', None], [ 'posStructFuel', 'StructFuel', 'Fuel Control Tower (for structures)', None ], ['posStructOnline', 'StructOnline', 'Online All Structures', None], ['posArmWeapons', 'ArmWeapons', 'Arm Weapon Batteries', None] ]: data = util.KeyVal() data.label = label data.checked = True data.cfgname = cfgname data.retval = var data.group = group data.OnChange = self.CheckBoxChange le = listentry.Get('Checkbox', data=data) scrolllist.append(le) setattr(self, var, True) setattr(self, var + 'LE', le) scroll.Load(contentList=scrolllist) buttons = [['Execute', self.Execute, None, 81], ['Cancel', self.Cancel, None, 81]] self.sr.main.children.insert(0, uicontrols.ButtonGroup(btns=buttons))
def ConstructLayout(self): self.sr.timeCont = uiprimitives.Container(name='timeCont', parent=self.sr.main, align=uiconst.TOTOP, pos=(0, 0, 0, 25), padding=(8, 5, 8, 0)) self.sr.buttonCont = uiprimitives.Container(name='buttonCont', parent=self.sr.main, align=uiconst.TOBOTTOM, pos=(0, 0, 0, 25), padding=(0, 0, 0, 0)) self.sr.bottomRight = uiprimitives.Container(name='bottomRight', parent=self.sr.timeCont, align=uiconst.TORIGHT, pos=(0, 0, 60, 0), padding=(0, 0, 0, 0)) self.sr.bottomLeft = uiprimitives.Container(name='bottomLeft', parent=self.sr.timeCont, align=uiconst.TOALL, pos=(0, 0, 0, 0), padding=(0, 0, 0, 0)) btn = uicontrols.Button(parent=self.sr.buttonCont, label=localization.GetByLabel('UI/Common/CommandSet'), className='Button', align=uiconst.CENTER) btn.OnClick = self.Update uicontrols.EveLabelMedium(text=localization.GetByLabel('UI/InfrastructureHub/ReinforcedModeExitTime'), parent=self.sr.bottomLeft, left=0, top=2, align=uiconst.TOPLEFT, state=uiconst.UI_DISABLED, idx=0, maxLines=1) self.sr.comboTime = uicontrols.Combo(parent=self.sr.bottomRight, name='comboTime', select=self.GetTime(), width=50, align=uiconst.TOPRIGHT, options=self.GetHours(), idx=0)
def Load(self, args): toparea = sm.GetService('corpui').LoadTop( 'res:/ui/Texture/WindowIcons/corporationmembers.png', localization.GetByLabel( 'UI/Corporations/BaseCorporationUI/MemberList'), localization.GetByLabel('UI/Corporations/Common/UpdateDelay')) if not self.sr.Get('inited', 0): self.sr.inited = 1 toppar = uiprimitives.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 = uicontrols.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 = uicontrols.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)) self.quickFilter = QuickFilterEdit(name='filterMembers', parent=toppar, align=uiconst.TORIGHT, left=4) self.quickFilter.ReloadFunction = lambda: self.ShowMemberTracking() memberIDs = sm.GetService('corp').GetMemberIDs() cfg.eveowners.Prime(memberIDs) self.sr.scroll = uicontrols.Scroll( name='member_tracking', parent=self, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.ShowMemberTracking()
def Load(self, parentWindow, lpfnQueryCompleted = None): self.lpfnQueryCompleted = lpfnQueryCompleted parentWindow.left = parentWindow.width = parentWindow.height = const.defaultPadding wndForm = uiprimitives.Container(name='form', parent=parentWindow, align=uiconst.TOALL, pos=(0, 0, 0, 0)) self.wndForm = wndForm self.scrollQuery = uicontrols.Scroll(name='queryinput', parent=wndForm, height=100, align=uiconst.TOTOP) uiprimitives.Container(name='push', parent=wndForm, align=uiconst.TOTOP, height=const.defaultPadding) self.wndSearchBuilderToolbar = uiprimitives.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 = uicontrols.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 = uicontrols.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 = uicontrols.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 = uiprimitives.Container(name='inputArea', parent=self.wndSearchBuilderToolbar, align=uiconst.TOALL, pos=(0, 0, 0, 0)) self.wndInputFieldArea = wndInputControlArea self.ShowAppropriateInputField() wndOptionsBar = uiprimitives.Container(name='options', parent=wndForm, align=uiconst.TOTOP, height=40) self.addEditButton = uicontrols.Button(parent=wndOptionsBar, label=localization.GetByLabel('UI/Commands/AddItem'), func=self.AddSearchTerm, btn_default=0, align=uiconst.TOPRIGHT) self.saveEditButton = uicontrols.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 = uicontrols.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 uicontrols.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)) uicontrols.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 = uiprimitives.Container(name='execute', parent=wndForm, align=uiconst.TOTOP, height=16) button = uicontrols.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 Startup(self, now, withTime = False, timeparts = 4, startYear = None, yearRange = None): self.timeparts = timeparts if now is None: now = time.gmtime() if startYear is None: startYear = const.calendarStartYear year = max(startYear, now[0]) month = now[1] day = now[2] left = 0 if yearRange is None: yRange = year - startYear + 1 else: yRange = yearRange yearops = [ (localization.formatters.FormatNumeric(startYear + i, decimalPlaces=0), startYear + i) for i in xrange(yRange) ] self.ycombo = uicontrols.Combo(parent=self, label=localization.GetByLabel('UI/Common/DateWords/Year'), options=yearops, name='year', select=year, callback=self.OnComboChange, pos=(left, 0, 0, 0), align=uiconst.TOPLEFT, adjustWidth=True) left += self.ycombo.width + 4 monthops = [ (self.months[i], i + 1) for i in xrange(12) ] self.mcombo = uicontrols.Combo(parent=self, label=localization.GetByLabel('UI/Common/DateWords/Month'), options=monthops, name='month', select=month, callback=self.OnComboChange, pos=(left, 0, 0, 0), align=uiconst.TOPLEFT, adjustWidth=True) left += self.mcombo.width + 4 firstday, numdays = calendar.monthrange(year, month) dayops = [ (localization.formatters.FormatNumeric(i + 1, decimalPlaces=0), i + 1) for i in xrange(numdays) ] self.dcombo = uicontrols.Combo(parent=self, label=localization.GetByLabel('UI/Common/DateWords/Day'), options=dayops, name='day', select=day, callback=self.OnComboChange, pos=(left, 0, 0, 0), align=uiconst.TOPLEFT, adjustWidth=True) self.width = self.dcombo.left + self.dcombo.width self.height = self.ycombo.height if withTime: index = self.GetTimeIndex(now) hourops = self.GetTimeOptions() left += self.dcombo.width + 4 self.hcombo = uicontrols.Combo(parent=self, label=localization.GetByLabel('UI/Common/DateWords/Time'), options=hourops, name='time', select=index, callback=self.OnComboChange, pos=(left, 0, 0, 0), align=uiconst.TOPLEFT, adjustWidth=True) self.width = self.hcombo.left + self.hcombo.width self.height = self.hcombo.height
def CreateWindow(self): toppar = uiprimitives.Container(name='options', parent=self, align=uiconst.TOTOP, height=36) uiprimitives.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 = uicontrols.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 = uicontrols.Scroll( name='journal', parent=self, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.scroll.OnColumnChanged = self.OnColumnChanged btns = uicontrols.ButtonGroup(btns=[[ localization.GetByLabel('UI/Common/Buttons/SaveChanges'), self.SaveChanges, (), 81 ]]) self.children.insert(0, btns)
def DrawUpgrades(self): comboBoxContainer = uiprimitives.Container(name='comboBoxContainer', parent=self.sr.upgradesContainer, align=uiconst.TOTOP, pos=(0, 0, 0, 20), padding=(10, 10, 10, 0)) text = uiprimitives.Container(name='text', parent=self.sr.upgradesContainer, align=uiconst.TOTOP, pos=(0, 0, 0, 20), padding=(10, 4, 10, 0)) t = uicontrols.EveLabelMedium(text=localization.GetByLabel('UI/InfrastructureHub/DropUpgrades'), parent=text, align=uiconst.CENTERTOP, state=uiconst.UI_DISABLED) updatesScrollContainer = uiprimitives.Container(name='updatesScrollContainer', parent=self.sr.upgradesContainer, align=uiconst.TOALL, padding=(10, 0, 10, 0)) self.sr.scroll = uicontrols.Scroll(name='scroll', parent=updatesScrollContainer) comboValues = ((localization.GetByLabel('UI/InfrastructureHub/AllUpgrades'), UPGRADE_ALL), (localization.GetByLabel('UI/InfrastructureHub/InstalledUpgrades'), UPGRADE_INSTALLED), (localization.GetByLabel('UI/InfrastructureHub/UnlockedUpgrades'), UPGRADE_UNLOCKED), (localization.GetByLabel('UI/InfrastructureHub/LockedUpgrades'), UPGRADE_LOCKED)) self.upgradeListMode = settings.user.ui.Get('InfrastructureHubUpgradeCombo', UPGRADE_ALL) combo = uicontrols.Combo(parent=comboBoxContainer, name='combo', select=self.upgradeListMode, align=uiconst.TOALL, callback=self.OnComboChange, options=comboValues, idx=0) self.UpdateUpgrades()
def PostStartup(self): sm.RegisterNotify(self) self.sr.broadcastHistory = [] self.broadcastMenuItems = [] header = self header.baseHeight = header.height self.panelHistory = Container(name='panelHistory', parent=self, left=defaultPadding, width=defaultPadding, top=defaultPadding, height=defaultPadding) historyType = settings.user.ui.Get('fleetHistoryFilter', 'broadcasthistory') comboPar = Container(parent=self.panelHistory, align=uiconst.TOTOP, height=36) ops = [ (localization.GetByLabel('UI/Common/All'), 'all'), (localization.GetByLabel( 'UI/Fleet/FleetBroadcast/BroadcastHistory'), 'broadcasthistory'), (localization.GetByLabel('UI/Fleet/FleetBroadcast/VoiceHistory'), 'voicehistory'), (localization.GetByLabel('UI/Fleet/FleetBroadcast/MemberHistory'), 'memberhistory'), (localization.GetByLabel('UI/Fleet/FleetBroadcast/LootHistory'), 'loothistory') ] self.combo = uicontrols.Combo( label=localization.GetByLabel('UI/Fleet/FleetBroadcast/Filters'), parent=comboPar, options=ops, name='filter', select=historyType, callback=self.LoadHistory, pos=(0, 12, 0, 0), width=110) self.clearBtn = uicontrols.Button( parent=comboPar, label=localization.GetByLabel( 'UI/Fleet/FleetBroadcast/ClearHistory'), func=self.OnClear, align=uiconst.BOTTOMRIGHT, top=defaultPadding) self.scrollHistory = uicontrols.Scroll(name='allHistoryScroll', parent=self.panelHistory, align=uiconst.TOALL)
def ApplyAttributes(self, attributes): uicontrols.Window.ApplyAttributes(self, attributes) self.SetWndIcon('41_13') self.HideMainIcon() self.SetTopparentHeight(0) self.SetCaption('Effect Camera') self.SetMinSize([460, 100]) self.svc = sm.GetService('cameraEffect') self.mainCont = uiprimitives.Container(name='params', parent=self.sr.main, align=uiconst.TOALL, pos=(0, 0, 0, 0), padding=(5, 5, 5, 5)) top = 0 actions = [ 'Listen', 'Flyby', 'Idle', 'Fixed', 'Fixed Close', 'Target', 'Reset', 'Pip' ] buttons = [] for act in actions: b = [act, getattr(self, 'Do%s' % act.replace(' ', '')), (), None] buttons.append(b) btns = uicontrols.ButtonGroup(btns=buttons, parent=self.mainCont, idx=0, unisize=0) data = self.svc.GetAnimationLibrary() opts = [] for clipType in data: for clipData in data[clipType]: label = os.path.splitext(os.path.basename( clipData[0]))[0].replace('_camera', '') label = clipType + ': ' + label opts.append((label, (clipData, clipType))) self.animationCombo = uicontrols.Combo(label='Select Animation Clip', parent=self.mainCont, options=opts, name='fileselect', align=uiconst.TOPLEFT, pos=(0, 20, 0, 0), width=350) uicontrols.Button(label='Play', parent=self.mainCont, align=uiconst.TOPLEFT, pos=(360, 20, 0, 0), func=self.PlayClip)
def AddCombo(self): """ combo (combo box) PARAMS: - height [int] : container height - width [int] : combo box width - label [str] : combo label text (if set to "_hide", it's hidden) - options [list] : a list of combo options as accepted by uicontrols.Combo() - key [str] : config name of the combo (default "combo") - select [str] : default selected option - callback [func] : callback function when a new option is selected """ self.new = uiprimitives.Container(name='comboField', parent=self.parent, align=uiconst.TOTOP, height=self.type.get('height', 20)) options = self.type.get( 'options', [(localization.GetByLabel('UI/Common/None'), None)]) self.code = uicontrols.Combo(label='', parent=self.new, options=options, name=self.type.get('key', 'combo'), select=self.type.get('setvalue', ''), padding=(self.leftPush, 2, 0, 2), align=uiconst.TOTOP, callback=self.type.get('callback', None), labelleft=self.leftPush) self.new.height = self.code.height + self.code.padTop * 4 width = self.type.get('width', None) if width: self.code.SetAlign(uiconst.TOLEFT) self.code.width = width label = self.type.get('label', '') if label == '_hide': self.code.padLeft = 0 else: uicontrols.EveLabelSmall(text=label, parent=self.new, name='label', left=7, width=self.leftPush - 6, align=uiconst.CENTERLEFT)
def ApplyAttributes(self, attributes): super(CycleNebulaPanel, self).ApplyAttributes(attributes) self.sr.topParent.height = 0 parent = self.GetMainArea() parent.SetAlign(uiconst.CENTER) parent.padding = 5 parent.SetSize(PANEL_WIDTH, PANEL_HEIGHT) self.nebulaPaths = [] self.currentNebulaIndex = 0 self.currentNebulaPath = None self.sceneResourceIndex = 0 self.SetupNebulas() topCont = uiprimitives.Container(parent=parent, align=uiconst.TOALL, top=30) self.currentNebulaPathLabel = uicontrols.Label(parent=topCont, text='Current nebula: ', align=uiconst.TOTOP) self.comboBox = uicontrols.Combo( name='nebulaComboBox', parent=topCont, label='', options=[(nebulaPath, index) for index, nebulaPath in enumerate(self.nebulaPaths)], callback=self.ComboboxSelection, select=self.currentNebulaIndex, align=uiconst.TOTOP) self.nextNebulaButton = uicontrols.Button( parent=topCont, label='Next', align=uiconst.CENTERRIGHT, func=self.IncrementNebulaIndex) self.prevNebulaButton = uicontrols.Button( parent=topCont, label='Previous', align=uiconst.CENTERLEFT, func=self.DecrementNebulaIndex)
def SetupStuff(self): options = [ (localization.GetByLabel( 'UI/Fleet/FleetRegistry/MyAvailableFleets'), INVITE_ALL), (localization.GetByLabel('UI/Fleet/FleetRegistry/MyCorpFleets'), INVITE_CORP) ] selected = settings.user.ui.Get('fleetfinder_scopeFilter', None) if session.allianceid is not None: options.append((localization.GetByLabel( 'UI/Fleet/FleetRegistry/MyAllianceFleets'), INVITE_ALLIANCE)) elif selected == INVITE_ALLIANCE: selected = None if session.warfactionid is not None: options.append((localization.GetByLabel( 'UI/Fleet/FleetRegistry/MyMilitiaFleets'), INVITE_MILITIA)) elif selected == INVITE_MILITIA: selected = None options.append(( localization.GetByLabel('UI/Fleet/FleetRegistry/BasedOnStandings'), INVITE_PUBLIC)) l = 1 combo = self.sr.scopeCombo = uicontrols.Combo( label=localization.GetByLabel('UI/Fleet/FleetRegistry/Scope'), parent=self.sr.filterCont, options=options, name='fleetfinder_scopeFilter', select=selected, pos=(l, 14, 0, 0), width=COMBO_SIZES[0]) self.sr.scopeCombo.OnChange = self.OnComboChange l += combo.width + 3 selected = settings.user.ui.Get('fleetfinder_rangeFilter', None) options = [ (localization.GetByLabel('UI/Common/Any'), None), (localization.GetByLabel('UI/Fleet/FleetRegistry/NumberOfJumps', numJumps=5), 5), (localization.GetByLabel('UI/Fleet/FleetRegistry/NumberOfJumps', numJumps=10), 10), (localization.GetByLabel('UI/Common/LocationTypes/Region'), -1) ] combo = self.sr.rangeCombo = uicontrols.Combo( label=localization.GetByLabel('UI/Fleet/FleetRegistry/Range'), parent=self.sr.filterCont, options=options, name='fleetfinder_rangeFilter', select=selected, pos=(l, 14, 0, 0), width=COMBO_SIZES[1]) self.sr.rangeCombo.OnChange = self.OnComboChange l += combo.width + 3 selected = settings.user.ui.Get('fleetfinder_standingFilter', None) options = [(localization.GetByLabel('UI/Common/Any'), None), (localization.GetByLabel('UI/Standings/Good'), const.contactGoodStanding), (localization.GetByLabel('UI/Standings/Excellent'), const.contactHighStanding)] combo = self.sr.standingCombo = uicontrols.Combo( label=localization.GetByLabel( 'UI/Fleet/FleetRegistry/RequireStanding'), parent=self.sr.filterCont, options=options, name='fleetfinder_standingFilter', select=selected, pos=(l, 14, 0, 0), width=COMBO_SIZES[2]) self.sr.standingCombo.OnChange = self.OnComboChange l += combo.width + 3 self.sr.getFleetsBtn = btn = uicontrols.Button( parent=self.sr.filterCont, label=localization.GetByLabel('UI/Fleet/FleetRegistry/FindFleets'), pos=(0, 14, 0, 0), func=self.GetFleetsClick, align=uiconst.TOPRIGHT) self.sr.scroll = uicontrols.Scroll(parent=self.sr.scrollCont) self.sr.scroll.sr.id = 'fleetfinderScroll' self.sr.scroll.multiSelect = 0 self.sr.scroll.Load(contentList=[], headers=[], scrolltotop=0, noContentHint=localization.GetByLabel( 'UI/Fleet/FleetRegistry/SearchHint')) self.sr.caption = uicontrols.EveLabelMediumBold( text='', parent=self.sr.topInfoCont, align=uiconst.RELATIVE, left=4, top=2, state=uiconst.UI_NORMAL) self.sr.detailsText = uicls.EditPlainText(name='detailsText', parent=self.sr.descrCont, padTop=2, padBottom=4, state=uiconst.UI_NORMAL, readonly=1) self.sr.detailsText.HideBackground() self.sr.detailsText.RemoveActiveFrame() FrameUnderlay(parent=self.sr.detailsText, colorType=uiconst.COLORTYPE_UIHILIGHT) tabs = [110, 540] self.sr.infoText = uicontrols.EveLabelMedium(name='infoText', text='', parent=self.sr.descrCont, top=const.defaultPadding, idx=0, tabs=tabs, state=uiconst.UI_NORMAL) self.sr.joinBtn = btn = uicontrols.Button( parent=self.sr.topInfoCont, label=localization.GetByLabel('UI/Fleet/FleetRegistry/JoinFleet'), pos=(0, 1, 0, 0), func=self.JoinFleet, align=uiconst.CENTERRIGHT) self.sr.joinRequestBtn = btn = uicontrols.Button( parent=self.sr.topInfoCont, label=localization.GetByLabel( 'UI/Fleet/FleetRegistry/RequestJoinFleet'), pos=(0, 1, 0, 0), func=self.JoinFleet, align=uiconst.CENTERRIGHT) self.sr.myAdvertMainCont = uiprimitives.Container( name='myAdvertMainCont', parent=self.sr.myAdvertCont, align=uiconst.TOALL, pos=(0, 0, 0, 0)) self.myAdvertButtons = [ (localization.GetByLabel('UI/Fleet/FleetWindow/EditAdvert'), sm.GetService('fleet').OpenRegisterFleetWindow, (), 84), (localization.GetByLabel('UI/Fleet/FleetWindow/RemoveAdvert'), sm.GetService('fleet').UnregisterFleet, (), 84) ] self.sr.myAdvertButtonWnd = uicontrols.ButtonGroup( btns=self.myAdvertButtons, parent=self.sr.myAdvertButtons, unisize=1) self.sr.myAdvertCaption = uicontrols.EveCaptionMedium( text='', parent=self.sr.myAdvertCont, align=uiconst.TOTOP, left=0, top=7, state=uiconst.UI_DISABLED) self.sr.myAdvertDescCont = uiprimitives.Container( name='myAdvertDescCont', parent=self.sr.myAdvertCont, align=uiconst.TOALL, pos=(0, 0, 0, 0)) self.sr.myAdvertText = uicontrols.EveLabelMedium( text='', parent=self.sr.myAdvertCont, top=const.defaultPadding, tabs=tabs, align=uiconst.TOTOP, state=uiconst.UI_NORMAL) self.sr.myAdvertDesc = uicls.EditPlainText( parent=self.sr.myAdvertDescCont, padTop=2, state=uiconst.UI_NORMAL, readonly=1) self.myAdvertButtons_Register = [ (localization.GetByLabel('UI/Fleet/FleetWindow/CreateAdvert'), sm.GetService('fleet').OpenRegisterFleetWindow, (), 84) ] self.sr.myAdvertButtonWnd_Register = uicontrols.ButtonGroup( btns=self.myAdvertButtons_Register, parent=self.sr.myAdvertButtons, unisize=1) self.sr.myAdvertButtonWnd_Register.state = uiconst.UI_HIDDEN
def Execute(self, banID, numBans, curBans, deadline, respondToNodeID): self.banID = banID self.deadline = deadline self.respondToNodeID = respondToNodeID self.resetButton = uicontrols.Button( label='Submit Ban' if numBans > 0 else 'Okay', parent=self.sr.main, align=uiconst.TOBOTTOM, func=self.Submit, state=uiconst.UI_NORMAL, padding=5) uicontrols.EveLabelLarge(text="Let's ban some ships!" if numBans > 0 else "Here's the bans:", parent=self.sr.main, align=uiconst.TOTOP, top=10, padding=5, color=(0.5, 0.5, 1, 1)) uicontrols.Label(text='You have banned:', parent=self.sr.main, align=uiconst.TOTOP, top=5, padding=5) uicontrols.Label(text='<br>'.join( [cfg.invtypes[typeID].typeName for typeID in curBans[0]]), padding=5, parent=self.sr.main, align=uiconst.TOTOP) uicontrols.Label(text='They have banned:', parent=self.sr.main, align=uiconst.TOTOP, top=5, padding=5) uicontrols.Label(text='<br>'.join( [cfg.invtypes[typeID].typeName for typeID in curBans[1]]), padding=5, parent=self.sr.main, align=uiconst.TOTOP) banOptions = [('Pass', -1)] + sorted( [(x.typeName, x.typeID) for x in cfg.invtypes if (x.typeID in shipTypes or x.groupID in shipGroups) and not x.typeName.startswith('[no messageID:') and x.typeID not in skinEquivalents]) self.banChoices = [] for banNum in xrange(numBans): self.banChoices.append( uicontrols.Combo(label='Ban: ', parent=self.sr.main, options=banOptions, top=20, padding=5, align=uiconst.TOTOP)) if numBans > 0: banCont = uiprimitives.Container(name='banTimer', parent=self.sr.main, align=uiconst.TOTOP, height=50) self.countdownText = uicontrols.Label(parent=banCont, align=uiconst.CENTER, fontsize=36, color=(1, 0, 0, 1)) self.countdownTimer = base.AutoTimer(100, self.UpdateTimer) uicore.registry.SetFocus(self) self.MakeUnKillable()
def CubeOfDeath(*args): s = sm.GetService('slash').SlashCmd bp = sm.GetService('michelle').GetBallpark() winID = 'CubeOfDeath_windID' uicontrols.Window.CloseIfOpen(windowID=winID) wnd = uicontrols.Window.Open(windowID=winID) wnd.SetTopparentHeight(0) wnd.SetMinSize([200, 150]) wnd.SetCaption('Cube of Death') buttonBox = uiprimitives.Container(name='buttonBox', parent=uiutil.GetChild(wnd, 'main'), align=uiconst.TOBOTTOM, pos=(0, 0, 0, 40)) selectionBox = uiprimitives.Container(name='selectionBox', parent=uiutil.GetChild(wnd, 'main'), align=uiconst.TOALL, pos=(0, 0, 0, 0)) testOptions = [('classic cube of death', 1), ('capital wrecks of death', 2), ('AmarrCube', 3), ('CaldariCube', 4), ('GallenteCube', 5), ('MinmatarCube', 6), ('Add More Here', 10)] testCombo = uicontrols.Combo(parent=selectionBox, name=u'testCombo', label=u'Test', align=uiconst.CENTER, pos=(0, 0, 200, 200), options=testOptions) whereCheckbox = uicontrols.Checkbox(parent=selectionBox, name=u'whereCheckbox', text=u'Stay where you are', align=uiconst.CENTERTOP, pos=(0, 0, 200, 200), checked=False) def SpawnShips(startPos, typeIdList, gridSize, gridDistance): yCount = 0 xPos = startPos[0] for cntr in xrange(gridSize * gridSize): typeId = typeIdList[cntr % len(typeIdList)] if yCount >= gridSize: xPos += gridDistance yCount = 0 for zCount in xrange(gridSize): s('/spawn %s pos=%s,%s,%s' % (typeId, xPos, yCount * gridDistance + startPos[1], zCount * gridDistance + startPos[2])) yCount += 1 def Spawn(*args): numOfRows = 10 distanceBetweenShips = 1000.0 testID = testCombo.GetValue() if testID == 1: lst = [ 638, 639, 640, 641, 642, 643, 644, 645, 4005, 11936, 11938, 13202, 17636, 17726, 17728, 17732, 17736, 17738, 17740, 17918, 17920, 24688, 24690, 24692, 24694, 26840, 26842, 32305, 32307, 32309, 32311, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 2006, 11011, 17634, 17709, 17713, 17715, 17718, 17720, 17722, 17843, 17922, 29336, 29337, 29340, 29344, 16236, 16238, 16240, 16242, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 1944, 2863, 2998, 19744, 582, 583, 584, 585, 586, 587, 589, 590, 591, 592, 593, 594, 597, 598, 599, 602, 603, 605, 607, 608, 609, 2161, 3532, 3766, 11940, 11942, 17619, 17703, 17812, 17841, 17924, 17926, 17928, 17930, 17932, 29248, 23055, 23057, 23059, 23061 ] elif testID == 2: numOfRows = 5 distanceBetweenShips = 7500.0 lst = [ 26483, 29034, 26527, 26549, 29033, 26505, 29035, 29036, 26475, 26497, 26519, 26541, 28603, 29639, 26472, 26494, 26516, 26538, 26487, 26509, 26531, 26553, 3260, 26490, 26512, 26534, 26556 ] elif testID == 3: lst = [ 589, 590, 591, 596, 597, 615, 624, 625, 628, 642, 643, 1944, 2006, 2161, 3514, 3516, 3518, 3532, 4302, 11134, 11184, 11186, 11188, 11190, 11365, 11393, 11567, 11936, 11938, 11940, 11942, 11965, 11987, 12003, 12017, 12019, 12038, 12733, 12753, 16233, 16236, 17703, 17709, 17718, 17726, 17736, 17920, 17922, 17924, 17926, 19720, 19744, 20125, 20183, 22428, 22448, 22452, 22474, 23757, 23919, 24692, 24696, 28659, 28850, 29248, 29337, 29986, 32305, 32874, 32987, 33079, 33155, 33190, 33623, 33625, 33639, 33641, 33655, 33657, 33695, 33875, 33879 ] distanceBetweenShips = 15000.0 elif testID == 4: lst = [ 582, 583, 584, 601, 602, 603, 605, 620, 621, 623, 632, 638, 640, 648, 649, 672, 3764, 4005, 4306, 11176, 11178, 11192, 11194, 11379, 11381, 11957, 11959, 11985, 11993, 11995, 12011, 12032, 12729, 12731, 16227, 16238, 17619, 17634, 17636, 17715, 17918, 17930, 19726, 20185, 21097, 21628, 22436, 22446, 22464, 22470, 23915, 23917, 24688, 24698, 26840, 28710, 28844, 29340, 29984, 32309, 32788, 32790, 32876, 32983, 33081, 33153, 33627, 33629, 33643, 33645, 33659, 33661, 33673, 33675, 33691, 33816, 33818, 33820, 33873, 33881 ] distanceBetweenShips = 15000.0 elif testID == 5: lst = [ 592, 593, 594, 606, 607, 608, 609, 626, 627, 633, 634, 635, 641, 645, 650, 654, 655, 656, 657, 671, 2078, 2834, 2836, 4308, 4363, 4388, 11011, 11129, 11172, 11174, 11200, 11202, 11377, 11969, 11971, 11989, 12005, 12021, 12023, 12042, 12044, 12743, 12745, 13202, 16229, 16240, 17722, 17728, 17740, 17841, 17843, 17928, 19724, 20187, 22430, 22442, 22460, 22466, 23911, 23913, 24690, 24700, 28661, 28848, 29344, 29988, 30842, 32307, 32811, 32840, 32842, 32844, 32846, 32848, 32872, 32985, 33083, 33151, 33468, 33470, 33472, 33553, 33635, 33637, 33651, 33653, 33667, 33669, 33677, 33685, 33687, 33689, 33869, 33877 ] distanceBetweenShips = 15000.0 elif testID == 6: lst = [ 585, 586, 587, 588, 598, 599, 617, 622, 629, 630, 631, 639, 644, 651, 652, 653, 3766, 4310, 11132, 11182, 11196, 11198, 11371, 11387, 11400, 11961, 11963, 11978, 11999, 12013, 12015, 12034, 12735, 12747, 16231, 16242, 17713, 17720, 17732, 17738, 17812, 17932, 19722, 20189, 22440, 22444, 22456, 22468, 22852, 23773, 24483, 24694, 24702, 26842, 28665, 28846, 29336, 29990, 32207, 32209, 32311, 32878, 32989, 33099, 33157, 33395, 33397, 33513, 33631, 33633, 33647, 33649, 33663, 33665, 33693, 33871, 33883 ] distanceBetweenShips = 15000.0 elif testID == 10: lst = [638] if whereCheckbox.GetValue(): startPos = bp.GetCurrentEgoPos() else: startPos = (2500000000000.0, 0.0, 0.0) s('/tr me pos=%s,%s,%s' % (startPos[0], startPos[1], startPos[2])) SpawnShips(startPos, lst, numOfRows, distanceBetweenShips) uicontrols.Button(parent=buttonBox, name=u'Spawn', label=u'Spawn', align=uiconst.CENTER, pos=(0, 0, 200, 200), func=Spawn)
def ShowAppropriateInputField(self): currentProperty = self.comboProperty.GetValue() requestedControlType = self.controlsByProperty[currentProperty] currentControlType = None if self.propertyControls.has_key('current'): currentControlType = self.propertyControls['current'] if currentControlType == requestedControlType: return requestedControl = None if self.propertyControls.has_key(requestedControlType): requestedControl = self.propertyControls[requestedControlType] elif requestedControlType == 'role_picker': optionsList = [] for role in self.roles: if role.roleID in self.locationalRoles: continue optionsList.append([role.shortDescription, role.roleID]) requestedControl = uicontrols.Combo(label='', parent=self.wndInputFieldArea, options=optionsList, name=requestedControlType, width=146, pos=(const.defaultPadding, 0, 0, 0), align=uiconst.TOLEFT) elif requestedControlType == 'title_picker': optionsList = [] for title in self.titles.itervalues(): optionsList.append([title.titleName, title.titleID]) requestedControl = uicontrols.Combo(label='', parent=self.wndInputFieldArea, options=optionsList, name=requestedControlType, width=146, pos=(const.defaultPadding, 0, 0, 0), align=uiconst.TOLEFT) elif requestedControlType == 'role_picker_locational': optionsList = [] for role in self.roles: if role.roleID not in self.locationalRoles: continue optionsList.append([role.shortDescription, role.roleID]) requestedControl = uicontrols.Combo(label='', parent=self.wndInputFieldArea, options=optionsList, name=requestedControlType, width=146, pos=(const.defaultPadding, 0, 0, 0), align=uiconst.TOLEFT) elif requestedControlType == 'location_picker': bases = [('-', None)] rows = self.offices if rows and len(rows): for row in rows: bases.append( (cfg.evelocations.Get(row.stationID).locationName, row.stationID)) requestedControl = uicontrols.Combo(label='', parent=self.wndInputFieldArea, options=bases, name=requestedControlType, width=146, pos=(const.defaultPadding, 0, 0, 0), align=uiconst.TOLEFT) elif requestedControlType == 'date_picker': nowSecs = blue.os.GetWallclockTime() year, month, wd, day, hour, min, sec, ms = util.GetTimeParts( nowSecs) now = [year, month, day] requestedControl = uix.GetDatePicker(self.wndInputFieldArea, setval=now, left=6, top=-2, idx=None) elif requestedControlType == 'edit_control': control = uicontrols.SinglelineEdit(name=requestedControlType, parent=self.wndInputFieldArea, width=146, left=const.defaultPadding, align=uiconst.TOLEFT, maxLength=37) requestedControl = control else: raise RuntimeError('UnexpectedControlTypeRequested') if currentControlType is not None and self.propertyControls.has_key( currentControlType): currentControl = self.propertyControls[currentControlType] currentControl.state = uiconst.UI_HIDDEN if requestedControl is None: raise RuntimeError('FailedToCreateControlTypeRequested') requestedControl.state = uiconst.UI_NORMAL self.propertyControls[requestedControlType] = requestedControl self.propertyControls['current'] = requestedControlType
def StartupMembersPanel(self): membersPanel = self.sr.membersPanel comboOptions = [ (localization.GetByLabel('UI/Common/All'), FILTER_ALL), (localization.GetByLabel('UI/EVEMail/MailingLists/NormalMembers'), FILTER_MEMBERS), (localization.GetByLabel('UI/EVEMail/MailingLists/MutedMembers'), FILTER_MUTED), (localization.GetByLabel('UI/Chat/Operators'), FILTER_OPERATORS), (localization.GetByLabel('UI/EVEMail/MailingLists/SearchByName'), FILTER_BYNAME) ] topCont = uiprimitives.Container(name='topCont', parent=membersPanel, align=uiconst.TOTOP, pos=(0, 10, 0, 28)) self.sr.membersPanel.showMembersCombo = uicontrols.Combo( label=localization.GetByLabel('UI/EVEMail/MailingLists/ShowLabel'), parent=topCont, options=comboOptions, name='showMembersCombo', callback=self.OnShowMembersComboChanged, width=100, align=uiconst.TOPLEFT) self.sr.membersPanel.searchEdit = uicontrols.SinglelineEdit( label=localization.GetByLabel('UI/PeopleAndPlaces/SearchString'), name='searchEdit', parent=topCont, align=uiconst.TOPLEFT, pos=(115, 0, 80, EDITHEIGHT), state=uiconst.UI_HIDDEN) self.sr.membersPanel.searchEdit.OnReturn = self.UpdateMembersScroll self.sr.membersPanel.searchButton = uicontrols.Button( parent=topCont, label=localization.GetByLabel('UI/Common/Buttons/Search'), left=200, func=self.UpdateMembersScroll, align=uiconst.TOPLEFT, state=uiconst.UI_HIDDEN) browseCont = uiprimitives.Container(name='browseCont', parent=topCont, align=uiconst.TOPRIGHT, pos=(0, -10, 50, 50)) btn = uix.GetBigButton(24, browseCont, 0, 0) btn.OnClick = (self.ChangeMembersPage, -1) btn.hint = localization.GetByLabel('UI/Common/Previous') btn.state = uiconst.UI_NORMAL btn.sr.icon.LoadIcon('ui_23_64_1') self.sr.pageBackBtn = btn btn = uix.GetBigButton(24, browseCont, 24, 0) btn.OnClick = (self.ChangeMembersPage, 1) btn.hint = localization.GetByLabel('UI/Generic/Next') btn.state = uiconst.UI_NORMAL btn.sr.icon.LoadIcon('ui_23_64_2') self.sr.pageFwdBtn = btn self.sr.pageCount = uicontrols.EveLabelMedium( text='', parent=browseCont, left=16, top=26, height=12, state=uiconst.UI_DISABLED) bottomCont = uiprimitives.Container(parent=membersPanel, align=uiconst.TOBOTTOM, pos=(0, 0, 100, EDITHEIGHT), padding=(0, 3 * PAD, 0, PAD), state=uiconst.UI_PICKCHILDREN) comboOptions = [ (localization.GetByLabel('UI/EVEMail/MailingLists/SetRoleMember'), ACTION_SETMEMBER), (localization.GetByLabel('UI/EVEMail/MailingLists/SetRoleMuted'), ACTION_SETMUTED), (localization.GetByLabel( 'UI/EVEMail/MailingLists/SetRoleOperator'), ACTION_SETOPERATOR), (localization.GetByLabel('UI/EVEMail/MailingLists/Kick'), ACTION_KICK) ] self.sr.membersPanel.actionCombo = uicontrols.Combo( label=localization.GetByLabel( 'UI/EVEMail/MailingLists/ApplyToSelected'), parent=bottomCont, options=comboOptions, name='showMembersCombo', width=150, align=uiconst.TOPLEFT) self.sr.membersPanel.ApplyBtn = uicontrols.Button( parent=bottomCont, label=localization.GetByLabel('UI/Generic/Apply'), func=self.ApplyActionToMembers, align=uiconst.TOPRIGHT) self.sr.membersPanel.ApplyBtn.Disable() self.roles = { const.mailingListMemberDefault: localization.GetByLabel('UI/EVEMail/MailingLists/Member'), const.mailingListMemberMuted: localization.GetByLabel('UI/EVEMail/MailingLists/MutedMember'), const.mailingListMemberOperator: localization.GetByLabel('UI/EVEMail/MailingLists/Operator'), const.mailingListMemberOwner: localization.GetByLabel('UI/EVEMail/MailingLists/Owner') } self.sr.membersPanel.scroll = uicontrols.Scroll(parent=membersPanel, name='membersScroll', padTop=PAD) self.sr.membersPanel.scroll.sr.id = 'membersPanelScroll' self.sr.membersPanel.scroll.OnSelectionChange = self.OnMembersScrollSelectionChange