mirror of
https://github.com/FroggMaster/CreamInstaller.git
synced 2026-07-28 14:47:04 -07:00
Add GroupBoxes to Settings
- Adds groupboxes and groups settings to make it a little more organized
This commit is contained in:
+54
-24
@@ -17,64 +17,91 @@ partial class SettingsForm
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
SettingsToolTip = new ToolTip();
|
||||
appearanceGroup = new GroupBox();
|
||||
darkModeCheckBox = new CheckBox();
|
||||
gameManagementGroup = new GroupBox();
|
||||
blockedGamesCheckBox = new CheckBox();
|
||||
sortByNameCheckBox = new CheckBox();
|
||||
saveButton = new Button();
|
||||
cancelButton = new Button();
|
||||
settingsToolTip = new ToolTip();
|
||||
appearanceGroup.SuspendLayout();
|
||||
gameManagementGroup.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// settingsToolTip
|
||||
//
|
||||
settingsToolTip.AutoPopDelay = 8000;
|
||||
settingsToolTip.InitialDelay = 500;
|
||||
settingsToolTip.ReshowDelay = 100;
|
||||
SettingsToolTip.AutoPopDelay = 8000;
|
||||
SettingsToolTip.InitialDelay = 500;
|
||||
SettingsToolTip.ReshowDelay = 100;
|
||||
//
|
||||
// appearanceGroup
|
||||
//
|
||||
appearanceGroup.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
appearanceGroup.Controls.Add(darkModeCheckBox);
|
||||
appearanceGroup.Location = new Point(12, 12);
|
||||
appearanceGroup.Name = "appearanceGroup";
|
||||
appearanceGroup.Size = new Size(376, 50);
|
||||
appearanceGroup.TabIndex = 0;
|
||||
appearanceGroup.TabStop = false;
|
||||
appearanceGroup.Text = "Appearance";
|
||||
//
|
||||
// darkModeCheckBox
|
||||
//
|
||||
darkModeCheckBox.AutoSize = false;
|
||||
darkModeCheckBox.Location = new Point(36, 20);
|
||||
darkModeCheckBox.FlatStyle = FlatStyle.System;
|
||||
darkModeCheckBox.Location = new Point(12, 20);
|
||||
darkModeCheckBox.Name = "darkModeCheckBox";
|
||||
darkModeCheckBox.Size = new Size(160, 22);
|
||||
darkModeCheckBox.TabIndex = 0;
|
||||
darkModeCheckBox.Text = "Enable Dark Mode";
|
||||
darkModeCheckBox.FlatStyle = FlatStyle.System;
|
||||
darkModeCheckBox.UseVisualStyleBackColor = true;
|
||||
settingsToolTip.SetToolTip(darkModeCheckBox, "Switches the application between light and dark color themes.");
|
||||
SettingsToolTip.SetToolTip(darkModeCheckBox, "Switches the application between light and dark color themes.");
|
||||
//
|
||||
// gameManagementGroup
|
||||
//
|
||||
gameManagementGroup.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
gameManagementGroup.Controls.Add(blockedGamesCheckBox);
|
||||
gameManagementGroup.Controls.Add(sortByNameCheckBox);
|
||||
gameManagementGroup.Location = new Point(12, 72);
|
||||
gameManagementGroup.Name = "gameManagementGroup";
|
||||
gameManagementGroup.Size = new Size(376, 76);
|
||||
gameManagementGroup.TabIndex = 1;
|
||||
gameManagementGroup.TabStop = false;
|
||||
gameManagementGroup.Text = "Game Management";
|
||||
//
|
||||
// blockedGamesCheckBox
|
||||
//
|
||||
blockedGamesCheckBox.AutoSize = false;
|
||||
blockedGamesCheckBox.Location = new Point(36, 50);
|
||||
blockedGamesCheckBox.FlatStyle = FlatStyle.System;
|
||||
blockedGamesCheckBox.Location = new Point(12, 22);
|
||||
blockedGamesCheckBox.Name = "blockedGamesCheckBox";
|
||||
blockedGamesCheckBox.Size = new Size(190, 22);
|
||||
blockedGamesCheckBox.TabIndex = 1;
|
||||
blockedGamesCheckBox.TabIndex = 0;
|
||||
blockedGamesCheckBox.Text = "Block Protected Games";
|
||||
blockedGamesCheckBox.FlatStyle = FlatStyle.System;
|
||||
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.");
|
||||
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
|
||||
//
|
||||
sortByNameCheckBox.AutoSize = false;
|
||||
sortByNameCheckBox.Location = new Point(36, 80);
|
||||
sortByNameCheckBox.FlatStyle = FlatStyle.System;
|
||||
sortByNameCheckBox.Location = new Point(12, 48);
|
||||
sortByNameCheckBox.Name = "sortByNameCheckBox";
|
||||
sortByNameCheckBox.Size = new Size(200, 22);
|
||||
sortByNameCheckBox.TabIndex = 2;
|
||||
sortByNameCheckBox.TabIndex = 1;
|
||||
sortByNameCheckBox.Text = "Sort game list by name";
|
||||
sortByNameCheckBox.FlatStyle = FlatStyle.System;
|
||||
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.");
|
||||
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
|
||||
//
|
||||
saveButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
saveButton.AutoSize = true;
|
||||
saveButton.Location = new Point(220, 115);
|
||||
saveButton.Location = new Point(232, 160);
|
||||
saveButton.Name = "saveButton";
|
||||
saveButton.Size = new Size(75, 25);
|
||||
saveButton.TabIndex = 3;
|
||||
saveButton.TabIndex = 2;
|
||||
saveButton.Text = "Save";
|
||||
saveButton.UseVisualStyleBackColor = true;
|
||||
saveButton.Click += OnSaveClick;
|
||||
@@ -83,10 +110,10 @@ partial class SettingsForm
|
||||
//
|
||||
cancelButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
cancelButton.AutoSize = true;
|
||||
cancelButton.Location = new Point(301, 115);
|
||||
cancelButton.Location = new Point(313, 160);
|
||||
cancelButton.Name = "cancelButton";
|
||||
cancelButton.Size = new Size(75, 25);
|
||||
cancelButton.TabIndex = 4;
|
||||
cancelButton.TabIndex = 3;
|
||||
cancelButton.Text = "Cancel";
|
||||
cancelButton.UseVisualStyleBackColor = true;
|
||||
cancelButton.Click += OnCancelClick;
|
||||
@@ -95,25 +122,28 @@ partial class SettingsForm
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(400, 155);
|
||||
ClientSize = new Size(400, 197);
|
||||
Controls.Add(cancelButton);
|
||||
Controls.Add(saveButton);
|
||||
Controls.Add(sortByNameCheckBox);
|
||||
Controls.Add(blockedGamesCheckBox);
|
||||
Controls.Add(darkModeCheckBox);
|
||||
Controls.Add(gameManagementGroup);
|
||||
Controls.Add(appearanceGroup);
|
||||
FormBorderStyle = FormBorderStyle.FixedDialog;
|
||||
MaximizeBox = false;
|
||||
MinimizeBox = false;
|
||||
Name = "SettingsForm";
|
||||
StartPosition = FormStartPosition.CenterParent;
|
||||
appearanceGroup.ResumeLayout(false);
|
||||
gameManagementGroup.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
private GroupBox appearanceGroup;
|
||||
private GroupBox gameManagementGroup;
|
||||
private CheckBox darkModeCheckBox;
|
||||
private CheckBox blockedGamesCheckBox;
|
||||
private CheckBox sortByNameCheckBox;
|
||||
private Button saveButton;
|
||||
private Button cancelButton;
|
||||
private ToolTip settingsToolTip;
|
||||
private ToolTip SettingsToolTip;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user