def _OnClose(self): Container._OnClose(self) for each in self.sr.entries.children[:]: if hasattr(each, 'Collapse'): each.Collapse() self.menu = None
def _OnClose(self): if self.submenuview is not None and not self.submenuview.destroyed: self.submenuview.Close() self.submenuview = None self.menu = None self.submenu = None self.expandTimer = None self.collapseTimer = None Container._OnClose(self)
def _OnClose(self, *args): self.sr.callback = None self.sr.linkedrows = [] for each in self.sr.tabs: if each is not None and not each.destroyed: each.Close() self.sr.tabs = None self.btns = [] Container._OnClose(self, *args)
def _SetupTestCasePanel(self, mainCont): cont = Container(name='cont', parent=mainCont, align=uiconst.TOTOP, padLeft=4, padRight=4, height=40) self.testCombo = Combo(parent=cont, align=uiconst.TOTOP, options=self.testOptions, callback=self.TestComboChanged) self.testCombo.SetHint(self.testCaseDescription[1]) buttonBox = Container(name='buttonBox', parent=cont, align=uiconst.TOTOP, padTop=3, height=20) self.stayHereCheckbox = Checkbox(parent=buttonBox, text=u'Stay where you are', align=uiconst.TOLEFT, checked=False, height=18, width=120) Button(parent=buttonBox, label='Spawn', align=uiconst.TORIGHT, func=self.SpawnTestcase, width=40, height=18) Button(parent=buttonBox, label='Clear', align=uiconst.TORIGHT, func=self.sceneDirector.ClearAll, width=40, height=18) Button(parent=buttonBox, label='Damage', align=uiconst.TORIGHT, func=self.sceneDirector.ApplyDamage, width=40, height=18, hint='Wait for ships to load before calling this')
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) padding = 30 self.termHeaderLabel = EveCaptionLarge(name='termHeaderLabel', parent=self, align=uiconst.TOTOP, text='', padLeft=padding + 4, padTop=20) self.contentRightCont = Container(name='contentRightCont', parent=self, align=uiconst.TORIGHT, width=128, padRight=36) self.height = 300 self.longTextEdit = EditPlainText(name='longTextEdit', parent=self, align=uiconst.TOTOP, readonly=True, setvalue='abc', padding=(padding, 0, padding, 0)) self.longTextEdit.sr.maincontainer.padding = 0 self.longTextEdit.DisableScrolling() self.longTextEdit.EnableAutoSize() self.longTextEdit.OnContentSizeChanged = self.OnContentChanged self.longTextEdit.HideBackground() self.longTextEdit.RemoveActiveFrame() self.termSpriteCont = Container(name='termSpriteCont', parent=self.contentRightCont, pos=(0, 0, 128, 128), align=uiconst.TOTOP) self.termSprite = Sprite( name='termSprite', parent=self.termSpriteCont, pos=(0, 0, 128, 128), texturePath= 'res:/UI/Texture/Classes/ShipTree/groupIcons/frigate.png', align=uiconst.CENTER) self.loreTextLabel = EveLabelMedium(name='termNameLabel', text='', parent=self.contentRightCont, align=uiconst.TOTOP)
def ApplyAttributes(self, attributes): super(VgsDetailProduct, self).ApplyAttributes(attributes) self.typeID = attributes.typeID self.onClick = attributes.onClick self.highlight = Sprite( name='hoverGradient', bgParent=self, texturePath='res:/UI/Texture/Vgs/store-button-gradient2.png', color=(0.2, 0.7, 1.0)) iconCont = Container(parent=self, align=uiconst.TOLEFT, width=64, height=64, padding=(TEXT_PADDING, 1, TEXT_PADDING, 1), state=uiconst.UI_DISABLED) Sprite(bgParent=iconCont, name='background', texturePath='res:/UI/Texture/classes/InvItem/bgNormal.png') techIcon = uix.GetTechLevelIcon(typeID=self.typeID) isCopy = evetypes.GetCategoryID( self.typeID) == invconst.categoryBlueprint if techIcon: iconCont.children.append(techIcon) Icon(parent=iconCont, align=uiconst.TOPLEFT, typeID=self.typeID, size=64, state=uiconst.UI_DISABLED, isCopy=isCopy) container = Container(parent=self, align=uiconst.TOALL, state=uiconst.UI_DISABLED) VgsLabelSmall(parent=container, align=uiconst.CENTERLEFT, text=localization.GetByLabel( 'UI/Contracts/ContractsWindow/TypeNameWithQuantity', typeID=self.typeID, quantity=attributes.quantity)) if IsPreviewable(GetPreviewType(self.typeID)): self.cursor = uiconst.UICURSOR_MAGNIFIER else: self.disabled = True
def AddBestRepairPicker(self, tRow): self.bestRepairPickerPanel = None bestPar = Container(name='bestPar', parent=tRow, align=uiconst.TOPLEFT, height=32, width=self.col1Width, state=uiconst.UI_NORMAL) bestPar.OnClick = self.ExpandBestRepair SetFittingTooltipInfo(targetObject=bestPar, tooltipName='ActiveDefenses') expandIcon = Icon(name='expandIcon', icon='ui_38_16_229', parent=bestPar, state=uiconst.UI_DISABLED, align=uiconst.BOTTOMRIGHT) numPar = Container(name='numPar', parent=bestPar, pos=(4, 17, 11, 11), align=uiconst.TOPLEFT, state=uiconst.UI_DISABLED) numLabel = EveLabelMedium(text='', parent=numPar, atop=-1, state=uiconst.UI_DISABLED, align=uiconst.CENTER, shadowOffset=(0, 0)) Fill(parent=numPar, color=BAR_COLORS[1]) self.activeBestRepairNumLabel = numLabel icon = Icon(parent=bestPar, state=uiconst.UI_DISABLED, width=32, height=32) statusLabel = Label(name='statusLabel', text='', parent=bestPar, left=icon.left + icon.width, state=uiconst.UI_DISABLED, align=uiconst.CENTERLEFT) self.activeBestRepairLabel = statusLabel self.activeBestRepairParent = bestPar self.activeBestRepairIcon = icon
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.typeID = attributes.typeID self.item = attributes.get('item', None) self.itemID = attributes.get('itemID', None) if self.itemID is None and self.item is not None: self.itemID = self.item.itemID if self.item is None and self.itemID is not None: dogmaLocation = sm.GetService('clientDogmaIM').GetDogmaLocation() if dogmaLocation.IsItemLoaded(self.itemID): self.item = dogmaLocation.GetItem(self.itemID)
def Load(self): self.Flush() toggleButtonCont = Container(name='btnGroupCont', parent=self, align=uiconst.TOTOP, height=35) btnGroup = ToggleButtonGroup(parent=toggleButtonCont, align=uiconst.CENTER, height=toggleButtonCont.height, width=300, padding=(10, 4, 10, 3), callback=self.LoadRequiredForLevel) for level in xrange(1, 6): hint = localization.GetByLabel('UI/InfoWindow/RequiredForLevelButtonHint', skillName=evetypes.GetName(self.typeID), level=level) isDisabled = not bool(self.GetItemsRequiringSkill(self.typeID, level)) btnGroup.AddButton(btnID=level, label=uiutil.IntToRoman(level), hint=hint, isDisabled=isDisabled) self.scroll = Scroll(name='scroll', parent=self, padding=const.defaultPadding) btnGroup.SelectFirst()
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.typeID = attributes.typeID self.skillTimeLabel = EveLabelMediumBold(name='skillTimeLabel', parent=self, align=uiconst.TOTOP, padding=(8, 4, 0, 0)) self.scroll = Scroll(name='scroll', parent=self, padding=const.defaultPadding) self.scroll.ignoreTabTrimming = True
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.fixedColor = attributes.Get('color', self.default_fixedColor) self.isGlowEdgeRotated = attributes.Get('isGlowEdgeRotated', self.default_isGlowEdgeRotated) hideFrame = attributes.get('hideFrame', self.default_hideFrame) self.isSelected = False self.isDisabled = False self.ConstructLayout() if hideFrame: self.frame.Hide()
def AnimFlash(self, color): width = 500 flashCont = Container(parent=self, idx=0, align=uiconst.TOPLEFT, width=width, height=self.height) flashGradient = GradientSprite(bgParent=flashCont, rgbData=[(0, color[:3])], alphaData=[(0, 0.0), (0.9, 0.4), (1.0, 0.0)]) arrows = Sprite(parent=flashCont, align=uiconst.CENTERLEFT, texturePath='res:/UI/Texture/Classes/Industry/CenterBar/arrows.png', pos=(0, 0, 375, self.height), color=color, opacity=0.15, tileX=True) duration = self.width / 600.0 uicore.animations.MorphScalar(flashCont, 'left', -width, self.width + width, duration=duration, curveType=uiconst.ANIM_LINEAR) uicore.animations.FadeTo(flashCont, 0.0, 1.0, duration=duration, callback=flashCont.Close, curveType=uiconst.ANIM_WAVE)
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) banner_texture = attributes.banner_texture size_factor = float( attributes.parent.width) / float(SEASON_CURRENT_BANNER_WIDTH) self.height = float(SEASON_CURRENT_BANNER_HEIGHT) * size_factor self.width = float(SEASON_CURRENT_BANNER_WIDTH) * size_factor Sprite(name='current_event_banner', parent=self, texturePath=banner_texture, align=uiconst.TOALL)
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.settingsObject = None self.settingMenu = UtilMenu( parent=self, align=uiconst.BOTTOMLEFT, GetUtilMenu=self.GetOpportunitySettings, texturePath='res:/UI/Texture/SettingsCogwheel.png', iconSize=18, pos=(0, 0, 18, 18)) self.settingMenu.OnMenuClosed = self.OnMenuClosed
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.minValue = attributes.get('minValue', 0) self.maxValue = attributes.get('maxValue', 0) self.labelclass = attributes.get('labelClass', None) self.fontsize = attributes.get('fontsize', None) self.step = attributes.get('step', 32) self.count = attributes.get('count', 1) self.formatter = attributes.get('formatter', None) if not self.fontsize: self.fontsize = self.labelclass.default_fontsize
def CreateBottomLayout(self, offer, aurumBalance): self.bottomContainer = Container(name='bottomContainer', parent=self.offerContainer, align=uiconst.TOTOP, clipChildren=True, height=BOTTOM_PANEL_HEIGHT) Fill(align=uiconst.TOALL, bgParent=self.bottomContainer, color=HEADER_BG_COLOR) GradientSprite(align=uiconst.TOALL, bgParent=self.bottomContainer, rgbData=((0.0, (0.0, 0.0, 0.0)), (1.0, (0.0, 0.0, 0.0))), alphaData=((0.0, 0.8), (0.2, 0.6), (0.6, 0.0)), rotation=math.pi * 0.4) self.purchaseDetailsPanel = PurchaseDetailsPanel( parent=self.bottomContainer, offer=offer, aurumBalance=aurumBalance, buyOfferCallback=self.vgsUiController.BuyOffer, previewCallback=self.OnPreviewType, state=uiconst.UI_PICKCHILDREN, width=CONTAINER_WIDTH) self.activeBottomPanel = self.purchaseDetailsPanel self.purchaseProgressPanel = PurchaseProgressPanel( parent=self.bottomContainer, width=CONTAINER_WIDTH) self.purchaseSuccessPanel = PurchaseResultPanel( parent=self.bottomContainer, closeOfferCallback=self.CloseOffer, iconForegroundTexturePath= 'res:/UI/Texture/vgs/purchase_success_fg.png', iconBackgroundTexturePath= 'res:/UI/Texture/vgs/purchase_success_bg.png', textTitle=localization.GetByLabel( 'UI/VirtualGoodsStore/Purchase/Completed'), audioEventName='store_purchase_success', width=CONTAINER_WIDTH) self.purchaseFailurePanel = PurchaseResultPanel( parent=self.bottomContainer, closeOfferCallback=self.CloseOffer, iconForegroundTexturePath= 'res:/UI/Texture/vgs/purchase_fail_fg.png', iconBackgroundTexturePath= 'res:/UI/Texture/vgs/purchase_fail_bg.png', textTitle=localization.GetByLabel( 'UI/VirtualGoodsStore/Purchase/Failed'), audioEventName='store_purchase_failure', width=CONTAINER_WIDTH) VgsLabelSmall( parent=self.purchaseFailurePanel, align=uiconst.TOTOP, text='<center>%s</center>' % localization.GetByLabel( 'UI/VirtualGoodsStore/Purchase/FailureReasonUnknown'), padding=(TEXT_PADDING, TEXT_PADDING, TEXT_PADDING, 0))
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) info = attributes.info self.icon = Sprite(name='arrow', parent=self, pos=(0, 0, info['size'], info['size']), texturePath=info['path'], state=uiconst.UI_DISABLED, align=uiconst.TOPLEFT) self.text = EveLabelSmall(name='tipsHeader', text=info['text'], parent=self, left=info['size'] + 2, top=1, align=uiconst.TOPLEFT) iconColor = info.get('color', None) if iconColor: self.icon.SetRGB(*iconColor)
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.jobData = None foregroundCont = Container(bgTexturePath='res:/UI/Texture/Classes/Industry/Output/outputContBg.png', parent=self, align=uiconst.CENTER, width=self.width, height=self.height, state=uiconst.UI_DISABLED) self.bgPattern = Frame(bgParent=foregroundCont, texturePath='res:/UI/Texture/Classes/Industry/Output/bgPattern.png', cornerSize=12) self.captionCont = ContainerAutoSize(name='captionCont', parent=self, align=uiconst.TOPLEFT, pos=(14, 10, 300, 0)) self.outcomeCaption = EveHeaderMedium(name='outcomeCaption', parent=self.captionCont, align=uiconst.TOTOP, bold=True, text=GetByLabel('UI/Industry/Outcome')) self.outcomeLabel = EveHeaderSmall(name='outcomeLabel', parent=self.captionCont, align=uiconst.TOTOP, bold=True) self.probabilityLabel = EveHeaderSmall(name='probabilityLabel', parent=self.captionCont, align=uiconst.TOTOP, bold=False, state=uiconst.UI_HIDDEN) self.probabilityLabel.LoadTooltipPanel = self.LoadProbabilityTooltipPanel self.probabilityLabel.GetTooltipDelay = self.GetProbabilityTooltipDelay self.copyInfoCont = Container(name='copyInfoCont', parent=self, align=uiconst.CENTERBOTTOM, pos=(0, 8, 300, 32), state=uiconst.UI_HIDDEN) self.containerME = ContainerME(parent=self.copyInfoCont, align=uiconst.TOPLEFT, width=71, height=30) self.runsPerCopyCont = ContainerAutoSize(name='runsPerCopyCont', parent=self.copyInfoCont, align=uiconst.CENTERTOP) self.containerTE = ContainerTE(parent=self.copyInfoCont, align=uiconst.TOPRIGHT, width=71, height=30) IndustryCaptionLabel(parent=self.runsPerCopyCont, text=localization.GetByLabel('UI/Industry/Runs'), align=uiconst.CENTERTOP) self.bpRunsLabel = EveLabelMediumBold(parent=self.runsPerCopyCont, align=uiconst.CENTERTOP, top=12) self.errorFrame = ErrorFrame(bgParent=self, padding=1) self.outcomeItem = OutcomeItemContainer(parent=self) FillThemeColored(bgParent=self, opacity=0.5)
def ApplyAttributes(self, attributes): Window.ApplyAttributes(self, attributes) self.itemTrader = attributes.itemTrader self.shipId = attributes.shipId self.cargoChecker = attributes.cargoChecker self.default_caption = evetypes.GetName(self.itemTrader.typeID) self.ConstructButtons() self.mainContainer = Container(name='mainContainer', parent=self.sr.main) self.ConstructInputSection() self.outputSection = None
def ApplyAttributes(self, attributes): self._ready = False Window.ApplyAttributes(self, attributes) self.SetTopparentHeight(8) self.settingsContainer = Container(parent=self.sr.main, align=uiconst.TOTOP, height=16, padding=8) self.filterEdit = SinglelineEdit(parent=self.settingsContainer, align=uiconst.TOLEFT, width=150, label='Filter:') Button(parent=self.settingsContainer, label='Reset', align=uiconst.TORIGHT, func=self.Reset, padRight=8) self.scroll = Scroll(parent=self.sr.main, id='livecountscroll', align=uiconst.TOALL) self.Reset() self._ready = True uthread2.StartTasklet(self.Refresh)
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 UpdateAlignment(self, *args, **kwds): ret = Container.UpdateAlignment(self, *args, **kwds) if self.scrollToVerticalPending: self.verticalScrollBar.ScrollTo(self.scrollToVerticalPending) self._OnVerticalScrollBar(self.verticalScrollBar.handlePos) self.scrollToVerticalPending = None if self.scrollToHorizontalPending: self.horizontalScrollBar.ScrollTo(self.scrollToHorizontalPending) self._OnHorizontalScrollBar(self.horizontalScrollBar.handlePos) self.scrollToHorizontalPending = None return ret
def AddMarker(self, markerID, x, y, color=(1, 1, 1, 0.5), size=10): marker = Container(parent=self, align=uiconst.CENTER, pos=(x, y, size, size), idx=0) marker.markerID = markerID self.markersByID[markerID] = marker marker.unscaledPosition = (x, y) marker.hexSize = 1 Fill(bgParent=marker, color=color) return marker
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) if attributes.textPadding: self.textPadding = attributes.textPadding self.color = Fill(bgParent=self, color=attributes.color, opacity=1.0) self.label = VgsLabelMedium(parent=self, align=uiconst.CENTER, text=attributes.label, color=BUY_BUTTON_FONT_COLOR) self.SetText(attributes.label) self.OnClick = attributes.onClick
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.numSegments = attributes.numSegments self.radius = attributes.Get('radius', self.default_radius) self.lineWidth = attributes.Get('lineWidth', self.default_lineWidth) self.updateIconThread = None self.width = self.height = self.radius * 2 self.segmentTransform = Transform(name='segmentTransform', parent=self, align=TOALL) self.segments = self.ConstructSegments() self.icon = Sprite(name='icon', parent=self, align=CENTER, state=UI_DISABLED, width=20, height=20) self.AnimEntry()
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): Container.ApplyAttributes(self, attributes) self.infoType = attributes.infoType self.itemID = attributes.itemID self.initialized = False self.oldText = None self.edit = EditPlainText(parent=self, padding=const.defaultPadding, align=uiconst.TOALL, maxLength=5000, showattributepanel=True)
def ApplyAttributes(self, attributes): SE_BaseClassCore.ApplyAttributes(self, attributes) ParserBase.Prepare(self) self.sr.selfProxy = _weakref.proxy(self) self.htmldebug = 0 self.xmargin = 0 self.sr.entries = [] self.sr.overlays = [] self.sr.overlays_content = Container(name='overlays', parent=self, padding=(1, 1, 1, 1)) self.sr.content = Container(name='content', parent=self) self.sr.underlays_content = Container(name='underlays_content', parent=self, padding=(1, 1, 1, 1)) self.sr.background = Container(name='background', parent=self) self.sr.backgroundColorContainer = Container( name='backgroundColorContainer', parent=self) browser = GetBrowser(self) self.sr.browser = browser
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.dockPointerLength = attributes.get('dockPointerLength', self.default_dockPointerLength) self.dockMargin = attributes.get('dockMargin', self.default_dockMargin) self.hintBgColor = attributes.get('hintBgColor', self.default_hintBgColor) self.hintFrameColor = attributes.get('hintFrameColor', self.default_hintFrameColor) self.anchor = attributes.anchor self.dockPlacement = attributes.get('dockPlacement', self.default_dockPlacement) self.lineTrace = None self._BindToAnchor(self.anchor) self.SetDockPlacement(self.dockPlacement)
def ApplyAttributes(self, attributes): Container.ApplyAttributes(self, attributes) self.subCont = Container(parent=self, padding=(0, 0, 10, 10)) self.controller = attributes.controller self.controller.on_new_itemID.connect(self.OnNewItemID) self.controller.on_stats_changed.connect(self.UpdateStats) self.controller.on_drones_changed.connect(self.UpdateStats) self.controller.on_name_changed.connect(self.UpdateShipName) self.controller.on_item_ghost_fitted.connect(self.UpdateStats) self.ConstructNameCaption() self.ConstructStoredFittingsButtons() self.CreateCapacitorPanel() self.CreateOffensePanel() self.CreateDefensePanel() self.CreateTargetingPanel() self.CreateNavigationPanel() self.CreateDronePanel() self.CreateFuelPanel() self.CreateExpandableMenus() uthread.new(self.UpdateStats)
def ApplyAttributes(self, attributes): InfoPanelBase.ApplyAttributes(self, attributes) self.headerTextCont = Container(name='headerTextCont', parent=self.headerCont, align=uiconst.TOALL) self.titleLabel = self.headerCls( name='title', text=GetByLabel('UI/Achievements/InfoPanelHeader'), parent=self.headerTextCont, align=uiconst.CENTERLEFT, state=uiconst.UI_DISABLED)
def MakeSliderTextRow(self, label, minValue, maxValue, startValue, stepping, setValueFunc=None, endSliderFunc=None): sliderWidth = 100 sliderValueWidth = 30 sliderLabelWidth = 120 rowPadding = (5, 2, 10, 2) size = EveLabelSmall.MeasureTextSize(label, width=sliderLabelWidth) rowHeight = size[1] rowContainer = Container(name='TextRowContainer', parent=self.rightContainer, align=uiconst.TOTOP, alignMode=uiconst.TOTOP, height=rowHeight, padding=rowPadding) EveLabelSmall(name='sliderlabel', align=uiconst.TOLEFT, parent=rowContainer, text=label, width=sliderLabelWidth) increments = [] currentValue = minValue while currentValue <= maxValue: increments.append(currentValue) currentValue = currentValue + stepping valueLabel = EveLabelSmall(name='sliderValuelabel', left=sliderWidth, align=uiconst.CENTERRIGHT, text=str(startValue), width=sliderValueWidth) def UpdateLabel(slider): valueLabel.text = str(slider.GetValue()) Slider(name='niceSlider', align=uiconst.CENTERRIGHT, parent=rowContainer, minValue=minValue, maxValue=maxValue, width=sliderWidth, showLabel=False, startVal=startValue, isEvenIncrementsSlider=True, increments=increments, onsetvaluefunc=UpdateLabel, endsliderfunc=endSliderFunc) rowContainer.children.append(valueLabel) return rowContainer
def _OnSizeChange_NoBlock(self, newWidth, newHeight): Container._OnSizeChange_NoBlock(self, newWidth, newHeight) if self.amountLabel is not None: textWidth = self.amountLabel.textwidth availableTextWidth = newWidth - textWidth - 14 self.nameLabel.SetRightAlphaFade(fadeEnd=availableTextWidth, maxFadeWidth=20)
def __init__(self, **kw): Container.__init__(self, **kw) self.StartupInfoBubble()
def _OnSizeChange_NoBlock(self, width, height): Container._OnSizeChange_NoBlock(self, width, height) self.UpdateSizes((width, height))