From 362ffd147e224bdd6992f7ff203a84282e63fea9 Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Sat, 14 Sep 2024 22:17:43 +1000 Subject: [PATCH] Improve first-launch profile config UX see a351dcc55 --- src/BizHawk.Client.Common/DisplayManager/OSDManager.cs | 4 ++++ src/BizHawk.Client.EmuHawk/MainForm.Designer.cs | 2 +- src/BizHawk.Client.EmuHawk/MainForm.Events.cs | 7 ++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/BizHawk.Client.Common/DisplayManager/OSDManager.cs b/src/BizHawk.Client.Common/DisplayManager/OSDManager.cs index 5367836ef68..8078871c05a 100644 --- a/src/BizHawk.Client.Common/DisplayManager/OSDManager.cs +++ b/src/BizHawk.Client.Common/DisplayManager/OSDManager.cs @@ -83,6 +83,10 @@ private string MakeFrameCounter() private readonly List _guiTextList = [ ]; private readonly List _ramWatchList = [ ]; + /// Clears the queue used by . You probably don't want to do this. + public void ClearRegularMessages() + => _messages.Clear(); + public void AddMessage(string message, int? duration = null) => _messages.Add(new() { Message = message, diff --git a/src/BizHawk.Client.EmuHawk/MainForm.Designer.cs b/src/BizHawk.Client.EmuHawk/MainForm.Designer.cs index 8bfd8b16b63..47c1613b0d8 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.Designer.cs @@ -2147,7 +2147,7 @@ private void InitializeComponent() this.ProfileFirstBootLabel.AutoToolTip = true; this.ProfileFirstBootLabel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.ProfileFirstBootLabel.Text = "ProfileFirstBootLabel"; - this.ProfileFirstBootLabel.ToolTipText = "Set up your profile before use"; + this.ProfileFirstBootLabel.ToolTipText = "Open the setup/onboarding wizard"; this.ProfileFirstBootLabel.Visible = false; this.ProfileFirstBootLabel.Click += new System.EventHandler(this.ProfileFirstBootLabel_Click); // diff --git a/src/BizHawk.Client.EmuHawk/MainForm.Events.cs b/src/BizHawk.Client.EmuHawk/MainForm.Events.cs index 0c4f265fc8d..5848bc29b60 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.Events.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.Events.cs @@ -1514,12 +1514,13 @@ private void FreezeStatus_Click(object sender, EventArgs e) private void ProfileFirstBootLabel_Click(object sender, EventArgs e) { - // We do not check if the user is actually setting a profile here. - // This is intentional. using var profileForm = new ProfileConfig(Config, this); - this.ShowDialogWithTempMute(profileForm); + _ = this.ShowDialogWithTempMute(profileForm); // interpret Cancel as user acklowledgement (there are instructions for re-opening the dialog anyway) Config.FirstBoot = false; ProfileFirstBootLabel.Visible = false; + OSD.ClearRegularMessages(); + AddOnScreenMessage("You can find that again at Config > Profiles", duration: 10/*seconds*/); // intentionally left off the ellipsis from the menu item's name as it could be misinterpreted as the message being truncated + AddOnScreenMessage("All done! Drag+drop a rom to start playing", duration: 10/*seconds*/); } private void LinkConnectStatusBarButton_Click(object sender, EventArgs e)