def ConstructTopLeftCont(self): uicls.Line(parent=self.topLeftCont, align=uiconst.TORIGHT) uicls.Label(parent=self.topLeftCont, text='Select clock:', align=uiconst.TOTOP) uicls.Checkbox(parent=self.topLeftCont, text='Actual', groupname='clockGroup', align=uiconst.TOTOP, checked=not blue.os.useSmoothedDeltaT, callback=self.OnClockRadioButtonsChanged, retval=False) uicls.Checkbox(parent=self.topLeftCont, text='Smoothed', groupname='clockGroup', align=uiconst.TOTOP, checked=blue.os.useSmoothedDeltaT, callback=self.OnClockRadioButtonsChanged, retval=True) uicls.Label(parent=self.topLeftCont, align=uiconst.TOTOP, text='Time Scaler:', pos=(0, 0, 0, 0)) uicls.SinglelineEdit(parent=self.topLeftCont, name='timeScaler', align=uiconst.TOTOP, floats=(0.0, 100.0), setvalue=blue.os.timeScaler, OnChange=self.OnTimeScalerChanged, pos=(0, 0, 20, 12))
def MapCmd(self, cmdname, c=0, a=0, s=0, vkey=None, context=None): if vkey is not None: key = self.GetKeyNameFromVK(vkey) else: key = '' self.mappingcmdname = cmdname wnd = uiutil.GetFormWindow('Add Shortcut') cb1 = uicls.Checkbox(text='Control', parent=wnd.sr.content, checked=c, configName='ctrl') uiutil.AddFormControl(wnd, cb1, 'ctrl', None) cb2 = uicls.Checkbox(text='Alt', parent=wnd.sr.content, checked=a, configName='alt') uiutil.AddFormControl(wnd, cb2, 'alt', None) cb3 = uicls.Checkbox(text='Shift', parent=wnd.sr.content, checked=s, configName='shift') uiutil.AddFormControl(wnd, cb3, 'shift', None) edit = uicls.SinglelineEdit(parent=wnd.sr.content, maxLength=20, setvalue=key) uiutil.AddFormControl(wnd, edit, 'key', None) uiutil.AddFormErrorCheck(wnd, uicore.cmd.MapCmdErrorCheck) if wnd.ShowModal() == uiconst.ID_OK: retval = wnd.result setting = (retval['ctrl'], retval['alt'], retval['shift'], retval['key'].lower()) self.customCmds[cmdname] = setting sm.ScatterEvent('OnMapShortcut', cmdname, *setting) self.Reload() self.mappingcmdname = None
def ConstructLayout(self): charInfoCont = uicls.Container(name='charInfo', parent=self.sr.main, align=uiconst.TOTOP, height=68, padding=const.defaultPadding) charLogoCont = uicls.Container(name='charLogo', parent=charInfoCont, align=uiconst.TOLEFT, width=68) charTextCont = uicls.Container(name='charName', parent=charInfoCont, align=uiconst.TOALL) applicationCont = uicls.Container(name='charInfo', parent=self.sr.main, align=uiconst.TOALL, padding=(const.defaultPadding, 0, const.defaultPadding, const.defaultPadding)) uiutil.GetOwnerLogo(charLogoCont, self.charID, size=64, noServerCall=True) charText = localization.GetByLabel( 'UI/Corporations/CorpApplications/ApplicationSubjectLine', player=self.charID) charNameLabel = uicls.EveLabelLarge(parent=charTextCont, text=charText, top=12, align=uiconst.TOPLEFT, width=270) editText = localization.GetByLabel( 'UI/Corporations/BaseCorporationUI/CorporationApplicationText') editLabel = uicls.EveLabelSmall(parent=applicationCont, text=editText, align=uiconst.TOTOP) self.rejectRb = uicls.Checkbox(text=localization.GetByLabel( 'UI/Corporations/CorpApplications/RejectApplication'), parent=applicationCont, configName='reject', retval=1, checked=False, groupname='state', align=uiconst.TOBOTTOM) self.acceptRb = uicls.Checkbox(text=localization.GetByLabel( 'UI/Corporations/CorpApplications/ApplicationInviteApplicant'), parent=applicationCont, configName='accept', retval=0, checked=True, groupname='state', align=uiconst.TOBOTTOM) if self.status not in (const.crpApplicationAppliedByCharacter, const.crpApplicationAcceptedByCorporation): self.rejectRb.state = uiconst.UI_HIDDEN self.acceptRb.state = uiconst.UI_HIDDEN self.applicationText = uicls.EditPlainText(setvalue=self.appText, parent=applicationCont, maxLength=1000, readonly=True)
def ApplyAttributes(self, attributes): super(uicls.AIDebugWindow, self).ApplyAttributes(attributes) self.SetMinSize([self.default_width, self.default_height]) self.SetCaption('AI Debug Window') self.sr.content.padding = 5 self.perceptionClient = sm.GetService('perceptionClient') self.aimingClient = sm.GetService('aimingClient') clientContainer = uicls.Container(parent=self.sr.content, align=uiconst.TOLEFT_PROP, width=0.5) uicls.Line(parent=clientContainer, align=uiconst.TORIGHT) uicls.Label(parent=clientContainer, align=uiconst.TOTOP, text='----- CLIENT -----', pos=(0, 0, 0, 0), padding=(5, 5, 5, 5)) uicls.Checkbox(parent=clientContainer, text='Perception', checked=self.perceptionClient.GetPerceptionManager( session.worldspaceid).IsDebugRendering(), callback=self.OnTogglePerception) uicls.Checkbox(parent=clientContainer, text='Aiming', checked=self.aimingClient.GetAimingManager( session.worldspaceid).IsDebugRendering(), callback=self.OnToggleAiming) uicls.Button(parent=clientContainer, align=uiconst.CENTERBOTTOM, label='Gaze at Nearest', func=self.GazeNearest, top=6) serverContainer = uicls.Container(parent=self.sr.content, align=uiconst.TORIGHT_PROP, width=0.5) uicls.Label(parent=serverContainer, align=uiconst.TOTOP, text='----- SERVER -----', padding=(5, 5, 5, 5)) uicls.Checkbox(parent=serverContainer, text='Perception', checked=self.perceptionClient.GetPerceptionManager( session.worldspaceid).IsDebugRenderingServer(), callback=self.OnTogglePerceptionServer) uicls.Checkbox(parent=serverContainer, text='Aiming', checked=self.aimingClient.GetAimingManager( session.worldspaceid).IsDebugRenderingServer(), callback=self.OnToggleAimingServer) uicls.Button(parent=serverContainer, align=uiconst.CENTERBOTTOM, label='Gaze at Nearest', func=self.GazeNearestServer, top=6)
def 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 Startup(self, *args): listentry.Item.Startup(self, args) cbox = uicls.Checkbox(align=uiconst.TOPLEFT, pos=(6, 4, 0, 0), callback=self.CheckBoxChange) cbox.data = {} self.children.insert(0, cbox) self.sr.checkbox = cbox self.sr.checkbox.state = uiconst.UI_DISABLED
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.isTabStop = True self.currData = None self.bottomCont = uicls.Container(parent=self.sr.main, align=uiconst.TOBOTTOM, height=25) self.mainScreen = MainScreen(parent=self.sr.main, default_align=uiconst.TOPLEFT) self.mainScreen.SetNewsTickerData( *sm.GetService('holoscreen').GetNewsTickerData()) playlist = sm.GetService('holoscreen').playlist options = [(cls.__guid__, (cls, dataFunc)) for cls, dataFunc in playlist] self.combo = uicls.Combo(parent=self.bottomCont, options=options, pos=(10, 0, 150, 0), width=150, align=uiconst.TOPLEFT, callback=self.OnCombo) uicls.Button(parent=self.bottomCont, label='Reload', func=self.UpdateScreen, align=uiconst.TOPLEFT, pos=(165, 0, 100, 0)) self.checkbox = uicls.Checkbox(parent=self.bottomCont, text='Render to screen', align=uiconst.TOPLEFT, pos=(230, 0, 250, 0), checked=False, callback=self.OnCheckboxChanged) uicls.EveLabelMedium(parent=self.bottomCont, text='Press R to reload', align=uiconst.TOPRIGHT) self.checkbox.OnKeyDown = self.OnKeyDown
def 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 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 ApplyAttributes(self, attributes): super(uicls.AnimationDebugWindow, self).ApplyAttributes(attributes) self.SetCaption('Animation Debug Draw') parent = self.GetMainArea() parent.SetAlign(uiconst.TOALL) parent.padding = 5 self.entityClient = sm.GetService('entityClient') self.animationDebugClient = sm.GetService('animationDebugClient') uicls.Checkbox(parent=parent, text='Draw position trace', checked=self.animationDebugClient.IsPositionTrace(), callback=self.OnPositionTraceCheckbox, align=uiconst.TOTOP) uicls.Checkbox(parent=parent, text='Draw velocity trace', checked=self.animationDebugClient.IsVelocityTrace(), callback=self.OnVelocityTraceCheckbox) uicls.Checkbox(parent=parent, text='Draw rotational trace', checked=self.animationDebugClient.IsRotationalTrace(), callback=self.OnRotationalTraceCheckbox) uicls.Checkbox( parent=parent, text='Draw Char Controller', checked=self.animationDebugClient.IsPlayerAvatarDebugDraw(), callback=self.OnPlayerAvatarDebugDraw) uicls.Checkbox( parent=parent, text='Draw Morpheme Skeleton', checked=self.animationDebugClient.IsAnimationSkeletonEnabled(), callback=self.SetAnimationSkeletonDraw) uicls.Checkbox( parent=parent, text='Draw Mesh Skeleton', checked=self.animationDebugClient.IsMeshSkeletonEnabled(), callback=self.SetMeshSkeletonDraw) uicls.Checkbox(parent=parent, text='Draw Net Controller', checked=self.animationDebugClient.IsNetDebugDraw(), callback=self.OnNetDebugDraw) uicls.Checkbox( parent=parent, text='Draw Net History', checked=self.animationDebugClient.IsNetDebugDrawHistory(), callback=self.OnNetDebugDrawHistory) uicls.Button(parent=parent, align=uiconst.TOBOTTOM, padding=(0, 5, 0, 0), label='Reload Animation Network', func=self.OnReloadAnimationNetwork) button = uicls.Button(parent=parent, align=uiconst.TOBOTTOM, label='Reload Static States', func=self.OnReloadStaticStates) self.SetMinSize([button.width + 10, 250])
def AddCheckbox(self, cbName, parent, groupname=None): setting = uiutil.Bunch(settings.user.ui.Get('assetRenderState', {})) cb = uicls.Checkbox(parent=parent, text=cbName, checked=bool(setting.Get(cbName, None)), callback=self.CBChange, groupname=groupname) cb.name = cbName return cb
def Load(self, parentWindow, lpfnQueryCompleted = None): self.lpfnQueryCompleted = lpfnQueryCompleted parentWindow.left = parentWindow.width = parentWindow.height = const.defaultPadding wndForm = uicls.Container(name='form', parent=parentWindow, align=uiconst.TOALL, pos=(0, 0, 0, 0)) self.wndForm = wndForm self.scrollQuery = uicls.Scroll(name='queryinput', parent=wndForm, height=100, align=uiconst.TOTOP) uicls.Container(name='push', parent=wndForm, align=uiconst.TOTOP, height=const.defaultPadding) self.wndSearchBuilderToolbar = uicls.Container(name='searchtoolbar', parent=wndForm, align=uiconst.TOTOP, height=18) optionsList = [[localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/LogicalOR'), LOGICAL_OPERATOR_OR], [localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/LogicalAND'), LOGICAL_OPERATOR_AND]] combo = uicls.Combo(label='', parent=self.wndSearchBuilderToolbar, options=optionsList, name='join_operator', callback=self.OnComboChange, width=50, pos=(1, 0, 0, 0), align=uiconst.TOLEFT) self.comboJoinOperator = combo self.comboJoinOperator.state = uiconst.UI_HIDDEN combo = uicls.Combo(label='', parent=self.wndSearchBuilderToolbar, options=self.propertyList, name='property', callback=self.OnComboChange, width=128, pos=(const.defaultPadding, 0, 0, 0), align=uiconst.TOLEFT) self.comboProperty = combo combo = uicls.Combo(label='', parent=self.wndSearchBuilderToolbar, options=self.optionsByProperty[self.comboProperty.GetValue()], name='operator', callback=self.OnComboChange, width=80, pos=(const.defaultPadding, 0, 0, 0), align=uiconst.TOLEFT) combo.OnChange = self.OnComboChange self.comboOperator = combo wndInputControlArea = uicls.Container(name='inputArea', parent=self.wndSearchBuilderToolbar, align=uiconst.TOALL, pos=(0, 0, 0, 0)) self.wndInputFieldArea = wndInputControlArea self.ShowAppropriateInputField() wndOptionsBar = uicls.Container(name='options', parent=wndForm, align=uiconst.TOTOP, height=40) self.addEditButton = uicls.Button(parent=wndOptionsBar, label=localization.GetByLabel('UI/Commands/AddItem'), func=self.AddSearchTerm, btn_default=0, align=uiconst.TOPRIGHT) self.saveEditButton = uicls.Button(parent=wndOptionsBar, label=localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/Save'), pos=(self.addEditButton.width + 6, 0, 0, 0), func=self.SaveEditedSearchTerm, btn_default=0, align=uiconst.TOPRIGHT) self.cancelEditButton = uicls.Button(parent=wndOptionsBar, label=localization.GetByLabel('UI/Commands/Cancel'), pos=(self.saveEditButton.left + self.saveEditButton.width + 6, 0, 0, 0), func=self.CancelEditedSearchTerm, btn_default=0, align=uiconst.TOPRIGHT) self.saveEditButton.state = uiconst.UI_HIDDEN self.cancelEditButton.state = uiconst.UI_HIDDEN uicls.Checkbox(text=localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/SearchTitles'), parent=wndOptionsBar, configName='FMBQsearchTitles', retval=None, checked=settings.user.ui.Get('FMBQsearchTitles', 0), groupname=None, callback=self.CheckBoxChange, align=uiconst.TOPLEFT, pos=(0, 4, 400, 0)) uicls.Checkbox(text=localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/IncludeImpliedRoles'), parent=wndOptionsBar, configName='FMBQincludeImplied', retval=None, checked=settings.user.ui.Get('FMBQincludeImplied', 0), groupname=None, callback=self.CheckBoxChange, align=uiconst.TOPLEFT, pos=(0, 20, 400, 0)) wndButtonBar = uicls.Container(name='execute', parent=wndForm, align=uiconst.TOTOP, height=16) button = uicls.Button(parent=wndButtonBar, label=localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/ExecuteQuery'), func=self.ExecuteQuery, btn_default=0, align=uiconst.CENTER) wndButtonBar.height = button.height return wndForm
def Startup(self, *args): cbox = uicls.Checkbox(align=uiconst.CENTERLEFT, left=4, callback=self.CheckBoxChange) cbox.data = {} self.children.insert(0, cbox) self.sr.checkbox = cbox self.sr.checkbox.state = uiconst.UI_DISABLED self.iconCont.left = 25 self.sr.label.left = 65
def ApplyAttributes(self, attributes): self._ready = False uicls.Window.ApplyAttributes(self, attributes) self.graphs = trinity.GraphManager() self.graphs.SetEnabled(True) if hasattr(self, 'SetTopparentHeight'): self.SetTopparentHeight(0) self.container = uicls.Container(parent=self.sr.main, align=uiconst.TOALL) else: self.container = uicls.Container(parent=self.sr.content, align=uiconst.TOALL) self.settingsContainer = uicls.Container(parent=self.container, align=uiconst.TOTOP, height=30) self.showTimersChk = uicls.Checkbox(parent=self.settingsContainer, align=uiconst.TOLEFT, text='Timers', checked=True, width=120, height=30, callback=self.PopulateScroll) self.showMemoryChk = uicls.Checkbox(parent=self.settingsContainer, align=uiconst.TOLEFT, text='Memory counters', checked=True, width=120, height=30, callback=self.PopulateScroll) self.showLowCountersChk = uicls.Checkbox(parent=self.settingsContainer, align=uiconst.TOLEFT, text='Low counters', checked=True, width=120, height=30, callback=self.PopulateScroll) self.showHighCountersChk = uicls.Checkbox(parent=self.settingsContainer, align=uiconst.TOLEFT, text='High counters', checked=True, width=120, height=30, callback=self.PopulateScroll) self.resetBtn = uicls.Button(parent=self.settingsContainer, align=uiconst.TORIGHT, label='Reset peaks', width=120, height=30, func=self.PopulateScroll) self.refreshBtn = uicls.Button(parent=self.settingsContainer, align=uiconst.TORIGHT, label='Refresh', width=120, height=30, func=self.PopulateScroll) self.scroll = uicls.Scroll(parent=self.container, id='blueGraphsScroll', align=uiconst.TOTOP, height=200) self.graphsContainer = uicls.Container(parent=self.container, align=uiconst.TOALL) self._ready = True self.PopulateScroll()
def AddCheckBox(self, config, where, align, width, height, left, group): cfgname, retval, desc, default = config cbox = uicls.Checkbox(text=desc, align=align, pos=(left, 0, width, height), checked=default, callback=self.CheckBoxChange) cbox.data = {'key': cfgname, 'retval': retval} if group is not None: cbox.SetGroup(group) where.children.append(cbox) return cbox
def ConstructTopRightCont(self): cont = uicls.Container(parent=self.topRightCont, align=uiconst.TOTOP, height=70, padTop=12, padBottom=10) uicls.Label(parent=cont, align=uiconst.TOTOP, text='Slug Min Time:', pos=(0, 0, 0, 0)) uicls.SinglelineEdit(parent=cont, name='slugMinEdit', align=uiconst.TOTOP, ints=(0, 1000), setvalue=int(blue.os.slugTimeMinMs), OnChange=self.OnSlugMinChanged, pos=(0, 0, 100, 12)) uicls.Label(parent=cont, align=uiconst.TOTOP, text='Slug Max Time:', pos=(0, 0, 0, 0)) uicls.SinglelineEdit(parent=cont, name='slugMaxEdit', align=uiconst.TOTOP, ints=(0, 1000), setvalue=int(blue.os.slugTimeMaxMs), OnChange=self.OnSlugMaxChanged, pos=(0, 0, 100, 12)) uicls.Checkbox(parent=self.topRightCont, text='Use Simple Loop', align=uiconst.TOTOP, checked=blue.os.useSimpleCatchupLoop, callback=self.OnSimpleLoopChanged, padBottom=10) uicls.Checkbox(parent=self.topRightCont, text='Show Time Graphs', align=uiconst.TOTOP, checked=self.showTimeGraphs, callback=self.OnTimeGraphsChanged, padBottom=10)
def ConstructLayout(self, *args): topCont = uicls.Container(name='topCont', align=uiconst.TOTOP, height=14, parent=self.sr.main) left = const.defaultPadding self.sr.buttonContainer = uicls.Container(name='buttonContainer', align=uiconst.TOBOTTOM, parent=self.sr.main) self.checkAllCB = uicls.Checkbox( text=localization.GetByLabel('UI/Shared/CheckAllOn'), parent=topCont, align=uiconst.TOTOP, height=16, padLeft=left, callback=self.CheckAll, checked=True) left = const.defaultPadding self.sr.filenameLabel = uicls.EveLabelMedium( text=localization.GetByLabel('UI/Common/Files/FileName'), parent=self.sr.buttonContainer, top=const.defaultPadding, left=left, state=uiconst.UI_NORMAL) left += self.sr.filenameLabel.width + const.defaultPadding self.sr.filename = uicls.SinglelineEdit(name='filename', parent=self.sr.buttonContainer, pos=(left, const.defaultPadding, 150, 0), align=uiconst.TOPLEFT) self.sr.filename.SetMaxLength(32) left += self.sr.filename.width + const.defaultPadding self.sr.exportBtn = uicls.Button( parent=self.sr.buttonContainer, label=localization.GetByLabel('UI/Commands/Export'), func=self.Export, btn_default=1, idx=0, pos=(left, const.defaultPadding, 0, 0)) self.sr.buttonContainer.height = self.sr.filename.height + 10 self.sr.scrolllistcontainer = uicls.Container( name='scrolllistcontainer', align=uiconst.TOALL, parent=self.sr.main, pos=(0, 0, 0, 0)) self.sr.scroll = uicls.Scroll( name='scroll', parent=self.sr.scrolllistcontainer, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.ConstructScrollList()
def ApplyAttributes(self, attributes): uicls.SE_GenericCore.ApplyAttributes(self, attributes) self.checkbox = uicls.Checkbox(parent=self, align=uiconst.CENTERLEFT, pos=(45, 0, 16, 16), idx=0) self.checkbox.data = {} self.checkbox.OnChange = self.CheckBoxChange self.btn = uicls.Button(parent=self, align=uiconst.TOLEFT, fixedwidth=45, label='Play', func=self.PlayAnimation)
def ConstructTopCont(self): checkBoxes = [(MODE_NORMAL, 'Normal'), (MODE_CODE, 'Code')] if self.inputObj: checkBoxes.append((MODE_INPUT, 'Input object')) for retval, text in checkBoxes: uicls.Checkbox(parent=self.topCont, text=text, groupname='radioGroup', align=uiconst.TOLEFT, checked=retval == self.mode, callback=self.OnRadioButtonsChanged, retval=retval, width=100)
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.isChangingOrder = False self.loadedTab = None self.waypointBtns = uicls.ButtonGroup( parent=self.sr.main, btns=[[ localization.GetByLabel('UI/Map/MapPallet/btnOptimizeRoute'), sm.GetService('autoPilot').OptimizeRoute, (), 66 ]]) self.sr.waypointopt = uicls.Container(name='waypointopt', parent=self.sr.main, align=uiconst.TOBOTTOM, clipChildren=True, padding=(const.defaultPadding, 0, const.defaultPadding, 0)) self.sr.scroll2 = uicls.Scroll(parent=self.sr.main, padding=const.defaultPadding) self.sr.scroll2.sr.id = 'autopilotSettings' self.sr.scroll2.sr.content.OnDropData = self.MoveWaypoints uicls.EveLabelMedium(text=localization.GetByLabel( 'UI/Map/MapPallet/lblChangeWaypointPriority'), parent=self.sr.waypointopt, pos=(3, 2, 0, 0)) checkbox = uicls.Checkbox( text=localization.GetByLabel('UI/Map/MapPallet/cbExpandWaypoints'), parent=self.sr.waypointopt, configName='expandwaypoints', retval=None, checked=settings.user.ui.Get('expandwaypoints', 1), callback=self.OnCheckboxWaypoints, align=uiconst.TOPLEFT, pos=(1, 18, 140, 0)) checkbox.data = {'key': 'expandwaypoints', 'retval': None} self.sr.waypointopt.height = checkbox.height + 22 autopilottabs = uicls.TabGroup(name='tabparent', parent=self.sr.main, idx=0) autopilottabs.Startup( [[ localization.GetByLabel('UI/Map/MapPallet/tabWaypoints'), self.sr.scroll2, self, 'waypointconf', self.sr.waypointopt ], [ localization.GetByLabel('UI/Map/MapPallet/tabMapAdvoidance'), self.sr.scroll2, self, 'avoidconf', None ]], 'autopilottabs', autoselecttab=1) self.sr.autopilottabs = autopilottabs
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) if hasattr(self, 'SetTopparentHeight'): self.SetTopparentHeight(0) self.container = uicls.Container(parent=self.sr.main, align=uiconst.TOALL) else: self.container = uicls.Container(parent=self.sr.content, align=uiconst.TOALL) self.optionsContainer = uicls.Container(parent=self.container, align=uiconst.TOTOP, height=32) self.cppCaptureChk = uicls.Checkbox(parent=self.optionsContainer, text='C++ capture', checked=blue.statistics.isCppCaptureEnabled, callback=self._OnCppCaptureChk, align=uiconst.TOTOP) self.buttonContainer = uicls.GridContainer(parent=self.container, align=uiconst.TOALL, columns=2, rows=2) self.startBtn = uicls.Button(parent=self.buttonContainer, align=uiconst.TOALL, label='Start', func=self._Start) self.stopBtn = uicls.Button(parent=self.buttonContainer, align=uiconst.TOALL, label='Stop', func=self._Stop) self.pauseBtn = uicls.Button(parent=self.buttonContainer, align=uiconst.TOALL, label='Pause', func=self._Pause) self.resumeBtn = uicls.Button(parent=self.buttonContainer, align=uiconst.TOALL, label='Resume', func=self._Resume) uthread.new(self._CheckStatus)
def ShowSupp(self, text): bottom = uicls.Container(name='suppressContainer', parent=self.sr.main, align=uiconst.TOBOTTOM, height=20, idx=0) self.sr.suppCheckbox = uicls.Checkbox(text=text, parent=bottom, configName='suppress', retval=0, checked=0, groupname=None, callback=self.ChangeSupp, align=uiconst.TOPLEFT, pos=(6, 0, 320, 0))
def AddCheckBox(self, config, where, align, width, height, left, group): cfgname, retval, desc, default = config cbox = uicls.Checkbox(text=desc, parent=where, configName=cfgname, retval=retval, checked=default, groupname=group, callback=self.CheckBoxChange, align=align, pos=(left, 2, 0, 0)) cbox.width = width cbox.height = max(height, cbox.sr.label.textheight + cbox.sr.label.top) cbox.state = uiconst.UI_NORMAL return cbox
def ApplyAttributes(self, attributes): uicls.SE_BaseClassCore.ApplyAttributes(self, attributes) self.label = uicls.Label(name='text', parent=self, pos=(22, 0, 0, 0), state=uiconst.UI_DISABLED, align=uiconst.CENTERLEFT, maxLines=1) self.checkBox = uicls.Checkbox(parent=self, align=uiconst.CENTERLEFT, pos=(4, 0, 16, 16), state=uiconst.UI_DISABLED) self.hilite = uicls.Fill(name='hilite', parent=self, align=uiconst.TOALL, color=(1.0, 1.0, 1.0, 0.25), state=uiconst.UI_HIDDEN)
def ApplyAttributes(self, attributes): super(uicls.CameraDebugWindow, self).ApplyAttributes(attributes) self.SetMinSize([self.default_width, self.default_height]) self.SetCaption('Camera Debug Window') self.sr.content.padding = (5, 16, 5, 5) self.debugSelectionClient = sm.GetService('debugSelectionClient') self.cameraDebugClient = sm.GetService('cameraDebugClient') self.cameraClient = sm.GetService('cameraClient') self.cameraStack = uicls.Label(parent=self.sr.content, align=uiconst.TOPLEFT, text=self.PrintCameraStack()) buttonContainer = uicls.Container(parent=self.sr.content, align=uiconst.TOBOTTOM, height=70, padding=(150, 0, 150, 0)) self.toggleCamera = uicls.Button(parent=buttonContainer, align=uiconst.TOBOTTOM, label='Activate Normal Camera', func=self.OnToggleDebugCamera) self.toggleCamUpdate = uicls.Button(parent=buttonContainer, align=uiconst.TOBOTTOM, label='Toggle Camera Update', func=self.OnToggleDebugCameraUpdate, hint='Toggle between updating the debug, and normal camera.') self.showCamCheckBox = uicls.Checkbox(parent=buttonContainer, aligh=uiconst.TOBOTTOM, text='Show Normal Camera', checked=False, callback=self.OnSnowNormalCameraCheckbox) self.cameraClient.AddSharedCamera('Debug Camera', cameras.DebugCamera()) if type(self.cameraClient.GetActiveCamera()) is cameras.DebugCamera: self.DisableDebugCamera() self.EnableDebugCamera() sm.GetService('navigation').hasControl = False
def LoadSettings(self): wnd = self.GetWnd() uicls.Label( text= '<br><b>Debug Settings</b> (changing these settings is <b>not</b> recommended):', parent=wnd.sr.settingsInner, align=uiconst.TOTOP) if wnd: for cfgname, value, label, checked, group in [ [ 'userotcache', None, 'Enable rot cache', settings.public.generic.Get('userotcache', 1), None ], [ 'lazyLoading', None, 'Enable Lazy model loading', settings.public.generic.Get('lazyLoading', 1), None ], [ 'preload', None, 'Enable Preloading', settings.public.generic.Get('preload', 1), None ], [ 'asyncLoad', None, 'Enable Asyncronous Loading (change requires reboot)', settings.public.generic.Get('asyncLoad', 1), None ], [ 'resourceUnloading', None, 'Enable Resource Unloading', settings.public.generic.Get('resourceUnloading', 1), None ] ]: uicls.Checkbox(text=label, parent=wnd.sr.settingsInner, configName=cfgname, retval=value, checked=checked, groupname=group, callback=self.CheckBoxChange, prefstype=('generic', ))
def AddCheckbox(self): self.new = uicls.Container(name='checkboxCont', parent=self.parent, align=uiconst.TOTOP, pos=(0, 0, 0, 18)) self.code = uicls.Checkbox(text=self.type.get('text', ''), parent=self.new, configName='none', retval=self.type['key'], checked=self.type.get('setvalue', 0), groupname=self.type.get('group', None), callback=self.parent.OnCheckboxChange) self.code.data = {} onchange = self.type.get('OnChange', None) or self.type.get( 'onchange', None) if onchange: self.code.data = {'key': self.type['key'], 'callback': onchange} if self.type.has_key('showpanel'): self.code.data['showpanel'] = self.type['showpanel'] if self.code.sr.label: self.refresh.append((self.code, self.code.sr.label)) if self.type.get('hidden', 0): self.code.state = uiconst.UI_HIDDEN
def ConstructLayout(self): cont = uicls.Container(parent=self.sr.main, align=uiconst.TOTOP, padding=const.defaultPadding, height=16) checkBoxCont = uicls.ContainerAutoSize( parent=self.sr.main, name='checkBoxCont', align=uiconst.TOTOP, padding=(const.defaultPadding, 0, const.defaultPadding, const.defaultPadding)) selectLabel = uicls.EveLabelSmallBold( parent=cont, text=localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Home/SelectShortName' ), height=16, align=uiconst.TOTOP) shortNames = sm.GetService('corp').GetSuggestedAllianceShortNames( self.allianceName) checked = True for shortNameRow in shortNames: shortName = shortNameRow.shortName if shortName is None: continue checkBox = uicls.Checkbox(text=shortName, parent=checkBoxCont, configName='shortNames', retval=shortName, checked=checked, groupname='state', align=uiconst.TOTOP, height=19) self.checkBoxes.append(checkBox) checked = False self.height = checkBoxCont.height + 70
def SetupStuff(self, fleetInfo=None): fleetName = localization.GetByLabel('UI/Fleet/DefaultFleetName', char=session.charid) inviteScope = INVITE_CORP description = '' needsApproval = False localMinStanding = None localMinSecurity = None publicMinStanding = None publicMinSecurity = None hideInfo = False myCorp = False myAlliance = False myMilitia = False isPublic = False publicIsGood = False publicIsHigh = False localIsGood = False localIsHigh = False if fleetInfo is not None: fleetName = fleetInfo.fleetName description = fleetInfo.description needsApproval = fleetInfo.joinNeedsApproval hideInfo = fleetInfo.hideInfo localMinStanding = fleetInfo.local_minStanding localMinSecurity = fleetInfo.local_minSecurity publicMinStanding = fleetInfo.public_minStanding publicMinSecurity = fleetInfo.public_minSecurity myCorp = IsOpenToCorp(fleetInfo) myAlliance = IsOpenToAlliance(fleetInfo) myMilitia = IsOpenToMilitia(fleetInfo) isPublic = IsOpenToPublic(fleetInfo) if publicMinStanding == const.contactGoodStanding: publicIsGood = True elif publicMinStanding == const.contactHighStanding: publicIsHigh = True if localMinStanding == const.contactGoodStanding: localIsGood = True elif localMinStanding == const.contactHighStanding: localIsHigh = True self.sr.main.Flush() self.sr.main.padding = 6 uicls.EveLabelSmall( text=localization.GetByLabel('UI/Fleet/NameOfFleet'), parent=self.sr.main, padTop=6, align=uiconst.TOTOP) self.sr.fleetName = uicls.SinglelineEdit(name='fleetName', parent=self.sr.main, align=uiconst.TOTOP, maxLength=FLEETNAME_MAXLENGTH, setvalue=fleetName) uicls.EveLabelSmall( text=localization.GetByLabel('UI/Fleet/Description'), parent=self.sr.main, padTop=6, align=uiconst.TOTOP) self.sr.description = uicls.EditPlainText( setvalue=description, parent=self.sr.main, align=uiconst.TOTOP, height=64, maxLength=FLEETDESC_MAXLENGTH) openFleetText = uicls.EveLabelSmall( text=localization.GetByLabel('UI/Fleet/FleetRegistry/OpenFleetTo'), parent=self.sr.main, align=uiconst.TOTOP, state=uiconst.UI_NORMAL, padTop=6) self.sr.myCorpButton = uicls.Checkbox( text=localization.GetByLabel( 'UI/Fleet/FleetRegistry/MyCorporation'), parent=self.sr.main, configName='corp', retval='1', checked=myCorp, hint=localization.GetByLabel( 'UI/Fleet/FleetRegistry/CorpOnlyHint')) if session.allianceid is not None: self.sr.myAllianceButton = uicls.Checkbox( text=localization.GetByLabel( 'UI/Fleet/FleetRegistry/MyAlliance'), parent=self.sr.main, configName='alliance', retval='1', checked=myAlliance, hint=localization.GetByLabel( 'UI/Fleet/FleetRegistry/AllianceOnlyHint'), align=uiconst.TOTOP) if session.warfactionid is not None: self.sr.myMilitiaButton = uicls.Checkbox( text=localization.GetByLabel( 'UI/Fleet/FleetRegistry/MyMilitia'), parent=self.sr.main, configName='militia', retval='1', checked=myMilitia, hint=localization.GetByLabel( 'UI/Fleet/FleetRegistry/MyMilitiahint'), align=uiconst.TOTOP) self.sr.requireLocalStandingButton = uicls.Checkbox( text=localization.GetByLabel( 'UI/Fleet/FleetRegistry/RequireStanding'), parent=self.sr.main, configName='requireLocalStanding', retval='1', checked=bool(localMinStanding), align=uiconst.TOTOP, hint=localization.GetByLabel( 'UI/Fleet/FleetRegistry/RequireStandingHint'), padLeft=18) self.sr.localGoodStandingCB = uicls.Checkbox( text=localization.GetByLabel('UI/Standings/Good'), parent=self.sr.main, configName='localgood', reval=const.contactGoodStanding, checked=localIsGood, groupname='localStanding', align=uiconst.TOTOP, padLeft=36) self.sr.localHighStandingCB = uicls.Checkbox( text=localization.GetByLabel('UI/Standings/Excellent'), parent=self.sr.main, configName='localhigh', reval=const.contactHighStanding, checked=localIsHigh, groupname='localStanding', align=uiconst.TOTOP, padLeft=36) startVal = 0.5 if localMinSecurity is not None: startVal = localMinSecurity / 20.0 + 0.5 self.sr.requireLocalSecurityButton = uicls.Checkbox( text=localization.GetByLabel( 'UI/Fleet/FleetRegistry/RequireSecurity', securityLevel=startVal), parent=self.sr.main, configName='requireLocalSecurity', retval='1', checked=localMinSecurity is not None, align=uiconst.TOTOP, padLeft=18, hint=localization.GetByLabel( 'UI/Fleet/FleetRegistry/RequireSecurityHint')) self.sr.localSecuritySlider = self.AddSlider(self.sr.main, 'localSecurity', -10, 10.0, '', startVal=startVal, padLeft=18) self.sr.localSecuritySlider.SetValue(startVal) self.sr.publicButton = uicls.Checkbox( text=localization.GetByLabel( 'UI/Fleet/FleetRegistry/BasedOnStandings'), parent=self.sr.main, configName='public', retval='1', checked=isPublic, align=uiconst.TOTOP, hint=localization.GetByLabel('UI/Fleet/FleetRegistry/AddPilots')) standingText = uicls.EveLabelSmall(text=localization.GetByLabel( 'UI/Fleet/FleetRegistry/RequireStanding'), parent=self.sr.main, align=uiconst.TOTOP, state=uiconst.UI_NORMAL, padLeft=18) self.sr.publicGoodStandingCB = uicls.Checkbox( text=localization.GetByLabel('UI/Standings/Good'), parent=self.sr.main, configName='publicgood', reval=const.contactGoodStanding, checked=publicIsGood, groupname='publicStanding', align=uiconst.TOTOP, padLeft=18) self.sr.publicHighStandingCB = uicls.Checkbox( text=localization.GetByLabel('UI/Standings/Excellent'), parent=self.sr.main, configName='publichigh', reval=const.contactHighStanding, checked=publicIsHigh, groupname='publicStanding', align=uiconst.TOTOP, padLeft=18) startVal = 0.5 if publicMinSecurity is not None: startVal = publicMinSecurity / 20.0 + 0.5 self.sr.requirePublicSecurityButton = uicls.Checkbox( text=localization.GetByLabel( 'UI/Fleet/FleetRegistry/RequireSecurity', securityLevel=startVal), parent=self.sr.main, configName='requirePublicSecurity', retval='1', checked=publicMinSecurity is not None, hint=localization.GetByLabel( 'UI/Fleet/FleetRegistry/RequireSecurityHint'), padLeft=18) self.sr.publicSecuritySlider = self.AddSlider(self.sr.main, 'publicSecurity', -10, 10.0, '', startVal=startVal, padLeft=18) self.sr.publicSecuritySlider.SetValue(startVal) uicls.Line(parent=self.sr.main, align=uiconst.TOTOP, padLeft=-self.sr.main.padLeft, padRight=-self.sr.main.padRight, padTop=6, padBottom=3) self.sr.needsApprovalButton = uicls.Checkbox( text=localization.GetByLabel( 'UI/Fleet/FleetRegistry/RequireApproval'), parent=self.sr.main, configName='needsApproval', retval='1', checked=needsApproval, hint=localization.GetByLabel( 'UI/Fleet/FleetRegistry/RequireApprovalHint')) self.sr.hideInfoButton = uicls.Checkbox( text=localization.GetByLabel('UI/Fleet/FleetRegistry/HideInfo'), parent=self.sr.main, configName='hideInfo', retval='1', checked=hideInfo, hint=localization.GetByLabel( 'UI/Fleet/FleetRegistry/HideInfoHint'), padBottom=6) self.sr.submitButtons = uicls.ButtonGroup( btns=[[ localization.GetByLabel('UI/Common/Buttons/Submit'), self.Submit, () ], [ localization.GetByLabel('UI/Common/Buttons/Cancel'), self.CloseByUser, () ]], parent=self.sr.main, idx=0, padLeft=-self.sr.main.padLeft, padRight=-self.sr.main.padRight) windowHeight = sum([ each.height + each.padTop + each.padBottom for each in self.sr.main.children ]) + self.GetHeaderHeight( ) + self.sr.main.padTop + self.sr.main.padBottom self.SetMinSize([WINDOW_WIDTH, windowHeight], refresh=True)
def ConstructSearchUI(self): self.corporationID = settings.user.ui.Get('agentFinderCorporation', -1) self.divisionID = settings.user.ui.Get('agentFinderDivision', -1) self.locationID = settings.user.ui.Get('agentFinderLocation', -1) self.regionID = settings.user.ui.Get('agentFinderRegion', -1) self.secStatus = settings.user.ui.Get('agentFinderSecStatus', -1) showAvail = settings.user.ui.Get('agentFinderAvailable', True) bottomCont = uicls.Container( parent=self.leftCont, align=uiconst.TOBOTTOM, height=30, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) topCont = uicls.Container( parent=self.leftCont, align=uiconst.TOALL, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) combos = [] top = 16 factionOptions = self.GetFactions() self.factionID = settings.user.ui.Get('agentFinderFaction', self.bestFactionStanding) self.factionCombo = uicls.Combo( label=localization.GetByLabel('UI/Common/Faction'), parent=topCont, select=self.factionID, top=top, left=8, options=factionOptions, callback=self.OnFactionChange, adjustWidth=True) combos.append(self.factionCombo) top += 48 self.corpCombo = uicls.Combo( label=localization.GetByLabel('UI/Common/Corporation'), parent=topCont, select=self.corporationID, top=top, left=8, options=self.GetCorporations(), callback=self.OnCorporationChange, adjustWidth=True) combos.append(self.corpCombo) top += 48 self.divisionCombo = uicls.Combo( label=localization.GetByLabel('UI/AgentFinder/AgentType'), parent=topCont, select=self.divisionID, top=top, left=8, options=self.GetDivisions(), callback=self.OnDivisionChange, adjustWidth=True) combos.append(self.divisionCombo) top += 48 self.regionCombo = uicls.Combo( label=localization.GetByLabel('UI/Common/LocationTypes/Region'), parent=topCont, select=self.regionID, top=top, left=8, options=self.GetRegions(), callback=self.OnRegionChange, adjustWidth=True) combos.append(self.regionCombo) top += 48 self.locationCombo = uicls.Combo(label=localization.GetByLabel( 'UI/Common/LocationTypes/SolarSystem'), parent=topCont, select=self.locationID, top=top, left=8, options=self.GetSolarsystems(), callback=self.OnLocationChange, adjustWidth=True) combos.append(self.locationCombo) top += 48 self.secStatusCombo = uicls.Combo( label=localization.GetByLabel('UI/Medical/Clone/SecurityStatus'), parent=topCont, select=self.secStatus, top=top, left=8, options=self.GetSecurityStatus(), callback=self.OnSecStatusChange, adjustWidth=True) combos.append(self.secStatusCombo) top += 32 self.showOnlyAvail = uicls.Checkbox( text=localization.GetByLabel('UI/AgentFinder/ShowOnlyAvailable'), parent=topCont, checked=showAvail, top=top, callback=self.OnShowAvailChange, left=6, align=uiconst.TOPLEFT, width=SEARCH_WIDTH - 30) comboWidth = max(self.factionCombo.width, self.corpCombo.width, self.divisionCombo, self.locationCombo, self.secStatusCombo) maxWidth = min(comboWidth, SEARCH_WIDTH - 30) for combo in combos: combo.adjustWidth = False combo.width = maxWidth