Skip to content

Commit

Permalink
Improve first-launch profile config UX
Browse files Browse the repository at this point in the history
  • Loading branch information
YoshiRulz committed Sep 14, 2024
1 parent 0c9f816 commit 362ffd1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/BizHawk.Client.Common/DisplayManager/OSDManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ private string MakeFrameCounter()
private readonly List<UIDisplay> _guiTextList = [ ];
private readonly List<UIDisplay> _ramWatchList = [ ];

/// <summary>Clears the queue used by <see cref="AddMessage"/>. You probably don't want to do this.</summary>
public void ClearRegularMessages()
=> _messages.Clear();

public void AddMessage(string message, int? duration = null)
=> _messages.Add(new() {
Message = message,
Expand Down
2 changes: 1 addition & 1 deletion src/BizHawk.Client.EmuHawk/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/BizHawk.Client.EmuHawk/MainForm.Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 362ffd1

Please sign in to comment.