def ApplyAttributes(self, attributes): LayoutGridRow.ApplyAttributes(self, attributes) self.func = attributes.func self.funcArgs = attributes.funcArgs self.highlight = FillThemeColored( bgParent=self, padding=(1, 0, 1, 0), opacity=0.25, colorType=uiconst.COLORTYPE_UIHILIGHT) self.highlight.display = False
def MakeDragContainer(self): self.dragContainer = Container(parent=self.weekContParent, align=uiconst.TOPLEFT, idx=0) FrameThemeColored(parent=self.dragContainer, frameConst=uiconst.FRAME_BORDER1_CORNER3, colorType=uiconst.COLORTYPE_UIHILIGHT, opacity=0.5) FillThemeColored(parent=self.dragContainer, frameConst=uiconst.FRAME_FILLED_CORNER3, opacity=0.3)
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.isEnabled = attributes.get('isEnabled', True) self.disabled = False FrameThemeColored(parent=self) btnCont = Container(parent=self) self.onBtn = Container(parent=self, align=uiconst.TOLEFT_PROP, width=0.5, bgColor=COLOR_GREEN, state=uiconst.UI_DISABLED) self.offBtn = Container(parent=self, align=uiconst.TORIGHT_PROP, width=0.5, bgColor=COLOR_RED, state=uiconst.UI_DISABLED) self.knob = FillThemeColored(parent=btnCont, align=uiconst.TOLEFT_PROP, width=0.5, state=uiconst.UI_DISABLED, colorType=uiconst.COLORTYPE_UIHEADER, opacity=1.0) self.SetStateNotAnimated()
def ApplyAttributes(self, attributes): ProfileEntryBase.ApplyAttributes(self, attributes) self.bgFill = None self.settingID = attributes.settingID self.structureProfileController = attributes.structureProfileController self.fillUnderlay = FillThemeColored( bgParent=self, colorType=uiconst.COLORTYPE_UIBASECONTRAST) self.fill = FillThemeColored(bgParent=self, colorType=uiconst.COLORTYPE_UIHEADER, padBottom=1) self.rigthCont = Container(parent=self, name='rightCont', align=uiconst.TORIGHT, width=0) self.labelCont = Container(parent=self, name='labelCont', padLeft=SECTION_LABEL_LEFT) self.sectionNameLabel = EveLabelMedium(name='sectionName', parent=self.labelCont, align=uiconst.CENTERLEFT, text='', autoFadeSides=20) self.SetSectionLabel()
def ApplyAttributes(self, attributes): ContainerAutoSize.ApplyAttributes(self, attributes) self.autoShowDetails = bool(attributes.autoShowDetails) or True if attributes.get('showBackground', True): Fill(bgParent=self, color=(0, 0, 0, 0.2)) BlurredBackgroundSprite(bgParent=self, color=(1, 1, 1, 0.9)) self.headerContainer = Container(parent=self, align=uiconst.TOTOP) self.mouseOverFill = FillThemeColored( bgParent=self.headerContainer, colorType=uiconst.COLORTYPE_UIHILIGHT, opacity=0.0) self.completedFill = FillThemeColored( bgParent=self.headerContainer, colorType=uiconst.COLORTYPE_UIHILIGHT, opacity=0.0) self.backgroundContainer = InfoPanelHeaderBackground( bgParent=self.headerContainer) self.achievementTask = attributes.achievement self.achievementGroup = attributes.achievementGroup self.callbackTaskExpanded = attributes.callbackTaskExpanded self.checkbox = Sprite(parent=self.headerContainer, texturePath=TASK_ENTRY_UNCHECKED_TEXTURE_PATH, pos=(4, 3, 14, 14)) self.achievementText = EveLabelMedium(name='achievementText', text=self.achievementTask.name, parent=self.headerContainer, padLeft=2 * self.checkbox.left + self.checkbox.width, align=uiconst.TOTOP, padTop=2) self.UpdateAchievementTaskState() newHeight = max( self.checkbox.height + 2 * self.checkbox.top, self.achievementText.textheight + 2 * self.achievementText.padTop) self.headerContainer.height = newHeight if attributes.blinkIn and self.IsTaskCompleted(): uthread.new(uicore.animations.BlinkIn, self, duration=0.2, loops=4)
def ApplyAttributes(self, attributes): SovDashboard.ApplyAttributes(self, attributes) self.searchInput.left += const.defaultPadding self.reloadBtn.display = False EveLabelMedium( parent=self.topSection, text=GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Systems'), align=uiconst.CENTERLEFT, left=const.defaultPadding * 2) FillThemeColored(parent=self.topSection, colorType=uiconst.COLORTYPE_UIHEADER, opacity=0.15, padding=(const.defaultPadding, 0, const.defaultPadding, 1))
def CreateToolbar(self): self.toolbarContainer = Container(parent=self.headerParent, name='toolbarContainer', align=uiconst.CENTERTOP, width=TOOLBARWIDTH_FULLSCREEN, height=TOOLBARHEIGHT, state=uiconst.UI_NORMAL) self.toolbarContainer.DelegateEvents(self) self.caption = EveLabelMedium(parent=self.toolbarContainer, align=uiconst.CENTER, bold=True) FillThemeColored(bgParent=self.toolbarContainer, opacity=0.9, padding=(1, 1, 1, 0)) grid = LayoutGrid(parent=self.toolbarContainer, columns=5, cellPadding=2, align=uiconst.CENTERRIGHT, left=6, opacity=0.6) self.dockViewModeButton = DockablePanelHeaderButtonMenu( parent=grid, dockViewModeCallback=self.ChangeViewMode, panelID=self.panelID) closeButton = DockablePanelHeaderButton( parent=grid, hint=localization.GetByLabel('UI/Generic/Close'), texturePath='res:/UI/Texture/classes/DockPanel/closeButton.png', func=self.CloseByUser) tOutline = StretchSpriteHorizontalThemeColored( texturePath='res:/UI/Texture/classes/MapView/toolbarLine.png', colorType=uiconst.COLORTYPE_UIHILIGHT, opacity=uiconst.OPACITY_FRAME, leftEdgeSize=64, rightEdgeSize=64, parent=self.toolbarContainer, align=uiconst.TOBOTTOM_NOPUSH, padding=(-48, 0, -48, -15), height=64) tFill = StretchSpriteHorizontalThemeColored( texturePath='res:/UI/Texture/classes/MapView/toolbarFill.png', colorType=uiconst.COLORTYPE_UIBASE, leftEdgeSize=64, rightEdgeSize=64, parent=self.toolbarContainer, align=uiconst.TOBOTTOM_NOPUSH, padding=(-48, 0, -48, -15), height=64)
def Startup(self, *etc): self.sr.expander = GlowSprite(parent=self, pos=(3, 0, 16, 16), name='expander', state=uiconst.UI_DISABLED, texturePath='res:/UI/Texture/Shared/expanderDown.png', align=uiconst.CENTERLEFT) self.sr.expander.OnClick = self.Toggle self.sr.icon = uicontrols.Icon(parent=self, pos=(4, 0, 16, 16), name='icon', state=uiconst.UI_DISABLED, icon='ui_22_32_28', align=uiconst.CENTERLEFT, ignoreSize=True) self.sr.labelClipper = uiprimitives.Container(parent=self, name='labelClipper', align=uiconst.TOALL, pos=(0, 0, const.defaultPadding, 0), clipChildren=1) self.sr.labelClipper.OnClick = self.OnClick self.sr.labelClipper.GetMenu = self.GetMenu self.sr.label = uicontrols.EveLabelMedium(text='', parent=self.sr.labelClipper, left=5, state=uiconst.UI_DISABLED, maxLines=1, align=uiconst.CENTERLEFT) if self.sr.node.sublevel > 0: self.sr.fill = None else: self.sr.fill = FillThemeColored(parent=self, padding=(1, 0, 1, 1), colorType=uiconst.COLORTYPE_UIHEADER, opacity=0.15) mainLinePar = uiprimitives.Container(parent=self, name='mainLinePar', align=uiconst.TOALL, idx=0, pos=(0, 0, 0, 0), state=uiconst.UI_DISABLED)
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.jobData = attributes.jobData self.skills = [] self.skillIcon = Sprite(name='skillIcon', parent=self, align=uiconst.CENTER, state=uiconst.UI_DISABLED, pos=(0, -1, 33, 33)) self.patternSprite = Sprite( name='patternSprite', bgParent=self, texturePath= 'res:/UI/Texture/classes/Industry/Center/skillFramePattern.png') FillThemeColored(bgParent=self, padding=3) self.UpdateState()
def IndicateStackable(self, wnd=None): if wnd is None: if self.sr.snapIndicator: self.sr.snapIndicator.Close() self.sr.snapIndicator = None return if not wnd.IsStackable() or not self.IsStackable(): return if self.sr.snapIndicator is None: self.sr.snapIndicator = FillThemeColored( parent=None, colorType=uiconst.COLORTYPE_UIHILIGHTGLOW, align=uiconst.TOTOP_NOPUSH, height=20, padding=(2, 2, 2, 0)) si = self.sr.snapIndicator si.state = uiconst.UI_DISABLED if si.parent != wnd: uiutil.Transplant(si, wnd, idx=0) else: uiutil.SetOrder(si, 0)
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) sm.RegisterNotify(self) self.jobData = attributes.jobData self.materialData = attributes.materialData self.materialData.on_updated.connect(self.OnMaterialUpdated) self.materialData.on_errors.connect(self.OnMaterialErrors) self.isReady = None self.icon = ItemIcon(parent=self, typeID=self.materialData.typeID, align=CENTERTOP, state=UI_DISABLED, pos=(0, 6, 32, 32)) self.label = Label(parent=self, align=CENTERBOTTOM, top=-1, fontsize=10) self.bgGlow = Sprite(name='bgGlow', parent=self, align=TOALL, state=UI_DISABLED, texturePath='res:/UI/Texture/Classes/Industry/Input/bgGlow.png', color=COLOR_READY, opacity=OPACITY_DEFAULT) self.bgFrame = Sprite(name='bgFrame', parent=self, align=TOALL, state=UI_DISABLED, texturePath='res:/UI/Texture/Classes/Industry/Input/bgFrame.png', color=COLOR_FRAME) FillThemeColored(bgParent=self, opacity=0.5) Sprite(name='valueBg', parent=self, align=TOALL, state=UI_DISABLED, texturePath='res:/UI/Texture/Classes/Industry/Input/valueBg.png', color=COLOR_FRAME, opacity=0.1) self.gauge = Gauge(parent=self, align=BOTTOMLEFT, state=UI_DISABLED, pos=(0, 13, self.width + 1, 0), gaugeHeight=3, gradientBrightnessFactor=1.0, backgroundColor=(0, 0, 0, 0)) self.bgFill = Sprite(name='bgFill', parent=self, align=TOALL, state=UI_DISABLED, texturePath='res:/UI/Texture/Classes/Industry/Input/bg.png', color=COLOR_FRAME, opacity=0.1) self.ConstructBackground() self.UpdateState()
def ApplyAttributes(self, attributes): uiprimitives.Container.ApplyAttributes(self, attributes) sm.RegisterNotify(self) invCont = attributes.invCont self.secondaryVolume = 0.0 self.additionalVolume = 0.0 self.refreshGaugesThread = None self.resetPending = False self.capacityText = uicontrols.EveLabelSmall(name='capacityText', parent=self, align=uiconst.CENTER, top=1) self.bg = FillThemeColored(bgParent=self, colorType=uiconst.COLORTYPE_UIBASECONTRAST, opacity=0.5) uicontrols.Frame(parent=self, color=(0.5, 0.5, 0.5, 0.05)) self.capacityGaugeParentSec = uiprimitives.Container(name='capacityGaugeParent', parent=self, align=uiconst.TOALL, state=uiconst.UI_DISABLED) self.capacityGaugeSec = uicontrols.GradientSprite(parent=self.capacityGaugeParentSec, align=uiconst.TOLEFT_PROP, rotation=-pi / 2, rgbData=[(0, self.COLOR_SECONDARY)], alphaData=[(0, 0.7), (0.5, 1.0), (1.0, 0.7)]) self.capacityGaugeParent = uiprimitives.Container(name='capacityGaugeParent', parent=self, align=uiconst.TOALL, state=uiconst.UI_DISABLED) self.capacityGauge = uicontrols.GradientSprite(parent=self.capacityGaugeParent, align=uiconst.TOLEFT_PROP, rotation=-pi / 2, rgbData=[(0, self.COLOR_PRIMARY)], alphaData=[(0, 0.7), (0.5, 1.0), (1.0, 0.7)]) self.capacityGaugeParentAdd = uiprimitives.Container(name='capacityGaugeParentAdd', parent=self, align=uiconst.TOALL, state=uiconst.UI_DISABLED) self.capacityGaugeAdd = uicontrols.GradientSprite(parent=self.capacityGaugeParent, align=uiconst.TOLEFT_PROP, rotation=-pi / 2, rgbData=[(0, self.COLOR_SECONDARY)], alphaData=[(0, 0.7), (0.5, 1.0), (1.0, 0.7)]) if invCont: self.SetInvCont(invCont) else: self.invCont = None
def LoadTooltipPanel(self, tooltipPanel, *args): tooltipPanel.Flush() tooltipPanel.columns = 3 tooltipPanel.state = uiconst.UI_NORMAL tooltipPanel.margin = (0, 1, 0, 1) buttonPadding = 0 formationsInfo = probescanning.customFormations.GetCustomFormationsInfo( ) buttonRow = tooltipPanel.AddRow( rowClass=ProbeTooltipButton_SaveFormation, text=localization.GetByLabel( 'UI/Inflight/Scanner/SaveCurrentFormation'), cellPadding=buttonPadding, texturePath= 'res:/UI/Texture/Classes/ProbeScanner/saveformationProbesIcon.png') if not self.scanSvc.GetActiveProbes() or len(formationsInfo) >= 10: buttonRow.Disable() selectedFormationID = probescanning.customFormations.GetSelectedFormationID( ) self.formationButtonsByID = {} for formationInfo in formationsInfo: formationID = formationInfo[0] isActiveFormation = formationID == selectedFormationID formationName = '%s (%i)' % (formationInfo[1], formationInfo[2]) button = tooltipPanel.AddRow( rowClass=ProbeTooltipButton_CustomFormation, text=formationName, formation=formationInfo, OnChangeCallback=self.OnCustomFormationsChanged) if isActiveFormation: FillThemeColored(bgParent=button, padding=(3, 2, 3, 2), opacity=0.5, colorType=uiconst.COLORTYPE_UIHILIGHT) self.formationButtonsByID[formationInfo[0]] = button self.customFormationTooltip = weakref.ref(tooltipPanel) self.UpdateTooltipPanel(tooltipPanel) self.tooltipUpdateTimer = AutoTimer(100, self.UpdateTooltipPanel, tooltipPanel)
def AddHeader(self): headerCont = Container(name='headerCont', parent=self, align=uiconst.TOTOP, height=32, clipChildren=True) fill = FillThemeColored(parent=headerCont, padBottom=1, colorType=uiconst.COLORTYPE_UIHEADER) text = GetByLabel('UI/StructureProfiles/StructureProfiles') label = EveLabelMedium(text=text, parent=headerCont, left=8, top=0, state=uiconst.UI_DISABLED, maxLines=1, align=uiconst.CENTERLEFT, bold=True) left = label.left + label.textwidth + 4 helpIcon = MoreInfoIcon(parent=headerCont, hint=GetByLabel(self.explanationLabelPath), left=left, top=2)
def CreateColumns(self, columns, fixedColumns = None): self.headerContainer.Flush() self.columnIDs = columns if columns: for columnID in columns: header = Container(parent=self.headerContainer, align=uiconst.TOLEFT, state=uiconst.UI_NORMAL) header.OnClick = (self.ClickHeader, header) header.columnID = columnID header.sortTriangle = None headerDivider = LineThemeColored(parent=header, align=uiconst.TORIGHT, opacity=uiconst.OPACITY_FRAME) entry = VerticalLabel(parent=header, text=columnID, align=uiconst.BOTTOMLEFT, state=uiconst.UI_DISABLED) entry.top = -entry.label.textheight + const.defaultPadding header.label = entry.label header.hint = columnID header.width = fixedColumns[columnID] if columnID in self.LEFTCENTERED_COLUMNIDS: entry.left = 4 else: entry.left = (header.width - entry.label.textheight) / 2 header.fill = FillThemeColored(parent=header, colorType=uiconst.COLORTYPE_UIHILIGHT, padLeft=-1, padRight=-1, opacity=0.75) header.label.SetRightAlphaFade(fadeEnd=self.height - 10, maxFadeWidth=20) self.UpdateActiveState()