def AddEntry(self, rowPos, colPos, variableName, humanName, associatedObject): if not hasattr(associatedObject, variableName): uicls.EveLabelMedium(text=humanName + ': Not on current camera', parent=self.sr.main, align=uiconst.RELATIVE, left=colPos, top=rowPos) else: if variableName not in cameras.ORIGINAL_SETTINGS: cameras.ORIGINAL_SETTINGS[variableName] = getattr( associatedObject, variableName) uicls.EveLabelMedium(text=humanName + ':', parent=self.sr.main, align=uiconst.RELATIVE, left=colPos, top=rowPos) edit = uicls.SinglelineEdit(name=variableName, readonly=False, parent=self.sr.main, maxLines=1, align=uiconst.RELATIVE, pos=(colPos + 145, rowPos - 5, 100, 25), padding=(0, 0, 0, 0)) edit.OnReturn = self.EditEnterPressed edit.associatedObject = associatedObject self.editControls.append(edit) edit.SetValue(str(getattr(associatedObject, variableName))) rowPos += 30 return rowPos
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.locationID = attributes.get('locationID') locationName = attributes.get('locationName') note = attributes.get('note', '') self.typeID = attributes.get('typeID') self.scannerInfo = attributes.get('scannerInfo') self.parentID = attributes.get('parentID') self.bookmark = attributes.get('bookmark') if self.bookmark is None: self.SetCaption(localization.GetByLabel('UI/PeopleAndPlaces/NewBookmark')) else: self.SetCaption(localization.GetByLabel('UI/PeopleAndPlaces/EditLocation')) self.SetMinSize([280, 186]) main = uicls.Container(name='main', parent=self.sr.main, align=uiconst.TOALL, left=4, width=4) labelContainer = uicls.Container(name='labelContainer', parent=main, align=uiconst.TOTOP, top=8, height=20, padding=(2, 2, 2, 2)) uicls.EveLabelMedium(text=localization.GetByLabel('UI/PeopleAndPlaces/Label'), parent=labelContainer, align=uiconst.TOLEFT, width=60) self.labelEdit = uicls.SinglelineEdit(name='labelEdit', setvalue=locationName, parent=labelContainer, align=uiconst.TOALL, width=0) self.labelEdit.OnReturn = self.Confirm descriptionContainer = uicls.Container(name='descriptionContainer', parent=main, align=uiconst.TOTOP, top=8, height=60, padding=(2, 2, 2, 2)) uicls.EveLabelMedium(text=localization.GetByLabel('UI/PeopleAndPlaces/Notes'), parent=descriptionContainer, align=uiconst.TOLEFT, width=60) self.notesEdit = uicls.EditPlainText(name='notesEdit', setvalue=note, parent=descriptionContainer, align=uiconst.TOALL) folderContainer = uicls.Container(name='folderContainer', parent=main, align=uiconst.TOTOP, top=8, height=20, padding=(2, 2, 2, 2)) uicls.EveLabelMedium(text=localization.GetByLabel('UI/PeopleAndPlaces/Folder'), parent=folderContainer, align=uiconst.TOLEFT, width=60) options = self.GetFolderOptions() if self.bookmark is not None: ownerID, folderID = self.bookmark.ownerID, self.bookmark.folderID else: ownerID, folderID = settings.char.ui.Get('defaultBookmarkOwnerAndFolder', (session.charid, None)) self.folderCombo = uicls.Combo(name='folderCombo', parent=folderContainer, align=uiconst.TOALL, select=(ownerID, folderID), options=options, width=0) buttons = self.GetButtons() buttonGroup = uicls.ButtonGroup(name='buttonGroup', parent=main, btns=buttons) submitButton = buttonGroup.GetBtnByIdx(0) submitButton.OnSetFocus()
def Startup(self, *args): self.sr.selection = None self.sr.hilite = None self.OnSelectCallback = None self.sr.label = uicls.EveLabelSmall( text=localization.GetByLabel('UI/Neocom/NextDNAModification'), parent=self, left=8, top=4, maxLines=1) self.sr.respecTime = uicls.EveLabelMedium(text='', parent=self, left=8, top=18, maxLines=1) self.sr.numberOfRemaps = uicls.EveLabelMedium(text='', parent=self, left=8, top=38, maxLines=1, state=uiconst.UI_HIDDEN) self.sr.respecButton = uicls.Button( parent=self, label=localization.GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/Attributes/RemapStatsNow' ), align=uiconst.TOPRIGHT, pos=(2, 16, 0, 0), func=self.OpenRespecWindow, args=(False, )) self.hint = localization.GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/Attributes/CharacterSheetHint' )
def ApplyAttributes(self, attributes): uicls.SE_BaseClassCore.ApplyAttributes(self, attributes) self.copyicon = uicls.Icon(icon='ui_73_16_1', parent=self, pos=(3, 3, 16, 16), align=uiconst.TOPRIGHT, hint=localization.GetByLabel('UI/Control/Entries/CopyKillInfo')) self.copyicon.OnClick = self.GetCombatText iconCont = uicls.Container(parent=self, align=uiconst.TOLEFT, width=40) self.shipCont = uicls.Container(parent=iconCont, align=uiconst.CENTER, width=32, height=32) self.shipFrame = uicls.Frame(parent=self.shipCont) self.shipIcon = uicls.Icon(parent=self.shipCont, align=uiconst.TOALL, size=256, ignoreSize=True) self.shipIcon.cursor = uiconst.UICURSOR_MAGNIFIER self.shipIcon.OnClick = (self.OnPreviewClick, self.shipIcon) self.shipIcon.OnMouseEnter = self.OnControlEnter self.shipIcon.OnMouseExit = self.OnControlExit self.techIcon = uicls.Sprite(name='techIcon', parent=self.shipCont, align=uiconst.RELATIVE, width=16, height=16, idx=0, left=1, top=1) self.techIcon.OnMouseEnter = self.OnControlEnter self.techIcon.OnMouseExit = self.OnControlExit self.timeCont = uicls.Container(parent=self, align=uiconst.TORIGHT, width=35, padRight=6) self.textCont = uicls.Container(parent=self, align=uiconst.TOALL, state=uiconst.UI_PICKCHILDREN, clipChildren=True) self.victimLabel = uicls.EveLabelMedium(text='', parent=self.textCont, left=5, top=3, state=uiconst.UI_NORMAL, maxLines=1) self.killerLabel = uicls.EveLabelMedium(text='', parent=self.textCont, left=5, top=20, state=uiconst.UI_NORMAL, maxLines=1) self.dateLabel = uicls.EveLabelMedium(text='', parent=self.timeCont, align=uiconst.TOPRIGHT, top=20) self.victimLabel.OnMouseEnter = self.OnControlEnter self.victimLabel.OnMouseExit = self.OnControlExit self.killerLabel.OnMouseEnter = self.OnControlEnter self.killerLabel.OnMouseExit = self.OnControlExit self.hilite = uicls.Fill(bgParent=self, color=(1.0, 1.0, 1.0, 0.1), idx=0) self.hilite.display = False
def Startup(self, *args): self.divisionName = '' self.agentName = '' self.levelName = '' self.agentType = '' self.agentLocation = '' self.missionState = '' self.locationLabel = None uicls.Line(parent=self, align=uiconst.TOBOTTOM, idx=0) picCont = uicls.Container(parent=self, pos=(1, 0, 50, 0), name='picture', state=uiconst.UI_PICKCHILDREN, align=uiconst.TOLEFT) self.sr.pic = uicls.Sprite(parent=picCont, align=uiconst.TOALL, state=uiconst.UI_PICKCHILDREN) self.sr.selection = uicls.Fill(parent=self, padTop=1, padBottom=1, color=(1.0, 1.0, 1.0, 0.125), state=uiconst.UI_HIDDEN) textCont = uicls.Container(parent=self, name='textCont', state=uiconst.UI_PICKCHILDREN, align=uiconst.TOALL, padLeft=6, padTop=2, padRight=6) self.textCont = uicls.Container(parent=textCont, name='text', state=uiconst.UI_PICKCHILDREN, align=uiconst.TOALL, clipChildren=True, padTop=2) self.sr.namelabel = uicls.EveLabelMedium(text='', align=uiconst.TOPLEFT, parent=self.textCont) self.sr.levelLabel = uicls.EveLabelMedium(text='', align=uiconst.TOPLEFT, parent=self.textCont, top=14) self.sr.missionLabel = uicls.EveLabelMedium(text='', parent=self.textCont, align=uiconst.TOPRIGHT) self.agentChatBtn = uicls.ButtonIcon( name='removeButton', parent=self, align=uiconst.BOTTOMRIGHT, width=22, iconSize=16, left=3, top=-1, texturePath='res:/UI/Texture/classes/Chat/AgentChat.png', hint=localization.GetByLabel('UI/Chat/StartConversationAgent'), func=self.StartConversation) buttonIconOnMouseEnter = self.agentChatBtn.OnMouseEnter self.agentChatBtn.OnMouseEnter = (self.OnChatButtonMouseEnter, self.agentChatBtn, buttonIconOnMouseEnter)
def Prepare_(self): self.sr.text = uicls.EveLabelMedium(name='edittext', parent=self._textClipper, left=self.TEXTLEFTMARGIN, state=uiconst.UI_DISABLED, maxLines=1, align=uiconst.CENTERLEFT) self.sr.hinttext = uicls.EveLabelMedium(parent=self._textClipper, name='hinttext', align=uiconst.CENTERLEFT, state=uiconst.UI_DISABLED, maxLines=1, left=self.TEXTLEFTMARGIN) self.capsWarning = uicls.CapsHint(parent=uicore.layer.hint, align=uiconst.TOPLEFT, state=uiconst.UI_DISABLED, idx=0) self.capsWarning.editControl = self self.capsWarning.pointer.SetTexturePath( 'res:/UI/Texture/classes/Hint/pointerToTopLeft.png') self.sr.background = uicls.Container(name='_underlay', parent=self, state=uiconst.UI_DISABLED) self.sr.backgroundFrame = uicls.BumpedUnderlay( parent=self.sr.background) sm.GetService('window').CheckControlAppearance(self) self.Prepare_ActiveFrame_()
def ActivateKillRightMenu(self, menuParent): cont = menuParent.AddContainer(align=uiconst.TOTOP, padding=const.defaultPadding) cont.GetEntryWidth = lambda mc=cont: 230 charName = cfg.eveowners.Get(self.charID).name charNamelabel = localization.GetByLabel( 'UI/Contracts/ContractsWindow/ShowInfoLink', showInfoName=charName, info=('showinfo', const.typeCharacterAmarr, self.charID)) if self.price is not None: headerText = localization.GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/BuyKillRight') explainText = localization.GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/PurchaseLabel', charName=charNamelabel) priceText = localization.GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/AcativationCost', costAmount=util.FmtISK(self.price, 0)) else: headerText = localization.GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/ActivateKillRight') explainText = localization.GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/ActivateLabel', charName=charNamelabel) priceText = '' headerLabel = uicls.EveLabelLarge(text=headerText, parent=cont, align=uiconst.TOTOP, state=uiconst.UI_NORMAL, bold=True) helpTextCont = uicls.Container(name='helpTextCont', parent=cont, align=uiconst.TOTOP, height=40, padTop=const.defaultPadding) helpText = uicls.EveLabelMedium(text=explainText, parent=helpTextCont, state=uiconst.UI_NORMAL, align=uiconst.TOTOP, color=(1.0, 0.0, 0.0, 0.8)) buttonCont = uicls.Container(name='buttonCont', parent=cont, align=uiconst.TOTOP, height=20) priceLabel = uicls.EveLabelMedium(text=priceText, parent=buttonCont) buttonLabel = localization.GetByLabel( 'UI/CharacterSheet/CharacterSheetWindow/Activate') if self.price is None: self.func = 'ActivateKillRight' self.params = (self.killRightID, self.charID, self.shipID) else: self.func = 'BuyKillRight' self.params = (self.killRightID, self.charID, self.shipID, self.price) self.activateBtn = uicls.Button(parent=buttonCont, label=buttonLabel, align=uiconst.TORIGHT, func=self.ActivateKillRight)
def Startup(self, *args): self.sr.picture = uicls.Container(parent=self, pos=(0, 0, 64, 64), name='picture', state=uiconst.UI_DISABLED, align=uiconst.RELATIVE) self.sr.picture.width = 32 self.sr.picture.height = 32 self.sr.picture.left = 2 self.sr.picture.top = 2 self.sr.extraIconCont = uicls.Container(name='extraIconCont', parent=self, idx=0, pos=(0, 0, 16, 16), align=uiconst.BOTTOMLEFT, state=uiconst.UI_HIDDEN) self.sr.namelabel = uicls.EveLabelMedium(text='', parent=self, state=uiconst.UI_DISABLED, idx=0) self.sr.contactLabels = uicls.EveLabelMedium(text='', parent=self, state=uiconst.UI_DISABLED, idx=0, align=uiconst.BOTTOMLEFT) self.sr.contactLabels.top = 2 self.sr.selection = uicls.Fill(bgParent=self, padTop=1, padBottom=2, color=(1.0, 1.0, 1.0, 0.125), state=uiconst.UI_HIDDEN, idx=-1) self.sr.voiceIcon = None self.sr.eveGateIcon = None l = uicls.Line(parent=self, align=uiconst.TOBOTTOM, idx=0) l.opacity = 0.05 self.sr.standingLabel = uicls.EveLabelMedium(text='', parent=self, state=uiconst.UI_DISABLED, idx=0, align=uiconst.TOPRIGHT) self.sr.statusIcon = uicls.Sprite( parent=self, name='statusIcon', align=uiconst.TOPRIGHT, pos=(3, 3, 10, 10), state=uiconst.UI_DISABLED, texturePath='res:/UI/Texture/classes/Chat/Status.png', idx=0) self.sr.corpApplicationLabel = uicls.EveLabelMedium( text='', parent=self, state=uiconst.UI_DISABLED, idx=0, align=uiconst.CENTERRIGHT) self.sr.corpApplicationLabel.left = 16 sm.RegisterNotify(self)
def Startup(self, name, iconpath, flag, dogmaLocation): self.flag = flag self.sr.icon = uicls.Icon(parent=self, size=32, state=uiconst.UI_DISABLED, ignoreSize=True, icon=iconpath) self.sr.hint = name self.sr.hilite = uicls.Fill(parent=self, name='hilite', align=uiconst.RELATIVE, state=uiconst.UI_HIDDEN, idx=-1, width=32, height=self.height) self.sr.icon.color.a = 0.8 uicls.Container(name='push', parent=self, align=uiconst.TOLEFT, width=32) self.sr.statusCont = uicls.Container(name='statusCont', parent=self, align=uiconst.TOLEFT, width=50) self.sr.statustext1 = uicls.EveLabelMedium(text='status', parent=self.sr.statusCont, name='cargo_statustext', left=0, top=2, idx=0, state=uiconst.UI_DISABLED, align=uiconst.TOPRIGHT) self.sr.statustext2 = uicls.EveLabelMedium(text='status', parent=self.sr.statusCont, name='cargo_statustext', left=0, top=14, idx=0, state=uiconst.UI_DISABLED, align=uiconst.TOPRIGHT) m3TextCont = uicls.Container(name='m3Cont', parent=self, align=uiconst.TOLEFT, width=12) self.sr.m3Text = uicls.EveLabelMedium(text=localization.GetByLabel( 'UI/Fitting/FittingWindow/CubicMeters'), parent=m3TextCont, name='m3', left=4, top=14, idx=0, state=uiconst.UI_NORMAL) self.dogmaLocation = dogmaLocation sm.GetService('inv').Register(self) self.invReady = 1
def ApplyAttributes(self, attributes): invCont._InvContBase.ApplyAttributes(self, attributes) ownerID = attributes.ownerID ownerName = cfg.eveowners.Get(ownerID).name self.topCont = uicls.Container(parent=self, align=uiconst.TOTOP, height=65, idx=0) myImgCont = uicls.Container(name='myImgCont', parent=self.topCont, align=uiconst.TOPLEFT, width=64, height=64, padLeft=2) uiutil.GetOwnerLogo(myImgCont, ownerID, size=64, noServerCall=True) uicls.EveLabelMedium(text=ownerName, parent=self.topCont, left=72, top=2, bold=True) self.acceptIcon = uicls.Icon(icon='ui_38_16_193', parent=self.topCont, left=67, top=14) uicls.InvContViewBtns(parent=self.topCont, align=uiconst.BOTTOMLEFT, left=72, controller=self) self.moneyLabel = uicls.EveLabelMedium(parent=self.topCont, left=6, top=-2, align=uiconst.BOTTOMRIGHT)
def SetLabel(self, label, labelAlign): if labelAlign not in (uiconst.CENTERLEFT, uiconst.CENTERRIGHT): raise RuntimeError( 'SetLabel labelAlign has to be CENTERLEFT or CENTERRIGHT') if labelAlign == uiconst.CENTERLEFT: iconAlign = uiconst.CENTERRIGHT else: iconAlign = uiconst.CENTERLEFT if self._label is None: self._label = uicls.EveLabelMedium(parent=self, text=label, align=labelAlign, bold=True, left=const.defaultPadding * 2) else: self._label.text = label margin = self.height - self.iconSize self.width = self.GetFullWidth() if self.maxWidth: self.width = min(self.maxWidth, self.width) self._label.SetRightAlphaFade( self.maxWidth - const.defaultPadding * 6, 10) icon = self.AccessIcon() icon.align = iconAlign icon.left = margin background = self.AccessBackground() background.align = uiconst.CENTERLEFT background.width = self.width
def Load(self, args): if not self.sr.Get('inited', 0): self.sr.inited = 1 self.sr.wndButtonContainer = uicls.Container(name='results', parent=self, align=uiconst.TOTOP, height=16) showHide = uicls.Container(name='filters', parent=self.sr.wndButtonContainer, height=48, align=uiconst.TOTOP) uicls.Line(parent=showHide, align=uiconst.TOTOP, top=15, color=(0.0, 0.0, 0.0, 0.25)) uicls.Line(parent=showHide, align=uiconst.TOTOP) self.sr.showHide = showHide uicls.EveHeaderSmall(text=localization.GetByLabel('UI/Corporations/BaseCorporationUI/Query'), parent=showHide, left=8, top=3, state=uiconst.UI_NORMAL) a = uicls.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 = uicls.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 = uicls.Container(name='form', parent=self, align=uiconst.TOALL, pos=(0, 0, 0, 0)) self.sr.wndForm = wndForm wndOutputTypeArea = uicls.Container(name='output_type', parent=wndForm, align=uiconst.TOTOP, height=24) uicls.Container(name='push', parent=wndOutputTypeArea, align=uiconst.TOTOP, height=6) label = uicls.Container(name='text', parent=wndOutputTypeArea, align=uiconst.TOLEFT, width=150) uicls.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 = uicls.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('07_11', localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/FindMemberInRole'))
def Startup(self, *args): self.sr.label = uicls.EveLabelMedium(text='', parent=self, left=5, state=uiconst.UI_DISABLED, maxLines=1) self.sr.line = uicls.Line(parent=self, align=uiconst.TOBOTTOM) self.sr.selection = uicls.Fill(parent=self, padTop=1, padBottom=1, color=(1.0, 1.0, 1.0, 0.25)) self.sr.selection.state = uiconst.UI_HIDDEN self.sr.hilite = uicls.Fill(parent=self, padTop=1, padBottom=1, color=(1.0, 1.0, 1.0, 0.25)) self.sr.infoicon = uicls.InfoIcon(size=16, left=0, top=2, parent=self, idx=0, align=uiconst.TOPRIGHT) self.sr.infoicon.OnClick = self.ShowInfo self.sr.icon = uicls.Container(parent=self, width=24, height=24, left=2, top=1, align=uiconst.TOPLEFT) self.sr.events = ('OnClick', 'OnMouseDown', 'OnMouseUp', 'OnDblClick', 'OnMouseHover') for eventName in self.sr.events: setattr(self.sr, eventName, None)
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.specialGroups = util.GetNPCGroups() self.scope = 'inflight' self.SetCaption( localization.GetByLabel('UI/Inflight/Scanner/ScannerFilterEditor')) self.SetMinSize([300, 250]) self.SetWndIcon() self.SetTopparentHeight(0) self.sr.main = uiutil.GetChild(self, 'main') topParent = uicls.Container(name='topParent', parent=self.sr.main, height=64, align=uiconst.TOTOP) topParent.padRight = 6 topParent.padLeft = 6 uicls.EveHeaderSmall( text=localization.GetByLabel('UI/Inflight/Scanner/FilterName'), parent=topParent, state=uiconst.UI_DISABLED, idx=0, top=2) nameEdit = uicls.SinglelineEdit(name='name', parent=topParent, setvalue=None, align=uiconst.TOTOP, maxLength=64) nameEdit.top = 16 self.sr.nameEdit = nameEdit hint = uicls.EveLabelMedium(text=localization.GetByLabel( 'UI/Inflight/Scanner/SelectGroupsToFilter'), parent=topParent, align=uiconst.TOTOP) hint.top = 4 self.sr.topParent = topParent self.sr.scroll = uicls.Scroll( parent=self.sr.main, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.scroll.multiSelect = 0 self.DefineButtons( uiconst.OKCANCEL, okLabel=localization.GetByLabel('UI/Common/Buttons/Save'), okFunc=self.SaveChanges, cancelFunc=self.Close) self.scanGroupsNames = { const.probeScanGroupAnomalies: localization.GetByLabel('UI/Inflight/Scanner/CosmicAnomaly'), const.probeScanGroupSignatures: localization.GetByLabel('UI/Inflight/Scanner/CosmicSignature'), const.probeScanGroupShips: localization.GetByLabel('UI/Inflight/Scanner/Ship'), const.probeScanGroupStructures: localization.GetByLabel('UI/Inflight/Scanner/Structure'), const.probeScanGroupDronesAndProbes: localization.GetByLabel('UI/Inflight/Scanner/DroneAndProbe') } self.Maximize() self.OnResizeUpdate()
def AddLayout(self): self.sr.main = uicls.Container(name='main', parent=self, align=uiconst.TOPLEFT, height=ICONHEIGHT, width=ICONWIDTH) self.sr.background = uicls.Container(name='background', parent=self.sr.main, align=uiconst.TOTOP, height=88) self.sr.backgroundFrame = uicls.BumpedUnderlay( name='backgroundUnderlay', parent=self.sr.background) self.sr.iconContainer = uicls.Container(name='iconContainer', parent=self.sr.main, align=uiconst.CENTERTOP, pos=(0, 10, 54, 54), idx=0) invTypeIcon = cfg.invtypes.Get(self.typeID).Icon() self.sr.icon = icon = uicls.Icon(parent=self.sr.iconContainer, align=uiconst.TOALL, state=uiconst.UI_DISABLED) if invTypeIcon is None: icon.ChangeIcon(typeID=self.typeID) else: icon.LoadIcon(invTypeIcon.iconFile) self.sr.quantityContainer = uicls.Container(name='quantityContainer', parent=self.sr.background, align=uiconst.CENTERBOTTOM, height=20, width=ICONWIDTH - 1, idx=0, bgColor=(0, 0, 0, 0.5)) self.sr.quantityLabel = uicls.EveLabelMedium( text='', parent=self.sr.quantityContainer, align=uiconst.CENTERBOTTOM, left=3, bold=True) self.barContainer = uicls.Fill(name='barContainer', parent=self.sr.quantityContainer, align=uiconst.TOPLEFT, color=(1, 1, 1, 0.25), height=20, width=0) self.sr.typeNameContainer = uicls.Container(name='typeNameContainer', parent=self.sr.main, align=uiconst.TOALL) self.sr.typeName = uicls.LabelLink( text=localization.GetByLabel('UI/UpgradeWindow/CenteredTypeText', type=self.typeID), parent=self.sr.typeNameContainer, align=uiconst.CENTERTOP, maxLines=3, width=ICONWIDTH, func=(sm.GetService('info').ShowInfo, self.typeID), hint=localization.GetByLabel('UI/Commands/ShowInfo'), top=3) self.sr.typeName.maxLines = None self.sr.frame = uicls.Frame(parent=self, state=uiconst.UI_HIDDEN)
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 Startup(self): self.abortbtn = None self.abortbtnpar = None self.confirmbtn = None self.abortconfirmbtnpar = None self.sr.progresstext = None self.sr.readprogress = util.KeyVal(text='', prev=0) self.scope = 'all' self.sr.main = uicls.Container(parent=self, pos=(0, 0, 0, 0), name='maincontainer', state=uiconst.UI_PICKCHILDREN, align=uiconst.TOALL) self.sr.wndUnderlay = uicls.WindowUnderlay(parent=self, transparent=False) par = uicls.Container(name='progressParent', parent=self.sr.main, align=uiconst.TOBOTTOM, height=32) progress = uicls.Container(parent=par, pos=(25, 10, self.width - 50, 10), name='progressbar', state=uiconst.UI_DISABLED, align=uiconst.RELATIVE) self.sr.glowClipper = uicls.Container(parent=progress, pos=(0, 0, 0, 10), name='glowclipper', state=uiconst.UI_DISABLED, clipChildren=True, align=uiconst.RELATIVE) self.sr.glow = uicls.Container(parent=self.sr.glowClipper, pos=(0, 0, progress.width, 10), name='glow', state=uiconst.UI_DISABLED, align=uiconst.RELATIVE) glowFill = uicls.Fill(parent=self.sr.glow, name='glowFill', state=uiconst.UI_DISABLED, color=(1.0, 1.0, 1.0, 0.5), align=uiconst.TOALL) shade = uicls.Container(parent=progress, pos=(0, 0, 0, 0), name='shade', state=uiconst.UI_DISABLED, align=uiconst.TOALL) shadeFill = uicls.Fill(parent=shade, name='shadeFill', state=uiconst.UI_DISABLED, color=(0.0, 0.0, 0.0, 0.18), align=uiconst.TOALL) uicls.Frame(parent=progress) self.sr.loading_progress = progress self.sr.progresstext = uicls.EveLabelMedium(text='', parent=progress, width=270, left=2, top=4, state=uiconst.UI_NORMAL) self.state = uiconst.UI_PICKCHILDREN
def MissionMenu(self, menuParent, bmInfo, *args): missionNameID = bmInfo.missionNameID bookmarks = bmInfo.bookmarks agentID = bmInfo.agentID startInfoColorTag = '<color=-2039584>' endColorTag = '</color>' endInfoTag = '</url>' for bm in bookmarks: bmTypeID = bm.typeID headerText = '' systemName = cfg.evelocations.Get(bm.solarsystemID).name headerText = bm.hint.replace(systemName, '') headerText = headerText.strip(' ').strip('-').strip(' ') header = menuParent.AddHeader(text=headerText) menuCont = menuParent.AddContainer(name='menuCont', align=uiconst.TOTOP, height=40) menuCont.GetEntryWidth = lambda mc=menuCont: self.GetContainerEntryWidth( mc) startLocationInfoTag = '<url=showinfo:%d//%d>' % (bmTypeID, bm.itemID) locationName = self.GetColorCodedSecurityStringForLocation( bm.solarsystemID, cfg.evelocations.Get(bm.itemID).name) locationText = localization.GetByLabel( 'UI/Agents/InfoLink', startInfoTag=startLocationInfoTag, startColorTag=startInfoColorTag, objectName=locationName, endColorTag=endColorTag, endnfoTag=endInfoTag) locationLabel = uicls.EveLabelMedium(text=locationText, parent=menuCont, name='location', align=uiconst.TOTOP, padLeft=6, state=uiconst.UI_NORMAL, maxLines=1) locationLabel.GetMenu = (self.GetLocationMenu, bm) if bm.itemID != session.stationid2: actionText, actionFuncAndArgs, actionIcon = self.FindButtonAction( bm.itemID, bm.solarsystemID, bm) menuParent.AddIconEntry(icon=actionIcon, text=actionText, callback=actionFuncAndArgs) menuParent.AddSpace() menuParent.AddDivider() menuParent.AddIconEntry( icon='res:/UI/Texture/Icons/38_16_190.png', text=localization.GetByLabel('UI/Agents/Commands/ReadDetails'), callback=(self.ReadDetails, agentID)) menuParent.AddIconEntry( icon='res:/UI/Texture/classes/Chat/AgentChat.png', text=localization.GetByLabel('UI/Chat/StartConversationAgent'), callback=(self.TalkToAgent, agentID))
def Startup(self, *etc): uicls.Line(parent=self, align=uiconst.TOBOTTOM) self.sr.label = uicls.EveLabelMedium(text='', parent=self, left=6, top=2, width=1000, state=uiconst.UI_DISABLED, idx=0) self.state = uiconst.UI_NORMAL
def ConstructLayout(self, *args): self.countSelectedText = '' self.sr.textContainer = uicls.Container(name='textContainer', align=uiconst.TOTOP, parent=self.sr.main, height=65, padding=const.defaultPadding) self.sr.textLabel = uicls.EveLabelMedium(text=localization.GetByLabel( 'UI/Fitting/LegacyImport', maxFittings=const.maxCharFittings), align=uiconst.TOTOP, parent=self.sr.textContainer) self.sr.textContainer2 = uicls.Container(name='textContainer', align=uiconst.TOTOP, parent=self.sr.main, height=15, padding=const.defaultPadding) self.sr.countSelectedTextLabel = uicls.EveLabelMedium( text=self.countSelectedText, align=uiconst.TOALL, parent=self.sr.textContainer2) self.sr.buttonContainer = uicls.Container(name='buttonContainer', align=uiconst.TOBOTTOM, parent=self.sr.main) btns = [[ localization.GetByLabel('UI/Generic/Cancel'), self.CloseByUser, None, 81 ], [localization.GetByLabel('UI/Generic/OK'), self.Import, None, 81]] self.buttonGroup = uicls.ButtonGroup(btns=btns, parent=self.sr.buttonContainer) self.okBtn = self.buttonGroup.children[0].children[1] self.sr.buttonContainer.height = 23 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()