def ApplyAttributes(self, attributes): ReprocessingItemContainer.ApplyAttributes(self, attributes) self.outputFrame = Frame(name='outputFrame', bgParent=self.spriteCont, texturePath='res:/UI/Texture/Reprocessing/Dash_Frame_48.png') self.outputFrame.SetRGB(*COL_YELLOW) qtyInfo = attributes.qtyInfo typeInfo = attributes.fromTypeInfo self._SetInfo(qtyInfo, typeInfo)
def ApplyAttributes(self, attributes): LayoutGrid.ApplyAttributes(self, attributes) self.columns = 5 self.cellPadding = 1 self.cellSpacing = 1 self.margin = (2, 2, 2, 2) self.addClear = attributes.get('addClear', True) self.colorList = attributes['colorList'] self.callback = attributes.callback currentColor = attributes.currentColor colorPos = (0, 0, 10, 10) for eachColor in self.colorList: if eachColor == currentColor: c = Container(name='colorFill', pos=colorPos, align=uiconst.NOALIGN, state=uiconst.UI_NORMAL) Frame(parent=c, name='selectedColorFrame', color=(1, 1, 1, 0.75)) Fill(parent=c, name='colorFill', color=eachColor, padding=1) else: c = Fill(name='colorFill', pos=colorPos, color=eachColor, align=uiconst.NOALIGN, state=uiconst.UI_NORMAL) c.OnClick = (self.callback, eachColor) self.AddCell(cellObject=c, colSpan=1, cellPadding=1) if self.addClear: c = Frame(name='colorFill', pos=colorPos, color=(1, 1, 1, 0.2), align=uiconst.NOALIGN, state=uiconst.UI_NORMAL) c.OnClick = (self.callback, None) self.AddCell(cellObject=c, colSpan=1)
def Prepare_(self): self.sr.label = Label(parent=self, state=uiconst.UI_DISABLED, align=uiconst.CENTER, bold=1, idx=0, fontFamily=self.fontFamily, fontStyle=self.fontStyle, fontPath=self.fontPath, fontsize=self.fontsize) self.sr.activeframe = Frame( parent=self, name='activeframe', state=uiconst.UI_HIDDEN, color=(1.0, 1.0, 1.0, 0.3), frameConst=uiconst.FRAME_BORDER1_SHADOW_CORNER4) self.sr.hilite = Fill(parent=self, name='hilite', state=uiconst.UI_HIDDEN, color=(1.0, 1.0, 1.0, 0.25), padding=(2, 2, 2, 2)) Frame(parent=self, name='background', state=uiconst.UI_DISABLED, frameConst=uiconst.FRAME_BORDER1_SHADOW_CORNER4, color=(1.0, 1.0, 1.0, 0.5))
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 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): Window.ApplyAttributes(self, attributes) mainArea = self.GetMainArea() mainArea.padding = 6 self._selectedObject = None self.SetTopparentHeight(0) self._infoContainer = Container(parent=mainArea, align=uiconst.TOTOP, height=72) self.searchInput = SinglelineEdit(parent=self._infoContainer, align=uiconst.BOTTOMRIGHT, left=4, top=8, width=100, OnChange=self.OnSearchInputChange, hinttext='Search') self.searchInput.SetHistoryVisibility(False) self.searchInput.ShowClearButton() m = UtilMenu(menuAlign=uiconst.TOPRIGHT, parent=self._infoContainer, align=uiconst.TOPRIGHT, GetUtilMenu=self.SettingMenu) self._infoLabel = Label(parent=self._infoContainer, state=uiconst.UI_DISABLED, color=(1.0, 1.0, 1.0, 0.75), left=2) self.searchResultParent = ContainerAutoSize(parent=mainArea, align=uiconst.TOTOP_NOPUSH, padding=(26, -6, 4, 0), bgColor=(0.5, 0.5, 0.5, 1)) self.attributeScroll = Scroll(parent=mainArea, align=uiconst.TOBOTTOM, name='attributeScroll') self.attributeScroll.height = min(self.height / 2, max(72, settings.user.ui.Get('uitree_attributeScroll_height', 200))) settings.user.ui.Set('uitree_attributeScroll_height', self.attributeScroll.height) self.divider = Divider(align=uiconst.TOBOTTOM, parent=mainArea, height=11, state=uiconst.UI_NORMAL) self.divider.OnChange_ = self.OnDividerMove self.divider.OnChangeStart_ = self.OnDividerMoveStart Fill(parent=self.divider, align=uiconst.CENTER, pos=(0, 0, 20, 1)) self.scroll = Scroll(parent=mainArea, name='treeScroll') self._hiliteFrame = Fill(parent=uicore.desktop, align=uiconst.ABSOLUTE, color=(0, 1, 0, 0.3), idx=0, state=uiconst.UI_DISABLED) self._selectedFrame = Frame(parent=uicore.desktop, align=uiconst.ABSOLUTE, color=(0, 1, 0, 0.3), idx=0, state=uiconst.UI_DISABLED) self.ReloadUIRoots() uthread.new(self.UpdateInfo) self._keyDownCookie = uicore.uilib.RegisterForTriuiEvents([uiconst.UI_KEYDOWN], self.OnGlobalKeyDown)
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) sm.RegisterNotify(self) self.typeID = attributes.typeID self.factionID = attributes.factionID self.groupNode = attributes.groupNode self.masteryLevel = None self.isMasteryIconBlinking = False if self.groupNode.IsRestricted(): Sprite(bgParent=self, align=uiconst.TOALL, 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(bgParent=self, cornerSize=10, opacity=0.5, texturePath='res:/UI/Texture/Classes/ShipTree/groups/frameUnlocked.png') self.bgBlinkFill = None self.bgVignette = Sprite(name='bgFill', bgParent=self, texturePath='res:/UI/Texture/Classes/ShipTree/groups/bgFill.png') Sprite(name='bgVignette', bgParent=self, texturePath='res:/UI/Texture/Classes/ShipTree/groups/bgVignette.png', color=COLOR_BG) self.recentUnlockBG = None texturePath = shipTreeConst.GetTagIconForType(self.typeID) if texturePath: self.techIcon = Sprite(name='techIcon', parent=self, align=uiconst.TOPLEFT, state=uiconst.UI_DISABLED, width=32, height=32, texturePath=texturePath, idx=0) else: self.techIcon = None self.iconTransform = Transform(parent=self, align=uiconst.TOALL, scalingCenter=(0.5, 0.5)) try: texturePath = inventorycommon.typeHelpers.GetHoloIconPath(self.typeID) except AttributeError as e: texturePath = None log.LogException(e) self.iconSprite = Sprite(name='iconSprite', parent=self.iconTransform, align=uiconst.TOPLEFT_PROP, state=uiconst.UI_DISABLED, texturePath=texturePath, blendMode=trinity.TR2_SBM_ADD, pos=(0.5, 0.08, self.width - 36, self.width - 36), idx=0) self.masteryIcon = Sprite(name='masterySprite', parent=self, align=uiconst.CENTERBOTTOM, state=uiconst.UI_DISABLED, pos=(0, -3, 45, 45), idx=0)
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 AddFill(self, *args): self.sr.fill = Frame(parent=self, name='fill', frameConst=uiconst.FRAME_FILLED_SHADOW_CORNER0, color=(1.0, 1.0, 1.0, 0.05)) self.sr.hilite = Frame(parent=self, name='hilite', frameConst=uiconst.FRAME_FILLED_SHADOW_CORNER0, pos=(1, 1, 0, 0), color=(1.0, 1.0, 1.0, 0.25), state=uiconst.UI_HIDDEN)
def UpdateSelected(self, selectedObject): if self.sr.node.uiObject and selectedObject is self.sr.node.uiObject: if not getattr(self, '_selectedSprite', None): self._selectedSprite = Frame(bgParent=self, color=(0, 1, 0, 0.3), padding=(1, 0, 1, 0)) self._selectedSprite.display = True elif getattr(self, '_selectedSprite', None): self._selectedSprite.display = False
def AlignPointPanelToInterest(panel, menuPointFlag, interestRect): al, at, aw, ah = interestRect if getattr(panel, 'debugShowInterest', False): if getattr(panel, 'debugFrame', None): panel.debugFrame.Close() panel.debugFrame = Frame(parent=uicore.layer.main, pos=interestRect, align=uiconst.TOPLEFT, idx=0) pointerOffset = panel.backgroundFrame.UpdatePointerPosition(menuPointFlag) px, py = pointerOffset px = uicore.ReverseScaleDpi(px) py = uicore.ReverseScaleDpi(py) fx, fy = menuPointFlag panel.menuPointFlag = menuPointFlag if fy == 4: panel.top = at - panel.height - panel.pointerSize elif fy == 0: panel.top = at + ah + panel.pointerSize else: panel.top = at + ah / 2 - py if fx == 4: panel.left = al - panel.width - panel.pointerSize elif fx == 0: panel.left = al + aw + panel.pointerSize else: panel.left = al + aw / 2 - px
def Prepare_(self): Frame(parent=self) self.sr.label = Label(parent=self, state=uiconst.UI_DISABLED, fontsize=10, letterspace=1, pos=(8, 4, 0, 0), uppercase=1, idx=2) self.sr.icon = Sprite(parent=self, state=uiconst.UI_DISABLED) self.sr.icon.LoadIcon('ui_1_16_102') self.sr.hilite = Fill(parent=self) self.sr.blink = Fill(parent=self)
def Layout(self): self.frame = Frame( bgParent=self, texturePath= 'res:/UI/Texture/Classes/Industry/CenterBar/buttonBg.png', cornerSize=5, color=Color.GRAY2) self.arrows = Sprite( bgParent=self, texturePath= 'res:/UI/Texture/Classes/Industry/CenterBar/arrowMask.png', textureSecondaryPath= 'res:/UI/Texture/Classes/Industry/CenterBar/arrows.png', translationSecondary=(-0.16, 0), spriteEffect=trinity.TR2_SFX_MODULATE, color=Color.GRAY2, opacity=0.2) animations.MorphVector2(self.arrows, 'translationSecondary', startVal=(0.16, 0.0), endVal=(-0.16, 0.0), duration=2.0, curveType=uiconst.ANIM_LINEAR, loops=uiconst.ANIM_REPEAT) self.label = CaptionLabel( parent=self, align=uiconst.CENTER, text=localization.GetByLabel('UI/SkillTrading/Extract')) self.spinner = LoadingWheel(parent=self, align=uiconst.CENTER, state=uiconst.UI_DISABLED, width=30, height=30, opacity=0.0)
def Layout(self): gaugeCont = Container(parent=self, align=uiconst.TOTOP, height=32) Frame(parent=gaugeCont, texturePath='res:/UI/Texture/classes/skilltrading/frame.png', cornerSize=3, opacity=0.5) self.gaugeBG = GradientSprite(bgParent=gaugeCont, align=uiconst.TOALL, rgbData=[(0.0, (1.0, 1.0, 1.0))], alphaData=[(0.0, 0.0), (0.4, 0.9), (0.6, 0.9), (1.0, 0.0)], opacity=0.1) self.extractButton = ExtractButton(parent=gaugeCont, align=uiconst.TOALL, controller=self.controller) self.gauge = Gauge(parent=gaugeCont, align=uiconst.TOTOP, state=uiconst.UI_DISABLED, height=30, gaugeHeight=30, top=1, color=COLOR_MODIFIED, backgroundColor=(1.0, 1.0, 0.0, 0.0)) self.noProgressHint = EveHeaderMedium( parent=gaugeCont, align=uiconst.CENTER, width=self.width, bold=True, text=localization.GetByLabel('UI/SkillTrading/DropToExtractHint'), opacity=0.5) self.amountLabel = ExtractorBarAmountLabel( parent=self, align=uiconst.TOTOP, top=2, goal=self.controller.SKILL_POINT_GOAL)
def ApplyAttributes(self, attributes): super(SidePanelButtonWithText, self).ApplyAttributes(attributes) self.isLeftAlign = attributes.isLeftAlign self.tabText = attributes.tabText self.onClick = attributes.onClick self.args = attributes.args self.isSelected = attributes.isSelected textRotation, frameRotation = self.GetRotations() self.tabLabelCont = VerticalLabel(parent=self, text=self.tabText, align=uiconst.CENTER, state=uiconst.UI_DISABLED, rotation=textRotation, labelClass=EveLabelLarge, rotationCenter=(0.5, 0.5)) self.tabLabelCont.label.letterspace = 1 frameCont = Transform(name='frameCont', parent=self, align=uiconst.TOALL, rotation=frameRotation) self.hilite = Frame(name='hilite', parent=frameCont, texturePath='res:/UI/Texture/Shared/sideTab_Over.png', align=uiconst.TOLEFT_NOPUSH, width=40, cornerSize=TABWIDTH) self.selectedFrame = Frame(name='selectedFrame', parent=frameCont, texturePath='res:/UI/Texture/Shared/sideTab_Over.png', align=uiconst.TOLEFT_NOPUSH, width=40, cornerSize=TABWIDTH, opacity=4.0) self.selectedFrame.display = False Frame(name='outputFrame', parent=frameCont, texturePath='res:/UI/Texture/Shared/sideTab_Active.png', align=uiconst.TOLEFT_NOPUSH, width=40, cornerSize=TABWIDTH, opacity=0.4) self.SetSelectedBtnState(self.isSelected)
def ConstructFillAndFrame(self): self._MakeFill() self.baseFill = Fill(bgParent=self, color=self.baseFillColor, padding=self.basePadding) self.baseFill.display = False self.boxFrame = Frame(bgParent=self, color=self.frameColor)
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) if attributes.schedule: self.mySchedule = attributes.schedule self.requiredHours = self.mySchedule.GetRequiredHours() elif attributes.requiredHours: self.requiredHours = attributes.requiredHours self.mySchedule = structures.Schedule(required=self.requiredHours) else: raise RuntimeError( 'VulnerabilityScheduler - neither schedule nor required hours?' ) self.callback = attributes.callback self.unallocatedCont = None self.remainingLabel = None self.timeConts = [] self.showDay = attributes.get('showDay', True) self.showTime = attributes.get('showTime', True) self.canModify = attributes.get('canModify', True) self.dragStart = None self.dragContainer = None self.dragMouseBtn = None self.hourConts = defaultdict(dict) self.MakeUnallocatedStrip() if attributes.get('frame', True): Frame(parent=self, color=(1, 1, 1, 0.5)) self.MakeGrid() self.AddBackgroundImage() self.ColorBoxes() self.UpdateHourFill() self.UpdateView()
def Prepare_ActiveFrame_(self): self.sr.activeframe = Frame(name='__activeframe', parent=self, align=uiconst.TOALL, state=uiconst.UI_HIDDEN, idx=0, color=(1.0, 1.0, 1.0, 0.0))
def ApplyAttributes(self, attributes): attributes.args = (self, ) + attributes.args ButtonIcon.ApplyAttributes(self, attributes) self.loadingWheel = None self.menuFunc = attributes.menuFunc self.hintFunc = attributes.hintFunc self.hintLabelPath = attributes.hintLabelPath self.colorSelected = sm.GetService('uiColor').GetUIColor( uiconst.COLORTYPE_UIHILIGHT) self.checkmark = None self.buttonType = attributes.buttonType self.frame = Frame(bgParent=self, color=NOT_SELECTED_FRAME_COLOR) self.hint = self.buttonType self.btnSettingConfig = attributes.btnSettingConfig if attributes.isChecked: self.SetSelected()
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 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 ShowCompWindow(self): if self.debug: self.LogInfo(' ShowCompWindow') edit = self.currentFocus if not edit or edit.destroyed: self.HideCompWindow() if self.debug: self.LogInfo(' <<ShowCompWindow (HideCompWindow) edit:', edit) return fontsize = 14 if hasattr(edit, 'GetFontParams'): fontsize = max(fontsize, edit.GetFontParams().fontsize) elif isinstance(edit, (CoreBrowserPane,)): fontsize = 24 if not self.compWindow: self.compWindow = Container(name='IME', parent=uicore.desktop, align=uiconst.TOPLEFT, idx=0) self.compCursor = Fill(parent=self.compWindow, align=uiconst.TOPLEFT, width=1, top=2, color=(1.0, 1.0, 1.0, 0.75)) self.compText = LabelCore(parent=self.compWindow, fontsize=fontsize, state=uiconst.UI_DISABLED, left=3, top=1) Frame(parent=self.compWindow, color=(1, 1, 1, 0.3)) Fill(parent=self.compWindow, color=(0.0, 0.0, 0.0, 1.0)) if self.s_bInsertOnType: self.compWindow.state = uiconst.UI_HIDDEN else: self.compWindow.state = uiconst.UI_DISABLED if self.debug: self.LogInfo(' ShowCompWindow self.s_CompString:', [ ord(char) for char in self.s_CompString ]) self.compText.fontsize = fontsize self.compText.text = self.s_CompString self.compWindow.width = self.compText.textwidth + self.compText.left * 2 self.compWindow.height = self.compText.textheight + self.compText.top * 2 self.compCursor.height = self.compWindow.height - self.compCursor.top * 2 self.compWindowParent = edit self.compCursor.left = self.compText.left + self.GetCompCursorPos(self.s_nCompCaret) self.PositionCompositionWindow()
def LoadFrame(self, color = None, offset = -2, iconPath = 'ui_1_16_209', cornerSize = 7): if not self.sr.frame: if self.sr.underlay: idx = GetIndex(self.sr.underlay) else: idx = -1 self.sr.frame = Frame(name='__frame', color=color, frameConst=(iconPath, cornerSize, offset), parent=self, idx=idx)
def CreateCurrentShipCont(self): self.shipCont.Flush() Frame(parent=self.shipCont, color=(1, 1, 1, 0.1)) activeShip = GetActiveShip() clientDogmaLocation = sm.GetService('clientDogmaIM').GetDogmaLocation() shipDogmaItem = clientDogmaLocation.GetShip() shipTypeID = shipDogmaItem.typeID icon = Icon(parent=self.shipCont, pos=(0, 0, 40, 40), ignoreSize=True, state=uiconst.UI_DISABLED) if self.fittingSvc.IsShipSimulated(): self.shipCont.OnClick = self.ExitSimulation icon.LoadIconByTypeID(shipTypeID) else: self.shipCont.OnClick = self.LoadCurrentShip hologramTexture = inventorycommon.typeHelpers.GetHoloIconPath( shipTypeID) icon.LoadTexture(hologramTexture) shipName = cfg.evelocations.Get(activeShip).name text = '%s<br>%s' % (evetypes.GetName(shipTypeID), shipName) self.shipnametext = EveLabelMedium(text=text, parent=self.shipCont, align=uiconst.TOTOP, top=2, padLeft=48)
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): SE_BaseClassCore.ApplyAttributes(self, attributes) self._expandIcon = Sprite(parent=self, align=uiconst.CENTERLEFT, pos=(0, 0, 18, 18)) self._expandIcon.OnClick = self.ExpandUIObject self._label = Label(parent=self, state=uiconst.UI_DISABLED, align=uiconst.CENTERLEFT, left=20, color=(1.0, 1.0, 1.0, 1)) self._pickHilite = Frame(name='_pickHilite', bgParent=self, texturePath=RESROOT + 'hiliteBackground.png', color=(0, 1, 0, 0.3), state=uiconst.UI_HIDDEN) self._hilite = Fill(name='_hilite', bgParent=self, color=(1, 1, 1, 0.125), state=uiconst.UI_HIDDEN) self.loaded = False
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.drag = False self.dragStart = 0 self.dragOffset = 0 self.color = attributes.get('color', self.default_color) self.hoverColor = attributes.get('hoverColor', self.default_hoverColor) self.frame = Frame(name='myFrame', bgParent=self, texturePath='res:/UI/Texture/classes/shipTree/infoPanel/selected.png', cornerSize=8, color=self.color)
def ConstructBackground(self): self.mouseEnterBG = Frame( name='mouseEnterBG', bgParent=self.bgContainer, texturePath='res:/UI/Texture/classes/ShipTree/InfoPanel/hover.png', opacity=0.0) self.mouseDownBG = Sprite( name='mouseDownBG', bgParent=self.bgContainer, texturePath='res:/UI/Texture/classes/ButtonIcon/mouseDown.png', opacity=0.0) self.selectedBG = Frame( name='selectedBG', bgParent=self.bgContainer, texturePath= 'res:/UI/Texture/classes/ShipTree/InfoPanel/selected.png', opacity=0.0)
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.label = Label(parent=self, align=uiconst.CENTER, fontPath='res:/UI/Fonts/EveSansNeue-Expanded.otf', fontsize=10) Frame(bgParent=self, texturePath='res:/UI/Texture/Shared/counterFrame.png', cornerSize=8, offset=-1, color=(0.2, 0.2, 0.2, 1)) if 'text' in attributes: self.text = attributes.text else: self.display = False
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.colorFill = Fill(bgParent=self, color=attributes.color or self.BGCOLOR) self.shadow = Frame(bgParent=self, frameConst=FRAME_SOFTSHADE, color=(0, 0, 0, 0.25), padding=(-10, -10, -10, -10))