mirror of
https://github.com/FroggMaster/CreamInstaller.git
synced 2026-07-28 14:47:04 -07:00
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
This commit is contained in:
+12
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
+11
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user