mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-26 12:56:42 -05:00
Reorganize settings editor to show color settings
This commit is contained in:
92
PKHeX.WinForms/Subforms/SettingsEditor.Designer.cs
generated
92
PKHeX.WinForms/Subforms/SettingsEditor.Designer.cs
generated
@@ -29,33 +29,29 @@ protected override void Dispose(bool disposing)
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SettingsEditor));
|
||||
this.FLP_Settings = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.FLP_Blank = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.L_Blank = new System.Windows.Forms.Label();
|
||||
this.CB_Blank = new System.Windows.Forms.ComboBox();
|
||||
this.FLP_Settings.SuspendLayout();
|
||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||
this.Tab_Bool = new System.Windows.Forms.TabPage();
|
||||
this.FLP_Settings = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.Tab_Color = new System.Windows.Forms.TabPage();
|
||||
this.PG_Color = new System.Windows.Forms.PropertyGrid();
|
||||
this.FLP_Blank.SuspendLayout();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.Tab_Bool.SuspendLayout();
|
||||
this.Tab_Color.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// FLP_Settings
|
||||
//
|
||||
this.FLP_Settings.AutoScroll = true;
|
||||
this.FLP_Settings.Controls.Add(this.FLP_Blank);
|
||||
this.FLP_Settings.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.FLP_Settings.Location = new System.Drawing.Point(0, 0);
|
||||
this.FLP_Settings.Name = "FLP_Settings";
|
||||
this.FLP_Settings.Size = new System.Drawing.Size(334, 431);
|
||||
this.FLP_Settings.TabIndex = 0;
|
||||
//
|
||||
// FLP_Blank
|
||||
//
|
||||
this.FLP_Blank.Controls.Add(this.L_Blank);
|
||||
this.FLP_Blank.Controls.Add(this.CB_Blank);
|
||||
this.FLP_Blank.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.FLP_Blank.Location = new System.Drawing.Point(3, 3);
|
||||
this.FLP_Blank.Location = new System.Drawing.Point(0, 0);
|
||||
this.FLP_Blank.Name = "FLP_Blank";
|
||||
this.FLP_Blank.Size = new System.Drawing.Size(291, 27);
|
||||
this.FLP_Blank.TabIndex = 0;
|
||||
this.FLP_Blank.Size = new System.Drawing.Size(334, 27);
|
||||
this.FLP_Blank.TabIndex = 1;
|
||||
//
|
||||
// L_Blank
|
||||
//
|
||||
@@ -76,12 +72,64 @@ private void InitializeComponent()
|
||||
this.CB_Blank.Size = new System.Drawing.Size(137, 21);
|
||||
this.CB_Blank.TabIndex = 1;
|
||||
//
|
||||
// tabControl1
|
||||
//
|
||||
this.tabControl1.Controls.Add(this.Tab_Bool);
|
||||
this.tabControl1.Controls.Add(this.Tab_Color);
|
||||
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tabControl1.Location = new System.Drawing.Point(0, 27);
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
this.tabControl1.SelectedIndex = 0;
|
||||
this.tabControl1.Size = new System.Drawing.Size(334, 284);
|
||||
this.tabControl1.TabIndex = 3;
|
||||
//
|
||||
// Tab_Bool
|
||||
//
|
||||
this.Tab_Bool.Controls.Add(this.FLP_Settings);
|
||||
this.Tab_Bool.Location = new System.Drawing.Point(4, 22);
|
||||
this.Tab_Bool.Name = "Tab_Bool";
|
||||
this.Tab_Bool.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.Tab_Bool.Size = new System.Drawing.Size(326, 258);
|
||||
this.Tab_Bool.TabIndex = 0;
|
||||
this.Tab_Bool.Text = "Toggles";
|
||||
this.Tab_Bool.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// FLP_Settings
|
||||
//
|
||||
this.FLP_Settings.AutoScroll = true;
|
||||
this.FLP_Settings.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.FLP_Settings.Location = new System.Drawing.Point(3, 3);
|
||||
this.FLP_Settings.Name = "FLP_Settings";
|
||||
this.FLP_Settings.Size = new System.Drawing.Size(320, 252);
|
||||
this.FLP_Settings.TabIndex = 3;
|
||||
//
|
||||
// Tab_Color
|
||||
//
|
||||
this.Tab_Color.Controls.Add(this.PG_Color);
|
||||
this.Tab_Color.Location = new System.Drawing.Point(4, 22);
|
||||
this.Tab_Color.Name = "Tab_Color";
|
||||
this.Tab_Color.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.Tab_Color.Size = new System.Drawing.Size(355, 204);
|
||||
this.Tab_Color.TabIndex = 1;
|
||||
this.Tab_Color.Text = "Colors";
|
||||
this.Tab_Color.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// PG_Color
|
||||
//
|
||||
this.PG_Color.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.PG_Color.Location = new System.Drawing.Point(3, 3);
|
||||
this.PG_Color.Name = "PG_Color";
|
||||
this.PG_Color.Size = new System.Drawing.Size(349, 198);
|
||||
this.PG_Color.TabIndex = 0;
|
||||
//
|
||||
// SettingsEditor
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
|
||||
this.AutoSize = true;
|
||||
this.ClientSize = new System.Drawing.Size(334, 431);
|
||||
this.Controls.Add(this.FLP_Settings);
|
||||
this.ClientSize = new System.Drawing.Size(334, 311);
|
||||
this.Controls.Add(this.tabControl1);
|
||||
this.Controls.Add(this.FLP_Blank);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
@@ -89,18 +137,24 @@ private void InitializeComponent()
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Settings";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.SettingsEditor_FormClosing);
|
||||
this.FLP_Settings.ResumeLayout(false);
|
||||
this.FLP_Blank.ResumeLayout(false);
|
||||
this.FLP_Blank.PerformLayout();
|
||||
this.tabControl1.ResumeLayout(false);
|
||||
this.Tab_Bool.ResumeLayout(false);
|
||||
this.Tab_Color.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.FlowLayoutPanel FLP_Settings;
|
||||
private System.Windows.Forms.FlowLayoutPanel FLP_Blank;
|
||||
private System.Windows.Forms.Label L_Blank;
|
||||
private System.Windows.Forms.ComboBox CB_Blank;
|
||||
private System.Windows.Forms.TabControl tabControl1;
|
||||
private System.Windows.Forms.TabPage Tab_Bool;
|
||||
private System.Windows.Forms.FlowLayoutPanel FLP_Settings;
|
||||
private System.Windows.Forms.TabPage Tab_Color;
|
||||
private System.Windows.Forms.PropertyGrid PG_Color;
|
||||
}
|
||||
}
|
||||
@@ -19,8 +19,9 @@ public SettingsEditor(object obj, params string[] blacklist)
|
||||
|
||||
WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage);
|
||||
// reorder checkboxes
|
||||
int ctr = 0;
|
||||
foreach (var c in FLP_Settings.Controls.OfType<CheckBox>().OrderBy(z => z.Text).ToList())
|
||||
var checkboxes = FLP_Settings.Controls.OfType<CheckBox>().OrderBy(z => z.Text).ToList();
|
||||
var ctr = 0;
|
||||
foreach (var c in checkboxes)
|
||||
FLP_Settings.Controls.SetChildIndex(c, ctr++);
|
||||
|
||||
if (obj is Settings s)
|
||||
@@ -36,6 +37,7 @@ public SettingsEditor(object obj, params string[] blacklist)
|
||||
FLP_Blank.Visible = false;
|
||||
}
|
||||
|
||||
PG_Color.SelectedObject = Main.Draw;
|
||||
this.CenterToForm(FindForm());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user