def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) innerContainerPadding = self.outerFrameWidth + self.distanceFromOuterToInnerFrame_side innerContainer = Container(parent=self, name='innerContainer', padding=innerContainerPadding, bgColor=(0, 0, 0, 0.5)) frameCornerSize = 2 + self.innerFrameWidth glowFrameTexturePath = 'res:/UI/Texture/classes/CharacterSelection/glowDotFrame.png' self.normalGlowFrame = Frame(parent=innerContainer, name='glowFrame', color=FRAME_GLOW_ACTIVE, frameConst=(glowFrameTexturePath, 5, -2, 0), padding=0) self.normalFrame = FrameThemeColored(parent=innerContainer, name='normalFrame', padding=0, frameConst=('ui_1_16_161', frameCornerSize, -2, 0)) self.normalFrame.opacity = 0.0 self.selectionFrameGlow = Frame(parent=self, name='selectionFrame', color=FRAME_GLOW_ACTIVE, texturePath='res:/UI/Texture/classes/CharacterSelection/selectFrame.png', cornerSize=22) self.selectionFrameGlow.opacity = 0 frameCornerSize = 2 + self.outerFrameWidth self.selectionFrame = Frame(parent=self, name='selectionFrame', color=OUTER_FRAME, frameConst=('ui_1_16_161', frameCornerSize, -2, 0)) self.selectionFrame.opacity = 0 contentPadding = self.distanceFromInnerFrameToContent_sides + self.innerFrameWidth contentParent = Container(parent=innerContainer, name='contentParent', padding=contentPadding, align=uiconst.TOALL) self.contentTopPush = Container(name='contentTopPush', parent=contentParent, align=uiconst.TOTOP_PROP, height=0.55) self.contentBottomPush = Container(name='contentBottomPush', parent=contentParent, align=uiconst.TOBOTTOM_PROP, height=0.55) self.content = Container(parent=contentParent, name='content', align=uiconst.TOALL, pos=(0, 0, 0, 0), clipChildren=True, state=uiconst.UI_PICKCHILDREN, opacity=0.0) self.dotFrameTopPush = Container(name='dotFrameTopPush', parent=innerContainer, align=uiconst.TOTOP_PROP, height=0.5) self.dotFrameBottomPush = Container(name='dotFrameBottomPush', parent=innerContainer, align=uiconst.TOBOTTOM_PROP, height=0.5) self.dotFrame = FrameThemeColored(parent=innerContainer, name='dotFrame', color=FRAME_GLOW_ACTIVE, texturePath='res:/UI/Texture/classes/MapView/dotFrame.png', cornerSize=21, offset=-1) self.dotFrame.opacity = 0.0
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.sr.underlay = None self.sr.frame = None self.sr.splitareacontent = None self.sr.maincontainer = Container(parent=self, name='__maincontainer', align=uiconst.TOALL, state=uiconst.UI_PICKCHILDREN) self.Flush()
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes=attributes) self.isDeveloperMode = attributes.get('developerMode', True) self.basePadLeft = 5 self.dev_simpleHistoryDisplayEnabled = False self.dev_historySettingsEnabled = True self.dev_exportNotificationHistoryEnabled = False self.dev_clearNotificationHistoryEnabled = False self.dev_soundSettingsEnabled = True parentwidth = attributes.get('parentwidth') self.lastVerticalBarEnabledStatus = False self.entryCache = {} self.leftContainer = NotificationSettingList( name='LeftContainer', align=uiconst.TOLEFT, width=parentwidth / 2, padding=4, parent=self, developerMode=self.isDeveloperMode) self.rightContainer = Container(name='RightContainer', align=uiconst.TOALL, padding=(0, 4, 4, 4), parent=self) BumpedUnderlay(name='leftUnderlay', bgParent=self.leftContainer) BumpedUnderlay(name='rightUnderlay', bgParent=self.rightContainer) self.notificationSettingHandler = NotificationSettingHandler() self.notificationSettingData = self.notificationSettingHandler.LoadSettings( ) self._SetupRightSide() self.leftContainer.PopulateScroll()
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.eventInfo = getattr(attributes, 'eventInfo', None) self.response = getattr(attributes, 'response', None) if self.eventInfo is not None: tagIcon = attributes.get('tagIcon', None) myResponse = attributes.get('response', None) time = self.eventInfo.eventTimeStamp title = self.eventInfo.eventTitle if settings.user.ui.Get('calendar_showTimestamp', 1): if getattr(self.eventInfo, 'importance', None) > 0: text = localization.GetByLabel('/Carbon/UI/Calendar/EventTitleWithTimeImportant', timeStamp=time, eventTitle=title) else: text = localization.GetByLabel('/Carbon/UI/Calendar/EventTitleWithTime', timeStamp=time, eventTitle=title) elif getattr(self.eventInfo, 'importance', None) > 0: text = localization.GetByLabel('/Carbon/UI/Calendar/EventTitleImportant', eventTitle=title) else: text = localization.GetByLabel('/Carbon/UI/Calendar/EventTitle', eventTitle=title) hint = sm.GetService('calendar').GetEventHint(self.eventInfo, myResponse) responseIconPath = attributes.get('responseIconPath', None) else: text = '' tagIcon = None responseIconPath = None onDblClick = getattr(attributes, 'onDblClick', None) if onDblClick is not None: self.OnDblClick = onDblClick self.Prepare_(text, tagIcon, responseIconPath, hint)
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) sm.RegisterNotify(self) self.isInFocus = attributes.Get('isInFocus', self.default_isInFocus) showFill = attributes.get('showFill', self.default_showFill) self.isWindowActive = True self.isCameraDragging = False self.edgeGlow = StretchSpriteVerticalThemeColored( name='edgeGlow', bgParent=self, texturePath='res:/UI/Texture/shared/buttonEdgeGlowFrameBottom.png', colorType=uiconst.COLORTYPE_UIHILIGHTGLOW, blendMode=trinity.TR2_SBM_ADD, opacity=0.1, topEdgeSize=2, bottomEdgeSize=2) self.frame = FrameThemeColored( bgParent=self, colorType=uiconst.COLORTYPE_UIHILIGHTGLOW, texturePath='res:/UI/Texture/Shared/underlayBumped.png', cornerSize=6) if showFill: FillThemeColored(name='hoverFill', bgParent=self, colorType=uiconst.COLORTYPE_UIHILIGHT, opacity=0.2) self.fillUnderlay = FillThemeColored( bgParent=self, colorType=uiconst.COLORTYPE_UIBASECONTRAST) self.UpdateIsActive() self.UpdateState(animate=False)
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.textLabels = [] self.grid = LayoutGrid(parent=self, columns=3, margin=3, OnGridSizeChanged=self.OnGridSizeChanged)
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self._value = attributes.value self._propertyName = attributes.propertyName self._propertyIndex = attributes.propertyIndex self._uiObject = attributes.uiObject self._editType = type(self._value) self._label = Label(parent=self, state=uiconst.UI_DISABLED, align=uiconst.CENTERLEFT, color=(1.0, 1.0, 1.0, 0.75), text=str(self._value)) if self._propertyName in COMBOPROPERTIES: self._label.text = COMBOPROPERTIES[self._propertyName].get( self._value, 'Unknown value!') self.expandOnLeft = True self.GetMenu = self.GetComboOptions elif self._editType == float: self.hint = 'MouseDown and Drag to change value<br>ALT for 1/100, ALT-SHIFT for 1/1000' if -1 <= self._value <= 1: self._label.text = '%.3f' % self._value elif self._editType == int: self.hint = 'MouseDown and Drag to change value' elif self._editType == type: try: text = repr(self._value).replace("<class '", '').replace("'>", '') self._label.text = text print 'text', type(self._value), text except: pass self.UpdateSize()
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.vulnerableHoursInt = attributes.vulnerableHours isSameSchedule = attributes.get('isSameSchedule', True) today = datetime.datetime.today().weekday() blocks = self.GetBlocks() for eachDay, eachBlock in blocks: toTop = eachBlock * self.BLOCK_HEIGHT left = self.GetLeftForDay(eachDay) Fill(parent=self, pos=(left, toTop, self.DAY_WIDTH, self.BLOCK_HEIGHT - 1), align=uiconst.TOPLEFT, color=(1, 1, 0, 0.75)) for i in xrange(7): if i == today: color = self.TODAY_COLOR else: color = self.DAY_COLOR left = self.GetLeftForDay(dayNum=i) Fill(parent=self, pos=(left, 0, self.DAY_WIDTH, 0), align=uiconst.TOLEFT_NOPUSH, color=color) if not isSameSchedule: Frame(bgParent=self, color=(1, 0, 0, 0.2), padding=-4) Fill(bgParent=self, color=(1, 0, 0, 0.1), padding=-4)
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) if self.default_fontsize is None: self.default_fontsize = fontConst.DEFAULT_FONTSIZE self.isTabStop = 1 self.resetTop = None self.blinking = 0 self.disabled = False for each in ('btn_modalresult', 'btn_default', 'btn_cancel'): if each in attributes: attr = attributes.get(each, None) setattr(self, each, attr) self.fixedwidth = attributes.get('fixedwidth', self.default_fixedwidth) self.fixedheight = attributes.get('fixedheight', self.default_fixedheight) self.func = attributes.get('func', self.default_func) self.args = attributes.get('args', self.default_args) self.mouseupfunc = attributes.get('mouseupfunc', self.default_mouseupfunc) self.mousedownfunc = attributes.get('mousedownfunc', self.default_mousedownfunc) self.fontStyle = attributes.get('fontStyle', self.default_fontStyle) self.fontFamily = attributes.get('fontFamily', self.default_fontFamily) self.fontPath = attributes.get('fontPath', self.default_fontPath) self.fontsize = attributes.get('fontsize', self.default_fontsize) self.Prepare_() if self.sr.label: if attributes.fontFamily: self.sr.label.fontFamily = attributes.fontFamily if attributes.fontsize: self.sr.label.fontsize = attributes.fontsize label = attributes.get('label', self.default_label) if hasattr(self, 'SetLabel_'): self.SetLabel_(label)
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 ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.groupID = attributes.groupID self.groupName = attributes.groupName Fill(bgParent=self, color=(0.0, 0.0, 0.0, 0.5)) leftCont = Container(parent=self, align=uiconst.TOALL) self.headerText = EveLabelMedium(text=self.groupName, parent=leftCont, left=2, maxLines=1, align=uiconst.CENTERLEFT, bold=True, padLeft=4)
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) sm.RegisterNotify(self) self.callback = attributes.callback self.isInitialized = False self.jobData = None self.solarsystemIDbyFacilityID = {}
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self._groupName = None self._checked = False self.isTabStop = 1 self.sr.label = None self.sr.active = None self.sr.diode = None self.cursor = 1 self.wrapLabel = attributes.get('wrapLabel', self.default_wrapLabel) self.fontStyle = attributes.get('fontStyle', self.default_fontStyle) self.fontFamily = attributes.get('fontFamily', self.default_fontFamily) self.fontPath = attributes.get('fontPath', self.default_fontPath) self.fontsize = attributes.get('fontsize', self.default_fontsize) self.checkedTexture = attributes.get('checkedTexture', self.default_checkedTexture) self.Prepare_() self.data = { 'config': attributes.get('configName', self.default_configName), 'value': attributes.get('retval', self.default_retval), 'prefstype': attributes.get('prefstype', self.default_prefstype) } if self.data['config'] is not None: self.name = self.data['config'] self.OnChange = attributes.get('callback', self.default_callback) self.SetGroup(attributes.get('groupname', self.default_groupname)) self.SetChecked(attributes.get('checked', self.default_checked), 0) self.SetLabelText(attributes.get('text', self.default_text))
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) pushContent = attributes.pushContent or self.pushContent showUnderlay = attributes.Get('showUnderlay', self.default_showUnderlay) self.scrollbarsDisabled = False self.scrollToVerticalPending = None self.scrollToHorizontalPending = None self.noContentHint = None self.verticalScrollBar = ScrollBar( parent=self, align=uiconst.TORIGHT if pushContent else uiconst.TORIGHT_NOPUSH) self.verticalScrollBar.OnScrolled = self._OnVerticalScrollBar self.horizontalScrollBar = ScrollBar( parent=self, align=uiconst.TOBOTTOM if pushContent else uiconst.TOBOTTOM_NOPUSH) self.horizontalScrollBar.OnScrolled = self._OnHorizontalScrollBar self.clipCont = Container(name='clipCont', parent=self, clipChildren=True) self.mainCont = ContainerAutoSize(name='mainCont', parent=self.clipCont, state=uiconst.UI_NORMAL) self.mainCont._OnSizeChange_NoBlock = self._OnMainContSizeChange self.children.insert = self._InsertChild self.children.append = self._AppendChild self.children.remove = self._RemoveChild self._mouseHoverCookie = uicore.uilib.RegisterForTriuiEvents( uiconst.UI_MOUSEHOVER, self.OnGlobalMouseHover) if showUnderlay: self.underlay = BumpedUnderlay(bgParent=self) else: self.underlay = None
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.tagId = attributes.tagId self.label = VgsLabelSubCategories(text=attributes.label, parent=self, align=uiconst.CENTER, state=uiconst.UI_DISABLED, color=TAG_TEXT_COLOR) VgsLabelSubCategories(text=attributes.label, parent=self, align=uiconst.CENTER, state=uiconst.UI_DISABLED, color=TAG_TEXT_OFF_COLOR) self.width = self.label.actualTextWidth + 2 * TAG_TEXT_PADDING self.onClick = attributes.onClick
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.jobData = attributes.jobData self.oldJobData = None self.pattern = Frame( parent=self, texturePath= 'res:/UI/Texture/Classes/Industry/Output/boxPattern.png', align=TOALL, state=UI_DISABLED, opacity=0.0, cornerSize=5) FrameThemeColored(parent=self, state=UI_DISABLED, align=TOALL, opacity=0.3) FillThemeColored(bgParent=self, opacity=0.5) self.contentCont = Container(name='contentCont', parent=self) self.errorFrame = ErrorFrame(bgParent=self, padding=1) self.openInventoryBtn = ButtonIcon( name='openInventoryBtn ', parent=self, align=uiconst.TOPRIGHT, pos=(1, 1, 21, 21), iconSize=16, texturePath='res:/UI/Texture/Vgs/Search_icon.png', func=self.OnOpenInventoryBtn) self.UpdateState() self.AnimEntry()
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): Container.ApplyAttributes(self, attributes) sm.RegisterNotify(self) self.node = attributes.node if self.node.IsRestricted(): self.bgPattern = Sprite( bgParent=self, aling=uiconst.TOALL, state=uiconst.UI_DISABLED, texturePath= 'res:/UI/Texture/classes/ShipTree/groups/hatchPattern.png', textureSecondaryPath= 'res:/UI/Texture/classes/ShipTree/groups/bgVignette.png', spriteEffect=trinity.TR2_SFX_MODULATE, tileX=True, tileY=True, color=(0.965, 0.467, 0.157, 0.4)) self.bgFrame = Frame( name='bgFrame', bgParent=self, texturePath= 'res:/UI/Texture/Classes/ShipTree/Groups/groupIconFrame.png') self.bgFill = Fill(name='bgFill', bgParent=self, color=shipTreeConst.COLOR_BG) self.bgBlinkFill = None self.icon = Sprite( parent=self, align=uiconst.CENTER, state=uiconst.UI_DISABLED, texturePath=cfg.fsdInfoBubbleGroups[self.node.shipGroupID].icon, color=shipTreeConst.COLOR_HILIGHT, width=32, height=32)
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.Hide() self.expiration_date = attributes.expiration_date self.expiration_timer_thread = None self._construct_expiration_timer() self._show_expiration_timer()
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.texturePath = attributes.Get('texturePath', self.default_texturePath) self.color = attributes.Get('color', None) self.rotation = attributes.Get('rotation', self.default_rotation) self.iconOpacity = attributes.Get('iconOpacity', self.default_iconOpacity) self.gradientStrength = attributes.get('gradientStrength', self.default_gradientStrength) self.color = attributes.get('color', self.default_color) self._glowAmount = 0.0 self.spriteEffect = None self.glowExpand = None self.icon = SpriteThemeColored( bgParent=self, name='icon', state=uiconst.UI_DISABLED, align=uiconst.TOALL, blendMode=trinity.TR2_SBM_ADD, opacity=self.iconOpacity, colorType=uiconst.COLORTYPE_UIHILIGHTGLOW, color=self.color, texturePath=self.texturePath, rotation=self.rotation) self.glowIcon = None self.bgGradient = None
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.controller = attributes.controller self.lastStructure = None self.lastArmor = None self.lastShield = None self.structureGauge = ShipHudSpriteGauge( parent=self, state=uiconst.UI_DISABLED, texturePath='res:/UI/Texture/classes/ShipUI/gauge3.png', spriteEffect=trinity.TR2_SFX_MODULATE, pickRadius=54, name='structureGauge') self.armorGauge = ShipHudSpriteGauge( parent=self, state=uiconst.UI_DISABLED, texturePath='res:/UI/Texture/classes/ShipUI/gauge2.png', spriteEffect=trinity.TR2_SFX_MODULATE, pickRadius=64, name='armorGauge') self.shieldGauge = ShipHudSpriteGauge( parent=self, texturePath='res:/UI/Texture/classes/ShipUI/gauge1.png', spriteEffect=trinity.TR2_SFX_MODULATE, pickRadius=74, name='shieldGauge') self.shieldGauge.LoadTooltipPanel = self.LoadDamageTooltip
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self._inited = 0 self._iconOnly = False self.leftMargin = attributes.get('leftMargin', self.default_leftMargin) self.rightMargin = attributes.get('rightMargin', self.default_rightMargin) self.minTabsize = attributes.get('minTabsize', self.default_minTabsize) self.labelPadding = attributes.get('labelPadding', self.default_labelPadding) self.callback = attributes.get('callback', self.default_callback) self.sr.tabsmenu = None self.sr.tabs = [] self.sr.mytabs = [] self._resizing = 0 self.totalTabWidth = 0 self._settingsID = None self.sr.linkedrows = [] tabs = attributes.tabs groupID = attributes.get('groupID', self.default_groupID) autoselecttab = attributes.get('autoselecttab', True) UIIDPrefix = attributes.UIIDPrefix silently = attributes.get('silently', False) if tabs: self.Startup(tabs, groupID=groupID, autoselecttab=autoselecttab, UIIDPrefix=UIIDPrefix, silently=silently) sm.RegisterNotify(self)
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) sm.RegisterNotify(self) self.isCameraDragging = False self.frame = FrameThemeColored( name='bgFrame', colorType=uiconst.COLORTYPE_UIHILIGHTGLOW, bgParent=self, texturePath='res:/UI/Texture/Shared/windowFrame.png', cornerSize=10, fillCenter=False, opacity=0.5) FrameThemeColored(bgParent=self, colorType=uiconst.COLORTYPE_UIHILIGHTGLOW, opacity=0.1) self.outerGlow = FrameThemeColored( name='outerGlow', bgParent=self, colorType=uiconst.COLORTYPE_UIHILIGHT, texturePath='res:/UI/Texture/Shared/boxGlow.png', cornerSize=5, offset=-2, opacity=0.0) self.blurredUnderlay = BlurredSceneUnderlay(bgParent=self, effectOpacity=0.5, saturation=0.5)
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) endTime = attributes.endTime iconPath = attributes.iconPath addButton = attributes.get('addButton', False) self.callback = attributes.get('callback', None) hintMessage = attributes.get('hintMessage', None) if hintMessage: self.hint = localization.GetByLabel(hintMessage, endTime=endTime) self.highlight = uiprimitives.Fill(bgParent=self, color=(0.8, 0.8, 0.8, 0.2)) self.highlight.display = False icon = uiprimitives.Sprite(parent=self, pos=(0, 0, 32, 32), align=uiconst.CENTERLEFT, texturePath=iconPath, state=uiconst.UI_DISABLED) now = blue.os.GetWallclockTime() timeLeft = max(0L, endTime - now) timeLeftText = localization.formatters.FormatTimeIntervalWritten( long(timeLeft), showFrom='day', showTo='day') self.label = uicontrols.EveLabelLarge(parent=self, pos=(8, 0, 0, 0), align=uiconst.CENTERRIGHT, text=timeLeftText, state=uiconst.UI_DISABLED) if timeLeft < csUtil.WARNING_TIME: self.label.SetRGB(1, 0, 0, 1) self.width = icon.width + self.label.textwidth + self.label.left + 4 if self.callback: self.OnClick = self.callback if addButton: btnText = attributes.get('btnText', '') self.AddButton(btnText=btnText)
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.fixedColor = attributes.Get('color', self.default_fixedColor) self.isSelected = attributes.get('isSelected', self.default_isSelected) self.bgCont = Container(name='bgCont', bgParent=self, opacity=self.OPACITY_IDLE, state=uiconst.UI_DISABLED, idx=0) StretchSpriteVerticalThemeColored( name='edgeGlow', bgParent=self.bgCont, texturePath='res:/UI/Texture/shared/buttonEdgeGlowFrameBottom.png', colorType=uiconst.COLORTYPE_UIHILIGHT, blendMode=trinity.TR2_SBM_ADD, opacity=0.5, color=self.fixedColor, topEdgeSize=1, bottomEdgeSize=1) SpriteThemeColored(name='buttonGlow', bgParent=self.bgCont, texturePath='res:/UI/Texture/shared/buttonGlow.png', colorType=uiconst.COLORTYPE_UIHILIGHT, padding=-14, opacity=0.15, color=self.fixedColor) colorType = uiconst.COLORTYPE_UIBASECONTRAST if self.isSelected else uiconst.COLORTYPE_UIBASE self.underlay = FillThemeColored(bgParent=self, name='tabBackground', colorType=colorType, opacity=0.7)
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.powerBlink = None self.lastSetCapacitor = None self.controller = attributes.controller self.InitCapacitor() uthread.new(self.UpdateThread)
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.headerLabel = EveLabelLarge(parent=self, align=uiconst.TOTOP, bold=True) self.resultLabel = EveLabelMedium(parent=self, align=uiconst.TOTOP) self.mapView = weakref.ref(attributes.mapView)
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) bgColor = attributes.get('bgColor', (1, 1, 1, 0.1)) Fill(bgParent=self, color=bgColor) textColor = attributes.get('textColor', (1, 1, 1, 0.3)) self.textLabel = EveLabelMedium(align=uiconst.CENTER, parent=self, text=attributes.text, bold=True, color=textColor) self.AdjustSize()
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) typeID = attributes.typeID qty = attributes.qty iconPadding = 1 * const.defaultPadding typeIcon = Icon(name='typeIcon', parent=self, state=uiconst.UI_NORMAL, size=32, left=iconPadding, ignoreSize=True, typeID=typeID) techIcon = uix.GetTechLevelIcon(typeID=typeID) if techIcon: techIcon.left = iconPadding techIcon.SetParent(self, idx=0) typeName = evetypes.GetName(typeID) link = '<url="showinfo:%s">%s</url>' % (typeID, typeName) text = '%sx %s' % (qty, link) left = iconPadding * 2 + typeIcon.width + 10 label = EveLabelMedium(parent=self, left=left, text=text, state=uiconst.UI_NORMAL, align=uiconst.CENTERLEFT) self.width = label.left + label.textwidth + 10
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) sm.RegisterNotify(self) self.jobData = attributes.jobData self.materialGroups = [] self.lines = [] self.fromLine = None self.bigConnectorCircle = None self.animateTextThread = None noItemsLabelCont = Container( parent=self, align=uiconst.TOPLEFT_PROP, pos=(0.0, 0.5, 0.5, 500), padRight=industryUIConst.RADIUS_CENTERCIRCLE_OUTER) self.noItemsRequiredLabel = EveCaptionMedium( name='noItemsRequiredLabel', parent=noItemsLabelCont, align=uiconst.CENTER, opacity=0.0) self.bg = StretchSpriteHorizontal(name='groupBackground', parent=self, align=uiconst.TOLEFT_PROP, state=uiconst.UI_DISABLED, width=0.5, height=402, leftEdgeSize=10, rightEdgeSize=400) groupsData = self.GetMaterialGroups() self.ConstructGroups(groupsData) self.ConstructLines(groupsData) self.UpdateState() self.AnimEntry()