From 5686664b98bfa27b96117c1fb0ce92fc684ff7c5 Mon Sep 17 00:00:00 2001 From: Frog Date: Mon, 20 Jul 2026 01:57:15 -0700 Subject: [PATCH] Add Tooltips to Settings / Fix Sort By Name Setting - Fixes bug where game list was not updates after saving settings when changing the sort setting - Add tooltips to the settings menu to describe what each setting does - Add tooltips to the buttons in the mainform --- CreamInstaller/Forms/MainForm.Designer.cs | 12 ++++++++++++ CreamInstaller/Forms/MainForm.cs | 5 +++++ CreamInstaller/Forms/SettingsForm.Designer.cs | 11 +++++++++++ CreamInstaller/Forms/SettingsForm.cs | 5 +++++ 4 files changed, 33 insertions(+) diff --git a/CreamInstaller/Forms/MainForm.Designer.cs b/CreamInstaller/Forms/MainForm.Designer.cs index 5c075bf..6c834ac 100644 --- a/CreamInstaller/Forms/MainForm.Designer.cs +++ b/CreamInstaller/Forms/MainForm.Designer.cs @@ -39,6 +39,10 @@ namespace CreamInstaller.Forms settingsButton = new Button(); selectionTreeView = new CustomTreeView(); topOptionsTable = new TableLayoutPanel(); + mainToolTip = new ToolTip(); + mainToolTip.AutoPopDelay = 8000; + mainToolTip.InitialDelay = 500; + mainToolTip.ReshowDelay = 100; programsGroupBox.SuspendLayout(); useSmokeAPILayoutPanel.SuspendLayout(); allCheckBoxLayoutPanel.SuspendLayout(); @@ -59,6 +63,7 @@ namespace CreamInstaller.Forms installButton.Text = "Generate and Install"; installButton.UseVisualStyleBackColor = true; installButton.Click += OnInstall; + mainToolTip.SetToolTip(installButton, "Generate DLC unlocker configurations and install them into the selected games."); // // programsGroupBox // @@ -127,6 +132,8 @@ namespace CreamInstaller.Forms useSmokeAPIHelpButton.Text = "?"; useSmokeAPIHelpButton.UseVisualStyleBackColor = true; useSmokeAPIHelpButton.Click += OnUseSmokeAPIHelpButtonClicked; + mainToolTip.SetToolTip(useSmokeAPIHelpButton, "Learn more about the SmokeAPI and CreamAPI unlocker engines."); + mainToolTip.SetToolTip(useSmokeApiToggle, "Switch between SmokeAPI (on) and CreamAPI (off) unlocker engines for Steam and Paradox games."); // // allCheckBoxLayoutPanel // @@ -199,6 +206,7 @@ namespace CreamInstaller.Forms scanButton.Text = "Rescan"; scanButton.UseVisualStyleBackColor = true; scanButton.Click += OnScan; + mainToolTip.SetToolTip(scanButton, "Re-scan for installed games and refresh the DLC list from cache."); // // uninstallAllButton // @@ -214,6 +222,7 @@ namespace CreamInstaller.Forms uninstallAllButton.Text = "Uninstall All"; uninstallAllButton.UseVisualStyleBackColor = true; uninstallAllButton.Click += OnUninstallAll; + mainToolTip.SetToolTip(uninstallAllButton, "Remove all installed DLC unlockers from every game."); // // uninstallButton // @@ -229,6 +238,7 @@ namespace CreamInstaller.Forms uninstallButton.Text = "Uninstall Selected"; uninstallButton.UseVisualStyleBackColor = true; uninstallButton.Click += OnUninstall; + mainToolTip.SetToolTip(uninstallButton, "Remove DLC unlockers from the selected games only."); // // progressLabelGames // @@ -270,6 +280,7 @@ namespace CreamInstaller.Forms settingsButton.Text = "Settings"; settingsButton.UseVisualStyleBackColor = true; settingsButton.Click += OnSettingsButtonClick; + mainToolTip.SetToolTip(settingsButton, "Open application settings."); // // topOptionsTable // @@ -354,5 +365,6 @@ namespace CreamInstaller.Forms private FlowLayoutPanel saveFlowPanel; private Button settingsButton; private TableLayoutPanel topOptionsTable; + private ToolTip mainToolTip; } } diff --git a/CreamInstaller/Forms/MainForm.cs b/CreamInstaller/Forms/MainForm.cs index 264c0d3..d86a370 100644 --- a/CreamInstaller/Forms/MainForm.cs +++ b/CreamInstaller/Forms/MainForm.cs @@ -43,6 +43,11 @@ internal sealed partial class MainForm : CustomForm Text = Program.ApplicationName; } + internal void UpdateSortOrder(bool sortByName) + => selectionTreeView.TreeViewNodeSorter = sortByName + ? PlatformIdComparer.NodeText + : PlatformIdComparer.NodeName; + internal static MainForm Current { get diff --git a/CreamInstaller/Forms/SettingsForm.Designer.cs b/CreamInstaller/Forms/SettingsForm.Designer.cs index e89e0fa..e56cd5c 100644 --- a/CreamInstaller/Forms/SettingsForm.Designer.cs +++ b/CreamInstaller/Forms/SettingsForm.Designer.cs @@ -22,8 +22,15 @@ partial class SettingsForm sortByNameCheckBox = new CheckBox(); saveButton = new Button(); cancelButton = new Button(); + settingsToolTip = new ToolTip(); SuspendLayout(); // + // settingsToolTip + // + settingsToolTip.AutoPopDelay = 8000; + settingsToolTip.InitialDelay = 500; + settingsToolTip.ReshowDelay = 100; + // // darkModeCheckBox // darkModeCheckBox.AutoSize = true; @@ -33,6 +40,7 @@ partial class SettingsForm darkModeCheckBox.TabIndex = 0; darkModeCheckBox.Text = "Enable Dark Mode"; darkModeCheckBox.UseVisualStyleBackColor = true; + settingsToolTip.SetToolTip(darkModeCheckBox, "Switches the application between light and dark color themes. Changes apply immediately."); // // blockedGamesCheckBox // @@ -43,6 +51,7 @@ partial class SettingsForm blockedGamesCheckBox.TabIndex = 1; blockedGamesCheckBox.Text = "Block Protected Games"; blockedGamesCheckBox.UseVisualStyleBackColor = true; + settingsToolTip.SetToolTip(blockedGamesCheckBox, "Prevents the program from displaying or modifying games protected by anti-cheat software (e.g. Easy Anti-Cheat, BattlEye). Disable at your own risk."); // // sortByNameCheckBox // @@ -53,6 +62,7 @@ partial class SettingsForm sortByNameCheckBox.TabIndex = 2; sortByNameCheckBox.Text = "Sort game list by name"; sortByNameCheckBox.UseVisualStyleBackColor = true; + settingsToolTip.SetToolTip(sortByNameCheckBox, "When enabled, games in the main list are sorted alphabetically by name. When disabled, games appear in their default platform order."); // // saveButton // @@ -102,4 +112,5 @@ partial class SettingsForm private CheckBox sortByNameCheckBox; private Button saveButton; private Button cancelButton; + private ToolTip settingsToolTip; } diff --git a/CreamInstaller/Forms/SettingsForm.cs b/CreamInstaller/Forms/SettingsForm.cs index 53f38e6..7d660f7 100644 --- a/CreamInstaller/Forms/SettingsForm.cs +++ b/CreamInstaller/Forms/SettingsForm.cs @@ -9,6 +9,7 @@ namespace CreamInstaller.Forms; internal sealed partial class SettingsForm : CustomForm { private bool wasDarkModeEnabled; + private bool wasSortByName; private SettingsForm() { @@ -31,6 +32,7 @@ internal sealed partial class SettingsForm : CustomForm blockedGamesCheckBox.Checked = Program.BlockProtectedGames; sortByNameCheckBox.Checked = Program.SortByName; wasDarkModeEnabled = Program.DarkModeEnabled; + wasSortByName = Program.SortByName; } private void OnSaveClick(object sender, EventArgs e) @@ -44,6 +46,9 @@ internal sealed partial class SettingsForm : CustomForm if (wasDarkModeEnabled != darkModeCheckBox.Checked) ThemeManager.ApplyToAllOpenForms(); + if (wasSortByName != sortByNameCheckBox.Checked) + MainForm.Current?.UpdateSortOrder(sortByNameCheckBox.Checked); + DialogResult = DialogResult.OK; Close(); }