def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.sensorSuite = sm.GetService('sensorSuite') config = attributes.filterConfig iconCont = Container(parent=self, width=24, height=24, align=uiconst.TOLEFT, padding=(2, 2, 0, 2), state=uiconst.UI_DISABLED) self.icon = Sprite(parent=iconCont, width=16, height=16, texturePath=config.iconPath, color=config.color) Sprite(parent=iconCont, width=16, height=16, texturePath=config.iconPath, opacity=0.5) textCont = Container(parent=self, align=uiconst.TOALL) self.label = EveLabelMedium(parent=textCont, align=uiconst.CENTERLEFT, text=localization.GetByLabel(config.label)) self.width = iconCont.width + iconCont.padLeft + iconCont.padRight + self.label.textwidth + defaultPadding self.config = config self.isActive = attributes.isActive if self.isActive: self.icon.opacity = self.opacityMouseDownIcon self.label.opacity = self.opacityMouseDownLabel else: self.icon.opacity = self.opacityIdleIcon self.label.opacity = self.opacityIdleLabel
def _ConstructNotificationArea(self): self.windowunderlay = Container(parent=self.topContainer, name='windowUnderlay', align=uiconst.TOALL) self._ConstructResizeLine() self.historyHeader = Container(name='HistoryContainer', parent=self.windowunderlay, align=uiconst.TOTOP, height=13, padding=(0, 4, 0, 0), clipChildren=True, opacity=0.0) self.historyHeaderLabel = EveLabelSmall( name='history', parent=self.historyHeader, align=uiconst.CENTER, text=localization.GetByLabel( 'Notifications/NotificationWidget/NotificationHistoryCaption'), bold=True) self.historyHeader.height = max(self.historyHeader.height, self.historyHeaderLabel.textheight + 2) self._ConstructControlContainer() if self.verticalAlignment == ExpandAlignmentConst.EXPAND_ALIGNMENT_VERTICAL_UP: padding = (5, 0, 5, 0) else: padding = (5, 0, 5, 5) self.scrollList = NotificationScrollContainer( name='myScrollCont', parent=self.windowunderlay, align=uiconst.TOALL, padding=padding) self.lastobservedValue = self.scrollList.verticalScrollBar.isDragging self.underlay = BumpedUnderlay(bgParent=self.scrollList)
def Startup(self, *args): listentry.Checkbox.Startup(self, *args) colorPicker = Container(parent=self, pos=(0, 0, 27, 20), name='colorPicker', state=uiconst.UI_NORMAL, align=uiconst.CENTERRIGHT, idx=0) Sprite(parent=colorPicker, pos=(0, 0, 16, 16), name='arrow', align=uiconst.CENTERRIGHT, texturePath='res:/ui/texture/icons/38_16_229.png', color=(1, 1, 1, 0.5), state=uiconst.UI_DISABLED) self.colorCont = Container(parent=colorPicker, name='colorCont', pos=(2, 0, 10, 10), align=uiconst.CENTERLEFT, state=uiconst.UI_DISABLED) Frame(parent=self.colorCont, name='colorFrame', color=(1, 1, 1, 0.2)) self.colorFill = Fill(parent=self.colorCont, color=(0, 0, 0, 0)) colorPicker.LoadTooltipPanel = self.LoadColorTooltipPanel colorPicker.GetTooltipPointer = self.GetColorTooltipPointer colorPicker.GetTooltipDelay = self.GetTooltipDelay
def _create_event_banner(self, parent_container): SEASON_DETAILS_BANNER_HEIGHT = float( parent_container.height) / 2 - SEASON_INFO_PADDING SEASON_DETAILS_HEADER_HEIGHT = SEASON_DETAILS_BANNER_HEIGHT / 2 season_details_top_container = Container( name='season_details_top_container', parent=parent_container, align=uiconst.TOTOP, height=SEASON_DETAILS_BANNER_HEIGHT, clipChildren=True, padding=SEASON_DETAILS_BANNER_PADDING) season_details_header_container = Container( name='season_details_header_container', parent=season_details_top_container, align=uiconst.CENTER, height=SEASON_DETAILS_HEADER_HEIGHT, width=self.width) fill_default_background_color_for_container( season_details_header_container) current_event_banner_container = Container( name='season_details_banner_container', parent=season_details_header_container, align=uiconst.TOTOP, height=SEASON_DETAILS_HEADER_HEIGHT, width=self.width) CurrentEventBanner( name='season_details_top_banner_container', parent=current_event_banner_container, banner_texture=self.season_service.get_season_background_minimal(), align=uiconst.CENTER, width=current_event_banner_container.width, top=SEASON_BANNER_TOP)
def AddScheduleToTooltip(self, tooltipPanel, typeID, hoursThisWeek, hoursNextWeek): tooltipPanel.margin = (8, 8, 8, 8) tooltipPanel.cellSpacing = (30, 10) tooltipPanel.AddLabelLarge( text=GetByLabel('UI/StructureProfiles/ThisWeek'), align=uiconst.CENTER, bold=True) thisWeekSchedule = structures.Schedule(hoursThisWeek) scheduleCont = Container(width=self.scheduleSize, height=self.scheduleSize, align=uiconst.TOPLEFT) VulnerabilitySchedulerWithReinforcement(parent=scheduleCont, canModify=False, schedule=thisWeekSchedule, frame=False) if hoursThisWeek == hoursNextWeek: tooltipPanel.columns = 1 tooltipPanel.AddCell(cellObject=scheduleCont) else: tooltipPanel.columns = 2 tooltipPanel.AddLabelLarge( text=GetByLabel('UI/StructureProfiles/NextWeek'), align=uiconst.CENTER, bold=True) tooltipPanel.AddCell(cellObject=scheduleCont) nextWeekSchedule = structures.Schedule(hoursNextWeek) scheduleCont = Container(width=self.scheduleSize, height=self.scheduleSize, align=uiconst.TOPLEFT) VulnerabilitySchedulerWithReinforcement(parent=scheduleCont, canModify=False, schedule=nextWeekSchedule, frame=False) tooltipPanel.AddCell(cellObject=scheduleCont)
def ConstructOutputSection(self): self.CloseOutputSection() blue.pyos.synchro.Sleep(1000) self.CloseOutputSection() self.outputSection = Container(name='outputSection', parent=self.mainContainer, align=uiconst.TOTOP_PROP, height=0.5, padding=(5, 0, 5, 0)) self.outputHeader = Container(name='outputHeader', parent=self.outputSection, align=uiconst.TOTOP, height=50) Label(parent=self.outputHeader, text=GetByLabel( 'UI/Inflight/SpaceComponents/ItemTrader/DeliveredItems', itemCount=2), fontsize=25, align=uiconst.CENTER) Line(parent=self.outputHeader, align=uiconst.TOBOTTOM) self.outputListSection = ScrollContainer(name='outputListSection', parent=self.outputSection, align=uiconst.TOTOP, height=128) self.PopulateItemsToScroll(self.outputListSection, self.itemTrader.GetOutputItems())
def InsertBrowseControls(self, *args): self.sr.backBtn = Container(name='backBtn', parent=self.sr.monthTextCont, align=uiconst.TOPLEFT, pos=(0, 0, 16, 16)) icon = Sprite(parent=self.sr.backBtn, texturePath='res:/UI/Texture/Icons/1_16_13.png', pos=(0, 0, 16, 16), hint=localization.GetByLabel('/Carbon/UI/Common/Previous')) icon.OnClick = (self.ChangeMonth, -1) self.sr.fwdBtn = Container(name='fwdBtn', parent=self.sr.monthTextCont, align=uiconst.TOPRIGHT, pos=(0, 0, 16, 16)) icon = Sprite(parent=self.sr.fwdBtn, texturePath='res:/UI/Texture/Icons/1_16_14.png', pos=(0, 0, 16, 16), hint=localization.GetByLabel('/Carbon/UI/Common/Next')) icon.OnClick = (self.ChangeMonth, 1)
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.isSelected = False self.typeID = attributes.typeID self.invType = cfg.invtypes.Get(self.typeID) typeName = self.invType.name self.quantity = attributes.quantity self.stacksize = attributes.get('stacksize', None) self.itemState = attributes.get('itemState', None) singleton = attributes.get('singleton', 0) isBlueprint = cfg.invtypes.Get(self.typeID).categoryID == const.categoryBlueprint isCopy = isBlueprint and singleton == const.singletonBlueprintCopy self.stateIcon = None self.spriteCont = self.spriteCont = Container(name='spriteCont', parent=self, align=CENTER, width=ICON_SIZE, height=ICON_SIZE, state=uiconst.UI_PICKCHILDREN) self.icon = Icon(name=typeName, parent=self.spriteCont, width=ICON_SIZE, height=ICON_SIZE, align=CENTER, state=uiconst.UI_DISABLED, saturation=1.0, effectOpacity=0.0, spriteEffect=trinity.TR2_SFX_SOFTLIGHT) self.icon.LoadIconByTypeID(typeID=self.typeID, ignoreSize=True, isCopy=isCopy) self.hint = typeName self.techIcon = Sprite(name='techIcon', parent=self.spriteCont, width=16, height=16, idx=0, saturation=1.0, effectOpacity=0.0, spriteEffect=trinity.TR2_SFX_SOFTLIGHT) uix.GetTechLevelIcon(self.techIcon, 0, self.typeID) if self.itemState: resPath, stateColor = self.GetStateResPathAndColor(self.itemState) self.stateIcon = Sprite(name='stateIcon', parent=self.spriteCont, width=32, height=32, idx=0, left=-4, top=-4, align=uiconst.TOPRIGHT, texturePath=resPath, color=stateColor, state=uiconst.UI_DISABLED) self.entryHilite = Sprite(name='hilite', align=uiconst.TOALL, parent=self.spriteCont, texturePath='res:/UI/Texture/classes/InvItem/bgHover.png', blendMode=trinity.TR2_SBM_ADD, opacity=0.0, idx=0, state=uiconst.UI_DISABLED) self.entryHilite.hint = typeName self.quantityParent = Container(parent=self, idx=0, name='qtyCont', pos=(3, 38, 32, 11), align=uiconst.TOPRIGHT, bgColor=(0, 0, 0, 0.95), state=uiconst.UI_HIDDEN) self.qtyLabel = Label(parent=self.quantityParent, left=2, maxLines=1, fontsize=9) self._SetQtyText()
def DrawItem(self): iconCont = Container(parent=self.textCont, align=uiconst.TOLEFT, width=32, padding=4) self.iconInnerCont = Container(name='iconInnerCont', parent=iconCont, align=uiconst.CENTERLEFT, pos=(0, 0, 32, 32)) self.wheel = LoadingWheel(parent=self.iconInnerCont, pos=(0, 0, 48, 48), align=uiconst.CENTER, idx=0) self.wheel.display = False self.techIcon = Sprite(parent=self.iconInnerCont, pos=(0, 0, 16, 16), align=uiconst.TOPLEFT, state=uiconst.UI_NORMAL) self.icon = Icon(parent=self.iconInnerCont, typeID=self.typeID, state=uiconst.UI_DISABLED, ignoreSize=True, pos=(0, 0, 32, 32)) GetTechLevelIcon(self.techIcon, 1, self.typeID) itemName = GetByLabel('UI/Contracts/ContractsWindow/ShowInfoLink', showInfoName=self.itemName, info=('showinfo', self.typeID, self.item.itemID)) self.itemNameLabel = Label(text=itemName, parent=self.textCont, left=40, align=uiconst.CENTERLEFT, state=uiconst.UI_NORMAL, autoFadeSides=35, fontsize=12)
def ApplyAttributes(self, attributes): Window.ApplyAttributes(self, attributes) sm.RegisterNotify(self) self.SetTopparentHeight(0) mainCont = Container(name='mainCont', parent=self.sr.main, padding=const.defaultPadding) buttonCont = Container(name='buttonCont', parent=mainCont, align=uiconst.TOBOTTOM, height=26) scrollCont = Container(name='scrollCont', parent=mainCont) self.planetScroll = Scroll(name='planetsScroll', parent=scrollCont) self.planetScroll.multiSelect = False self.planetScroll.sr.id = 'planetscroll' self.planetScroll.OnSelectionChange = self.OnPlanetScrollSelectionChange self.planetClickID = None scrolllist, headers = self.GetPlanetScrollList() noCommandBuiltLabel = GetByLabel( 'UI/ScienceAndIndustry/ScienceAndIndustryWindow/NoCommandCenterBuilt' ) self.planetScroll.Load(contentList=scrolllist, headers=headers, noContentHint=noCommandBuiltLabel) viewPlanetLabel = GetByLabel( 'UI/ScienceAndIndustry/ScienceAndIndustryWindow/ViewPlanet') buttons = ButtonGroup(btns=[[viewPlanetLabel, self.ViewPlanet, ()]], parent=buttonCont, idx=0) viewPlanetLabel = GetByLabel( 'UI/ScienceAndIndustry/ScienceAndIndustryWindow/ViewPlanet') self.viewPlanetBtn = buttons.GetBtnByLabel(viewPlanetLabel) self.viewPlanetBtn.Disable()
def ApplyAttributes(self, attributes): SE_BaseClassCore.ApplyAttributes(self, attributes) left = Container(parent=self, align=uiconst.TOLEFT_PROP, width=0.5) right = Container(parent=self, align=uiconst.TOALL) self.label = Label(parent=left) self.value = Label(parent=right, autoUpdate=True) self.GetValue = None
def ApplyAttributes(self, attributes): Window.ApplyAttributes(self, attributes) self.oldCamID = None self.mainCont = Container(parent=self.sr.main, padding=5) Button(parent=self.mainCont, align=uiconst.TOTOP, label='Toggle Debug Camera', func=self.ToggleDebugCam, hint=BUTTONHINT) self.atLabel = Label(parent=self.mainCont, align=uiconst.TOTOP) stateCont = Container(parent=self.mainCont, align=uiconst.TOTOP, height=20, padTop=5) self.orbitLabel = StateCont(parent=stateCont, align=uiconst.TOLEFT, text='ORBIT', padRight=2) self.zoomLabel = StateCont(parent=stateCont, align=uiconst.TOLEFT, text='ZOOM', padRight=2) self.fovZoomLabel = StateCont(parent=stateCont, align=uiconst.TOLEFT, text='FOVZOOM', padRight=2) self.panLabel = StateCont(parent=stateCont, align=uiconst.TOLEFT, text='PAN', padRight=2) self.rotateLabel = StateCont(parent=stateCont, align=uiconst.TOLEFT, text='ROTATE', padRight=2) uthread.new(self.Update)
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) inMoveMode = attributes.get('inMoveMode', True) leftMouseCont = Container(parent=self, name='leftMouseCont', align=uiconst.TOLEFT_PROP, width=0.5) rightMouseCont = Container(parent=self, name='rightMouseCont', align=uiconst.TORIGHT_PROP, width=0.5) leftMouseSprite = Sprite(parent=leftMouseCont, name='leftMouseSprite', align=uiconst.CENTERRIGHT, texturePath=self.MOUSE_LEFT_PATH, pos=(0, 0, 32, 32)) rightMouseSprite = Sprite(parent=rightMouseCont, name='rightMouseSprite', align=uiconst.CENTERLEFT, texturePath=self.MOUSE_RIGHT_PATH, pos=(0, 0, 32, 32)) self.leftLabel = EveLabelMedium(parent=leftMouseCont, name='leftLabel', align=uiconst.CENTERRIGHT, pos=(32, -6, 0, 0)) self.rightLabel = EveLabelMedium(parent=rightMouseCont, name='rightLabel', align=uiconst.CENTERLEFT, pos=(32, -6, 0, 0)) self.SetMouseLabels(inMoveMode)
def ApplyAttributes(self, attributes): Transform.ApplyAttributes(self, attributes) self.tokenSize = attributes.get('tokenSize', self.default_tokenSize) self.closeCallback = attributes.get('closeCallback', None) self.textColor = attributes.get('textColor', redeemColors.TEXT_COLOR) self.padLeft = attributes.get('itemPadding', self.default_itemPadding) self.padRight = attributes.get('itemPadding', self.default_itemPadding) self.minimized = attributes.get('minimized', False) self.redeemTokenData = attributes.redeemTokenData self.isDragObject = attributes.dragEnabled self.typeID = self.redeemTokenData.typeID quantity = self.redeemTokenData.quantity portionSize = self.redeemTokenData.portionSize totalQuantity = quantity * portionSize self.desc = attributes.desc self.expireDateTime = self.redeemTokenData.expireDateTime self.width = self.tokenSize self.height = self.GetTokenHeight() self.itemCont = Container(parent=self, name='itemCont', align=uiconst.TOTOP, state=uiconst.UI_PICKCHILDREN, height=self.tokenSize, width=self.tokenSize, padTop=REDEEM_TOKEN_TOP_PADDING) self.iconCont = Container(parent=self.itemCont, name='iconCont', align=uiconst.TOTOP, state=uiconst.UI_DISABLED, width=self.tokenSize, height=self.tokenSize) if not self.minimized: self.CreateAdditionalInformation() self.highlightOverlay = uiprimitives.Sprite(name='hilite', align=uiconst.TOALL, state=uiconst.UI_DISABLED, parent=self.iconCont, texturePath='res:/UI/Texture/classes/InvItem/bgHover.png', blendMode=trinity.TR2_SBM_ADD, opacity=0.0, idx=0) uiprimitives.Sprite(bgParent=self.iconCont, name='background', texturePath='res:/UI/Texture/classes/InvItem/bgNormal.png') self.icon = uicontrols.Icon(parent=self.iconCont, name='icon', align=uiconst.CENTER, state=uiconst.UI_DISABLED, typeID=self.typeID, size=self.tokenSize) self.quantityContainer = Container(parent=self.iconCont, name='quantityContainer', idx=0, pos=(0, 53, 32, 11), align=uiconst.TOPRIGHT, state=uiconst.UI_DISABLED, bgColor=(0, 0, 0, 0.95)) self.quantityLabel = uicontrols.Label(parent=self.quantityContainer, left=2, maxLines=1, fontsize=9, color=self.textColor, text=totalQuantity) self.isNew = False self.tooltipPanelClassInfo = TooltipHeaderDescriptionWrapper(header=self.redeemTokenData.typeName, description=self.GenerateHintText()) self.scale = (0.0, 0.0)
def ApplyAttributes(self, attributes): Window.ApplyAttributes(self, attributes) mainArea = self.GetMainArea() mainArea.clipChildren = True infoContainer = Container(parent=mainArea, align=uiconst.TOLEFT_NOPUSH, width=260, padding=6) if not SLOT_SHOW_MOUSEOVER_INFO: self.activeInfo = ActiveAchievementInfo( parent=infoContainer, achievementGroupID=sm.GetService( 'achievementSvc').GetActiveAchievementGroupID()) self.legendInfo = AchievementTreeLegend(parent=mainArea, align=uiconst.BOTTOMRIGHT, left=10, top=10) treeClipper = Container(parent=mainArea, padding=4, clipChildren=True) self.achievementTree = AchievementTree(parent=treeClipper, align=uiconst.CENTER, left=110, top=-10) connections = set() for i, achievementGroup in enumerate(achievementGroups): column, row = achievementGroup.treePosition self.achievementTree.AddSlot(column, row, achievementGroup.groupID) for groupID1, groupID2 in connections: self.achievementTree.AddConnection(groupID1, groupID2) self.achievementTree.UpdateTreePositions() self.achievementTree.UpdateTreeState() sm.RegisterNotify(self)
def ApplyAttributes(self, attributes): uicontrols.Window.ApplyAttributes(self, attributes) self.SetTopparentHeight(64) self.SetWndIcon(self.default_iconNum) uicontrols.WndCaptionLabel(text='EVEModX Manager', parent=self.sr.topParent, align=uiconst.RELATIVE, subcaption='Version: ' + settings.VERSION) self.installedMods = Container(name='installedMods', parent=self.sr.main) self.modRepo = Container(name='modRepo', parent=self.sr.main) self.modScroll = ScrollContainer(name='modScroll', parent=self.installedMods, align=uiconst.TOALL, padding=const.defaultPadding, showUnderlay=True) self.tabs = uicontrols.TabGroup(name='tabs', parent=self.sr.main, tabs=[('Installed Mods', self.installedMods, self, 'installedMods'), ('Mod Repository', self.modRepo, self, 'modRepo')], idx=0) for mod_name, mod_obj in sorted( sm.GetService('EVEModXSvc').mods.iteritems()): ModEntry(parent=self.modScroll, data=mod_obj)
def _construct_progress_label(self): self.challenge_content_container = Container(name='challenge_content_container', parent=self, align=uiconst.ANCH_TOPLEFT, width=self.progress_frame_width, height=self.height, padLeft=self.padLeft) if self.show_expiration_timer: self._construct_expiration_timer() challenge_label_container = Container(name='challenge_label_container', parent=self.challenge_content_container, padLeft=self.progress_label_left, align=uiconst.TOLEFT, width=self.progress_frame_width - self.height) self.challenge_label = self.label_type_function(name='challenge_label', parent=challenge_label_container, align=uiconst.CENTERLEFT) self._update_counter()
def ConstructLayout(self): headerContainer = Container(parent=self, align=uiconst.TOTOP, height=28, padTop=4, padBottom=6) self.groupName = EveLabelLarge(parent=headerContainer, align=uiconst.CENTERLEFT, left=8) Frame(texturePath= 'res:/UI/Texture/classes/Achievements/pointRightHeaderFrame.png', cornerSize=16, offset=-14, parent=headerContainer, color=(1, 1, 1, 0.25), align=uiconst.TOALL) progressClipper = Container(parent=headerContainer, align=uiconst.TOALL, clipChildren=True, padRight=-POINTER_PADRIGHT) self.progress = Frame( texturePath= 'res:/UI/Texture/classes/Achievements/pointRightHeaderBackground.png', cornerSize=15, offset=-13, parent=progressClipper, color=(1, 1, 1, 0.25)) self.progress.padRight = 400 self.progress.opacity = 0.0 self.tasksContainer = ContainerAutoSize(parent=self, name='tasksContainer', align=uiconst.TOTOP, state=uiconst.UI_NORMAL)
def CreateWindow(self): self.capitalSystemInfo = sm.GetService('alliance').GetCapitalSystemInfo() self.systems = sm.RemoteSvc('stationSvc').GetSystemsForAlliance(session.allianceid) alliance = sm.GetService('alliance').GetAlliance() self.isExecDirector = self._IsDirectorInExecCorp(alliance.executorCorpID) infoCont = ContainerAutoSize(parent=self, align=uiconst.TOTOP, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, 0)) topCont = Container(parent=infoCont, height=42, align=uiconst.TOTOP) FillThemeColored(parent=topCont, colorType=uiconst.COLORTYPE_UIHEADER, opacity=0.15) texturePath = 'res:/ui/Texture/classes/Sov/capitalSystem.png' Sprite(name='capitalIcon', parent=topCont, texturePath=texturePath, width=32, height=32, align=uiconst.CENTERLEFT, left=4) EveLabelLarge(text=GetByLabel('UI/Sovereignty/AllianceCapital'), parent=topCont, align=uiconst.CENTERLEFT, left=42, top=-8) EveLabelSmall(text=GetByLabel('UI/Sovereignty/SelectCapitalSystemDescription'), parent=topCont, align=uiconst.CENTERLEFT, left=42, top=8) currentSystemCont = Container(parent=infoCont, height=24, align=uiconst.TOTOP) self.currentCapitalLabel = EveLabelMedium(text='', left=4, parent=currentSystemCont, align=uiconst.CENTERLEFT, state=uiconst.UI_NORMAL) self.capitalLabel = EveLabelMedium(text=GetByLabel('UI/Sovereignty/CurrentCapital'), left=22, parent=currentSystemCont, align=uiconst.CENTERRIGHT) self.capitalSprite = Sprite(name='capitalIcon', parent=currentSystemCont, texturePath='res:/ui/Texture/classes/Sov/CapitalStarSelection.png', width=16, height=16, align=uiconst.CENTERRIGHT, left=4) self.SetDisplayOfCapitalLabelAndIcon(False) self.futureSystemCont = Container(parent=infoCont, height=24, align=uiconst.TOTOP) self.futureSystemLabel = EveLabelMedium(text='', left=4, parent=self.futureSystemCont, align=uiconst.CENTERLEFT) self.futureSystemTime = EveLabelMedium(text='', left=4, parent=self.futureSystemCont, align=uiconst.CENTERRIGHT) self.removeBtn = ButtonIcon(texturePath='res:/UI/Texture/Icons/73_16_210.png', pos=(4, 0, 16, 16), align=uiconst.CENTERRIGHT, parent=self.futureSystemCont, idx=0, func=self.RemoveCapital, hint=GetByLabel('UI/Common/Buttons/Cancel')) self.removeBtn.display = False if self.isExecDirector: self.removeBtn.display = True self.futureSystemTime.left = 22 self.futureSystemCont.display = False self.claimedSystems = ClaimedSystemsDashboard(parent=self, padTop=const.defaultPadding) self.claimedSystems.CreateWindow() self.UpdateCapitalInfo()
def AddCQButton(self, parent): """ Creates the undock button at the bottom of the lobby """ scale = 1.0 self.cqCont = Container(name='cqCont', align=uiconst.TOLEFT_PROP, width=0.5, parent=parent, state=uiconst.UI_PICKCHILDREN, padding=3) width = 63 * scale height = 34 * scale self.cqSpriteCont = Container(name='cq', align=uiconst.CENTERTOP, width=width, height=height, top=3, parent=self.cqCont, state=uiconst.UI_NORMAL) self.cqSprites = [] spacing = 30 * scale for i in xrange(3): s = Sprite(parent=self.cqSpriteCont, texturePath='res:/UI/Texture/classes/Lobby/{0}.png'.format(i + 1), align=uiconst.CENTERTOP, width=-width, height=height, left=0, state=uiconst.UI_DISABLED) s.color = COLOR_CQ self.cqSprites.insert(0, s) self.cqLabel = EveLabelMedium(parent=self.cqCont, align=uiconst.CENTERTOP, top=8 + height, width=100) self.UpdateCQButton() if gfxsettings.Get(gfxsettings.MISC_LOAD_STATION_ENV): self.cqSpriteCont.OnClick = self.OnCQClicked self.cqSpriteCont.OnMouseEnter = self.OnCQMouseEnter self.cqSpriteCont.OnMouseExit = self.OnCQMouseExit else: self.cqSpriteCont.hint = localization.GetByLabel('UI/Station/CannotEnterCaptainsQuarters') for s in self.cqSprites: s.opacity = 0.2
def AddIconCont(self, responsePath = None, tagIcon = None, *args): self.sr.tagCont = Container(name='statusCont', parent=self, align=uiconst.TOPRIGHT, pos=(0, 2, 14, 14), state=uiconst.UI_DISABLED, idx=0) self.sr.tagCont.autoPos = uiconst.AUTOPOSYCENTER self.sr.responseCont = Container(name='responseCont', parent=self, align=uiconst.TOPLEFT, pos=(1, 0, 10, 14), state=uiconst.UI_DISABLED) if tagIcon is not None: self.SetTag(tagIcon) self.SetStatus(self.sr.responseCont, responsePath)
def AddRow(self, idx): labelPath, what, iconNo, labelHintPath = rowsInfo[idx] rowName = 'row_%s' % what row = Container(name='row_%s' % rowName, parent=self, align=uiconst.TOTOP, height=32) mainIcon = Icon(icon=iconNo, parent=row, pos=(0, 0, 32, 32), ignoreSize=True) mainIcon.hint = GetByLabel(labelPath) statusLabel = Label(text='', parent=row, left=mainIcon.left + mainIcon.width, state=uiconst.UI_NORMAL, align=uiconst.CENTERLEFT, width=62) statusLabel.hint = GetByLabel(labelHintPath) self.statsLabelsByIdentifier[what] = statusLabel dmgContainer = Container(parent=row, name='dmgContainer', left=self.col1Width) gaugeCont = DamageGaugeContainerFitting(parent=dmgContainer) self.statsContsByIdentifier[what] = gaugeCont
def CreateHeaderLayout(self): contentContainer = Container(parent=self.headerContainer, align=uiconst.TOTOP, height=CAPTION_HEIGHT, top=CAPTION_OFFSET) LogoHomeButton(parent=self.headerContainer, align=uiconst.TOPLEFT, onClick=self.OnClickHomeButton) ExitButton( parent=self.headerContainer, align=uiconst.TOPRIGHT, onClick=uicore.cmd.ToggleAurumStore, top=4, left=10, hint=localization.GetByLabel('UI/VirtualGoodsStore/ExitStore')) self.aurButton = HeaderBuyAurButton(parent=contentContainer, align=uiconst.TORIGHT, onClick=self._BuyAurum, padding=(4, 0, 4, 0), left=6) cont = Container(name='AurContainer', parent=contentContainer, align=uiconst.TORIGHT, width=200, padRight=8) self.aurLabel = AurLabelHeader(parent=cont, align=uiconst.CENTERRIGHT, height=32, amount=100, padTop=1)
def ApplyAttributes(self, attributes): Window.ApplyAttributes(self, attributes) self.SetWndIcon(None) self.SetCaption('Window manager') self.SetTopparentHeight(10) self.SetMinSize([360, 220]) options = [] for wndCls in Window.__subclasses__(): options.append((wndCls.__name__, wndCls)) options.sort() topCont = Container(name='params', parent=self.sr.main, align=uiconst.TOTOP, pad=(5, 5, 5, 5), pos=(0, 10, 0, 30)) self.mainCont = Container(name='params', parent=self.sr.main, align=uiconst.TOTOP, pos=(0, 0, 0, 50), padding=(5, 15, 5, 5)) self.extrasCont = Container(name='params', parent=self.sr.main, align=uiconst.TOALL, padding=(5, 15, 5, 5)) self.combo = 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 = SinglelineEdit(name='', label='attributes', parent=topCont, setvalue='', align=uiconst.TOPLEFT, left=165, width=100) Button(parent=topCont, label='Load', align=uiconst.RELATIVE, func=self.OpenWindow, pos=(300, 0, 0, 0)) self.filenameEdit = SinglelineEdit(name='', label='Location', parent=self.mainCont, setvalue='', align=uiconst.TOTOP, top=15, readonly=True) Label(text='RELOAD', parent=self.extrasCont, top=10, state=uiconst.UI_NORMAL) Line(parent=self.extrasCont, align=uiconst.TOTOP) buttonCont = Container(name='buttonCont', parent=self.extrasCont, align=uiconst.TOTOP, pos=(0, 30, 0, 30)) Button(parent=buttonCont, label='ShipUI', align=uiconst.TOLEFT, func=self.ReloadShipUI) Button(parent=buttonCont, label='NEOCOM', align=uiconst.TOLEFT, func=self.ReloadNeocom, padLeft=1) Button(parent=buttonCont, label='Info Panels', align=uiconst.TOLEFT, func=self.ReloadInfoPanels, padLeft=1) Button(parent=buttonCont, label='Lobby', align=uiconst.TOLEFT, func=self.ReloadLobby, padLeft=1) Button(parent=buttonCont, label='Overview', align=uiconst.TOLEFT, func=self.ReloadOverview, padLeft=1) Button(parent=buttonCont, label='Mapbrowser', align=uiconst.TOLEFT, func=self.ReloadMapBrowser, padLeft=1) self.UpdateInfo(self.combo.GetKey(), self.combo.GetValue())
def _ConstructUI(self): self.stackFaderContainer = Container(name='notificationPopupContainer', parent=self.layer) self._ConstructStackFader() self._ConstructBadge() self.notificationContainer = Transform(name='NotificationContainer', parent=self.layer, align=uiconst.TOPLEFT, width=self.widgetWidth, height=self.widgetHeight, clipChildren=True) self.subNotificationContainer = Transform( name='SubNotificationContainer', parent=self.notificationContainer, align=uiconst.TOALL, clipChildren=True) self.actualUnderlay = WindowUnderlay( bgParent=self.notificationContainer) self.topContainer = Container(name='topContainer', parent=self.subNotificationContainer, align=uiconst.TOALL, padding=(0, 0, 0, 0)) self.AutoPositionContainer() self._ConstructNotificationArea() if self.enablePositionDebug: self._ConstructGuideLines() self.AutoPositionContainer() self.HideFrame()
def CreateWindow(self): self.primeTimeInfo = None topCont = Container(parent=self, height=24, align=uiconst.TOTOP, padding=const.defaultPadding) FillThemeColored(parent=topCont, colorType=uiconst.COLORTYPE_UIHEADER, opacity=0.15) EveLabelSmall( parent=topCont, text=GetByLabel('UI/Sovereignty/DefaultVulnerabilityTimeLabel'), align=uiconst.CENTERLEFT, left=const.defaultPadding) menuCont = Container(parent=topCont, align=uiconst.TORIGHT, width=18) self.primeTimeMenu = UtilMenu(parent=menuCont, align=uiconst.CENTERRIGHT, menuAlign=uiconst.TOPRIGHT, GetUtilMenu=self.PrimeTimeMenu) menuCont.display = False execCorpID = sm.GetService('alliance').GetAlliance( session.allianceid).executorCorpID timeTextLeft = const.defaultPadding if self._IsDirectorInExecCorp(execCorpID): timeTextLeft = 18 menuCont.display = True self.timeLabel = EveLabelSmall(parent=topCont, align=uiconst.CENTERRIGHT, left=timeTextLeft) uthread.new(self.UpdatePrimeInfo) self.sovDashBoard = SovDashboard(parent=self) self.sovDashBoard.CreateWindow()
def Startup(self, *args): self.Flush() self.mainCont = Container(parent=self, align=uiconst.TOTOP, height=30) leftCont = Container(parent=self.mainCont, align=uiconst.TOLEFT, width=50) self.icon = Container(parent=leftCont, align=uiconst.TOPLEFT, pos=(3, 3, 32, 32)) self.corpNameCont = Container(parent=self.mainCont, align=uiconst.TOTOP, height=17) label = GetByLabel('UI/Station/Lobby/CorpName') self.corpNameLabel = EveLabelSmall(text=label, parent=self.corpNameCont, left=5, top=2, state=uiconst.UI_DISABLED) self.corpNameText = EveLabelMedium(text='', parent=self.corpNameCont, left=5, state=uiconst.UI_NORMAL) LineThemeColored(parent=self, align=uiconst.TOBOTTOM) self.buttonCnt = Container(parent=self, align=uiconst.TOTOP, height=25, state=uiconst.UI_PICKCHILDREN) self.buttonCnt.display = False self.infoicon = InfoIcon(left=32, top=3, parent=leftCont, idx=0)
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) sm.RegisterNotify(self) self.jobData = attributes.jobData self.videoThread = None self.iconCont = Container(name='iconCont', parent=self, align=CENTER, state=uiconst.UI_NORMAL, width=64, height=64) self.errorFrame = ErrorFrame(parent=self, align=uiconst.CENTER, pos=(0, 0, 64, 64), state=uiconst.UI_HIDDEN) self.qtyLabel = EveLabelLargeBold(parent=self, align=CENTER, top=42) FrameThemeColored(name='bgVignette', parent=self, texturePath='res:/UI/Texture/Classes/Industry/Output/bgVignette.png', cornerSize=30) self.videoCont = Container(name='videoCont', parent=self, align=uiconst.CENTER, width=324, height=199) self.previewContFill = FillThemeColored(parent=self) self.previewCont = PreviewContainer(parent=self, align=uiconst.TOALL, state=uiconst.UI_HIDDEN) self.leftProbabilityGradient = GradientSprite(name='leftProbabilityGradient', parent=self, align=uiconst.CENTERLEFT, state=uiconst.UI_HIDDEN, pos=(0, 0, 160, 64), rgbData=((0, (1.0, 1.0, 1.0)),), alphaData=((0.0, 0.5), (1.0, 0.0))) self.rightProbabilityGradient = GradientSprite(name='rightProbabilityGradient', parent=self, align=uiconst.CENTERRIGHT, state=uiconst.UI_HIDDEN, pos=(0, 0, 160, 64), rgbData=((0, (1.0, 1.0, 1.0)),), alphaData=((0.0, 0.0), (1.0, 0.5))) self.previewCont.navigation.LoadTooltipPanel = self.LoadIconContTooltipPanel self.previewCont.navigation.GetTooltipDelay = self.GetIconContTooltipDelay self.previewCont.navigation.GetMenu = self.GetMenu self.iconCont.LoadTooltipPanel = self.LoadIconContTooltipPanel self.iconCont.GetTooltipDelay = self.GetIconContTooltipDelay self.iconCont.OnMouseEnter = self.OnIconContMouseEnter self.iconCont.OnMouseExit = self.OnIconContMouseExit self.iconCont.OnClick = self.OnIconContClick self.iconCont.GetMenu = self.GetMenu self.iconCont.GetDragData = self.GetIconContDragData self.iconCont.isDragObject = True self.techIcon = Sprite(name='techIcon', parent=self.iconCont, width=16, height=16) self.icon = Icon(parent=self.iconCont, align=CENTER, state=uiconst.UI_DISABLED) self.bgCont = Container(name='bgCont', parent=self, align=uiconst.CENTER, width=201, height=192) self.bg = Sprite(bgParent=self.bgCont, texturePath='res:/UI/Texture/Classes/Industry/Output/itemBg.png') self.itemPattern = Sprite(bgParent=self.bgCont, texturePath='res:/UI/Texture/Classes/Industry/Output/itemBgColor.png') self.UpdateState() self.AnimEntry()
def ApplyAttributes(self, attributes): super(RenderJobProfiler, self).ApplyAttributes(attributes) self.SetCaption('Render Job Profiler') self._renderJob = None self.SetTopparentHeight(0) parent = self.GetMainArea() parent.SetAlign(uiconst.TOALL) parent.padding = 5 top = Container(parent=parent, align=uiconst.TOTOP, height=20) Label(text='Render Job', parent=top, align=uiconst.TOLEFT, padding=4) combo = Combo(parent=top, options=[(rj.name, rj) for rj in trinity.renderJobs.recurring], callback=self._OnRenderJob, align=uiconst.TOALL) bottom = Container(parent=parent, align=uiconst.TOBOTTOM, height=20, padding=2) Button(parent=bottom, align=uiconst.CENTER, label='Copy', func=self._Copy, args=()) self._scroll = Scroll(parent=parent, align=uiconst.TOALL, top=4) self._OnRenderJob(None, None, combo.selectedValue) uthread2.StartTasklet(self._UpdateTiming)
def ApplyAttributes(self, attributes): super(PurchaseResultPanel, self).ApplyAttributes(attributes) self.audioEventName = attributes.audioEventName cont = Container(parent=self, align=uiconst.TOTOP, height=72, padTop=4) self.iconForegroundTransform = Transform(parent=cont, align=uiconst.CENTERTOP, width=72, height=78, scalingCenter=(0.5, 0.5)) self.iconForeground = Sprite( parent=self.iconForegroundTransform, align=uiconst.CENTER, texturePath=attributes.iconForegroundTexturePath, width=72, height=64, opacity=0) self.iconBackgroundTransform = Transform(parent=cont, align=uiconst.CENTERTOP, width=72, height=78, scalingCenter=(0.5, 0.5)) self.iconBackground = Sprite( parent=self.iconBackgroundTransform, align=uiconst.CENTER, texturePath=attributes.iconBackgroundTexturePath, width=72, height=64, opacity=0) captionCont = Container(parent=self, align=uiconst.TOTOP, height=40, padding=(TEXT_PADDING, 4, TEXT_PADDING, 0)) VgsLabelLarge(parent=captionCont, align=uiconst.CENTER, text=attributes.textTitle)