diff --git a/MatterControlLib/SetupWizard/StagedSetupWizard.cs b/MatterControlLib/SetupWizard/StagedSetupWizard.cs index d916f503b..9b1530f56 100644 --- a/MatterControlLib/SetupWizard/StagedSetupWizard.cs +++ b/MatterControlLib/SetupWizard/StagedSetupWizard.cs @@ -42,6 +42,7 @@ namespace MatterHackers.MatterControl private DialogPage activePage; private GuiWidget rightPanel; private bool footerHeightAcquired = false; + private WizardStageRow activeStageButton; public StagedSetupWizard(IEnumerable stages) { @@ -76,10 +77,19 @@ namespace MatterHackers.MatterControl stageWidget.Click += (s, e) => { + if (activeStageButton != null) + { + activeStageButton.Active = false; + } + stage.Reset(); stage.MoveNext(); activeStage = stage; + + activeStageButton = stageWidget; + activeStageButton.Active = true; + this.ChangeToPage(stage.Current); }; diff --git a/MatterControlLib/SetupWizard/WizardStageRow.cs b/MatterControlLib/SetupWizard/WizardStageRow.cs index d1f609376..a380076bc 100644 --- a/MatterControlLib/SetupWizard/WizardStageRow.cs +++ b/MatterControlLib/SetupWizard/WizardStageRow.cs @@ -43,9 +43,10 @@ namespace MatterHackers.MatterControl private ImageBuffer hoverIcon; private double iconXOffset; private double iconYOffset; + private bool _active; public WizardStageRow(string text, string helpText, ISetupWizard stage, ThemeConfig theme) - : base (text, helpText, theme) + : base(text, helpText, theme) { this.stage = stage; this.Cursor = Cursors.Hand; @@ -54,6 +55,21 @@ namespace MatterHackers.MatterControl hoverIcon = AggContext.StaticData.LoadIcon("expand.png", 16, 16, theme.InvertIcons); } + public bool Active + { + get => _active; + set + { + _active = value; + } + } + + public override Color BackgroundColor + { + get => (_active) ? theme.AccentMimimalOverlay : base.BackgroundColor; + set => base.BackgroundColor = value; + } + public override void OnBoundsChanged(EventArgs e) { if (detailIcon != null) @@ -70,10 +86,13 @@ namespace MatterHackers.MatterControl { base.OnDraw(graphics2D); - graphics2D.Render( - mouseInBounds ? hoverIcon : detailIcon, - iconXOffset, - iconYOffset); + if (!this.Active) + { + graphics2D.Render( + mouseInBounds ? hoverIcon : detailIcon, + iconXOffset, + iconYOffset); + } } } } \ No newline at end of file