From 78b23564ae1df6885bfadbbc0e971a72b33a45af Mon Sep 17 00:00:00 2001 From: adelikat Date: Mon, 29 Jul 2013 20:32:22 +0000 Subject: [PATCH] Controller Config - tweaking logic for positioning/placement/size of widgets --- .../ControllerConfig/ControllerConfigPanel.cs | 6 +- .../config/NewControllerConfig.Designer.cs | 352 +++++++++--------- 2 files changed, 179 insertions(+), 179 deletions(-) diff --git a/BizHawk.MultiClient/config/ControllerConfig/ControllerConfigPanel.cs b/BizHawk.MultiClient/config/ControllerConfig/ControllerConfigPanel.cs index 82b427435a..47c605deec 100644 --- a/BizHawk.MultiClient/config/ControllerConfig/ControllerConfigPanel.cs +++ b/BizHawk.MultiClient/config/ControllerConfig/ControllerConfigPanel.cs @@ -23,8 +23,8 @@ namespace BizHawk.MultiClient public int MarginTop = 0; public int Spacing = 24; - public int InputSize = 100; - public int ColumnWidth = 210; + public int InputSize = 170; + public int ColumnWidth = 280; public int LabelWidth = 60; protected List Inputs = new List(); @@ -133,7 +133,7 @@ namespace BizHawk.MultiClient for (int i = 0; i < buttons.Count; i++) { y += Spacing; - if (y > (_panelSize.Height)) + if (y > (_panelSize.Height - 30)) { y = MarginTop; x += ColumnWidth; diff --git a/BizHawk.MultiClient/config/NewControllerConfig.Designer.cs b/BizHawk.MultiClient/config/NewControllerConfig.Designer.cs index 81ffda9c48..767530358c 100644 --- a/BizHawk.MultiClient/config/NewControllerConfig.Designer.cs +++ b/BizHawk.MultiClient/config/NewControllerConfig.Designer.cs @@ -28,186 +28,186 @@ /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NewControllerConfig)); - this.tabControl1 = new System.Windows.Forms.TabControl(); - this.tabPage1 = new System.Windows.Forms.TabPage(); - this.tabPage2 = new System.Windows.Forms.TabPage(); - this.tabPage3 = new System.Windows.Forms.TabPage(); - this.label2 = new System.Windows.Forms.Label(); - this.checkBoxAutoTab = new System.Windows.Forms.CheckBox(); - this.checkBoxUDLR = new System.Windows.Forms.CheckBox(); - this.buttonOK = new System.Windows.Forms.Button(); - this.buttonCancel = new System.Windows.Forms.Button(); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.pictureBox1 = new System.Windows.Forms.PictureBox(); - this.buttonLoadDefaults = new System.Windows.Forms.Button(); - this.tabControl1.SuspendLayout(); - this.tableLayoutPanel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); - this.SuspendLayout(); - // - // tabControl1 - // - this.tabControl1.Controls.Add(this.tabPage1); - this.tabControl1.Controls.Add(this.tabPage2); - this.tabControl1.Controls.Add(this.tabPage3); - this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tabControl1.Location = new System.Drawing.Point(3, 3); - this.tabControl1.Name = "tabControl1"; - this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(494, 464); - this.tabControl1.TabIndex = 1; - // - // tabPage1 - // - this.tabPage1.Location = new System.Drawing.Point(4, 22); - this.tabPage1.Name = "tabPage1"; - this.tabPage1.Padding = new System.Windows.Forms.Padding(3); - this.tabPage1.Size = new System.Drawing.Size(486, 438); - this.tabPage1.TabIndex = 0; - this.tabPage1.Text = "Normal Controls"; - this.tabPage1.UseVisualStyleBackColor = true; - // - // tabPage2 - // - this.tabPage2.Location = new System.Drawing.Point(4, 22); - this.tabPage2.Name = "tabPage2"; - this.tabPage2.Padding = new System.Windows.Forms.Padding(3); - this.tabPage2.Size = new System.Drawing.Size(486, 438); - this.tabPage2.TabIndex = 1; - this.tabPage2.Text = "Autofire Controls"; - this.tabPage2.UseVisualStyleBackColor = true; - // - // tabPage3 - // - this.tabPage3.Location = new System.Drawing.Point(4, 22); - this.tabPage3.Name = "tabPage3"; - this.tabPage3.Size = new System.Drawing.Size(486, 438); - this.tabPage3.TabIndex = 2; - this.tabPage3.Text = "Analog Controls"; - this.tabPage3.UseVisualStyleBackColor = true; - // - // label2 - // - this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(12, 490); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(140, 13); - this.label2.TabIndex = 2; - this.label2.Text = "Escape clears a keybinding."; - // - // checkBoxAutoTab - // - this.checkBoxAutoTab.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.checkBoxAutoTab.AutoSize = true; - this.checkBoxAutoTab.Location = new System.Drawing.Point(187, 488); - this.checkBoxAutoTab.Name = "checkBoxAutoTab"; - this.checkBoxAutoTab.Size = new System.Drawing.Size(70, 17); - this.checkBoxAutoTab.TabIndex = 3; - this.checkBoxAutoTab.Text = "Auto Tab"; - this.checkBoxAutoTab.UseVisualStyleBackColor = true; - this.checkBoxAutoTab.CheckedChanged += new System.EventHandler(this.checkBoxAutoTab_CheckedChanged); - // - // checkBoxUDLR - // - this.checkBoxUDLR.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.checkBoxUDLR.AutoSize = true; - this.checkBoxUDLR.Location = new System.Drawing.Point(263, 488); - this.checkBoxUDLR.Name = "checkBoxUDLR"; - this.checkBoxUDLR.Size = new System.Drawing.Size(84, 17); - this.checkBoxUDLR.TabIndex = 4; - this.checkBoxUDLR.Text = "Allow UDLR"; - this.checkBoxUDLR.UseVisualStyleBackColor = true; - this.checkBoxUDLR.CheckedChanged += new System.EventHandler(this.checkBoxUDLR_CheckedChanged); - // - // buttonOK - // - this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonOK.Location = new System.Drawing.Point(696, 485); - this.buttonOK.Name = "buttonOK"; - this.buttonOK.Size = new System.Drawing.Size(75, 23); - this.buttonOK.TabIndex = 5; - this.buttonOK.Text = "OK"; - this.buttonOK.UseVisualStyleBackColor = true; - this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); - // - // buttonCancel - // - this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonCancel.Location = new System.Drawing.Point(777, 485); - this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.Size = new System.Drawing.Size(75, 23); - this.buttonCancel.TabIndex = 6; - this.buttonCancel.Text = "Cancel"; - this.buttonCancel.UseVisualStyleBackColor = true; - this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); - // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NewControllerConfig)); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.tabPage3 = new System.Windows.Forms.TabPage(); + this.label2 = new System.Windows.Forms.Label(); + this.checkBoxAutoTab = new System.Windows.Forms.CheckBox(); + this.checkBoxUDLR = new System.Windows.Forms.CheckBox(); + this.buttonOK = new System.Windows.Forms.Button(); + this.buttonCancel = new System.Windows.Forms.Button(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.buttonLoadDefaults = new System.Windows.Forms.Button(); + this.tabControl1.SuspendLayout(); + this.tableLayoutPanel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // tabControl1 + // + this.tabControl1.Controls.Add(this.tabPage1); + this.tabControl1.Controls.Add(this.tabPage2); + this.tabControl1.Controls.Add(this.tabPage3); + this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControl1.Location = new System.Drawing.Point(3, 3); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(562, 493); + this.tabControl1.TabIndex = 1; + // + // tabPage1 + // + this.tabPage1.Location = new System.Drawing.Point(4, 22); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(554, 467); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "Normal Controls"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // tabPage2 + // + this.tabPage2.Location = new System.Drawing.Point(4, 22); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(486, 438); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "Autofire Controls"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // tabPage3 + // + this.tabPage3.Location = new System.Drawing.Point(4, 22); + this.tabPage3.Name = "tabPage3"; + this.tabPage3.Size = new System.Drawing.Size(486, 438); + this.tabPage3.TabIndex = 2; + this.tabPage3.Text = "Analog Controls"; + this.tabPage3.UseVisualStyleBackColor = true; + // + // label2 + // + this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(12, 519); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(140, 13); + this.label2.TabIndex = 2; + this.label2.Text = "Escape clears a keybinding."; + // + // checkBoxAutoTab + // + this.checkBoxAutoTab.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.checkBoxAutoTab.AutoSize = true; + this.checkBoxAutoTab.Location = new System.Drawing.Point(187, 517); + this.checkBoxAutoTab.Name = "checkBoxAutoTab"; + this.checkBoxAutoTab.Size = new System.Drawing.Size(70, 17); + this.checkBoxAutoTab.TabIndex = 3; + this.checkBoxAutoTab.Text = "Auto Tab"; + this.checkBoxAutoTab.UseVisualStyleBackColor = true; + this.checkBoxAutoTab.CheckedChanged += new System.EventHandler(this.checkBoxAutoTab_CheckedChanged); + // + // checkBoxUDLR + // + this.checkBoxUDLR.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.checkBoxUDLR.AutoSize = true; + this.checkBoxUDLR.Location = new System.Drawing.Point(263, 517); + this.checkBoxUDLR.Name = "checkBoxUDLR"; + this.checkBoxUDLR.Size = new System.Drawing.Size(84, 17); + this.checkBoxUDLR.TabIndex = 4; + this.checkBoxUDLR.Text = "Allow UDLR"; + this.checkBoxUDLR.UseVisualStyleBackColor = true; + this.checkBoxUDLR.CheckedChanged += new System.EventHandler(this.checkBoxUDLR_CheckedChanged); + // + // buttonOK + // + this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOK.Location = new System.Drawing.Point(764, 514); + this.buttonOK.Name = "buttonOK"; + this.buttonOK.Size = new System.Drawing.Size(75, 23); + this.buttonOK.TabIndex = 5; + this.buttonOK.Text = "OK"; + this.buttonOK.UseVisualStyleBackColor = true; + this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.buttonCancel.Location = new System.Drawing.Point(845, 514); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(75, 23); + this.buttonCancel.TabIndex = 6; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.tableLayoutPanel1.ColumnCount = 2; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 340F)); - this.tableLayoutPanel1.Controls.Add(this.tabControl1, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.pictureBox1, 1, 0); - this.tableLayoutPanel1.Location = new System.Drawing.Point(12, 12); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 1; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(840, 470); - this.tableLayoutPanel1.TabIndex = 7; - // - // pictureBox1 - // - this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + this.tableLayoutPanel1.ColumnCount = 2; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 340F)); + this.tableLayoutPanel1.Controls.Add(this.tabControl1, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.pictureBox1, 1, 0); + this.tableLayoutPanel1.Location = new System.Drawing.Point(12, 12); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 1; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(908, 499); + this.tableLayoutPanel1.TabIndex = 7; + // + // pictureBox1 + // + this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pictureBox1.Location = new System.Drawing.Point(503, 23); - this.pictureBox1.Margin = new System.Windows.Forms.Padding(3, 23, 3, 3); - this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(334, 444); - this.pictureBox1.TabIndex = 2; - this.pictureBox1.TabStop = false; - // - // buttonLoadDefaults - // - this.buttonLoadDefaults.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonLoadDefaults.Location = new System.Drawing.Point(615, 485); - this.buttonLoadDefaults.Name = "buttonLoadDefaults"; - this.buttonLoadDefaults.Size = new System.Drawing.Size(75, 23); - this.buttonLoadDefaults.TabIndex = 8; - this.buttonLoadDefaults.Text = "Defaults"; - this.buttonLoadDefaults.UseVisualStyleBackColor = true; - this.buttonLoadDefaults.Click += new System.EventHandler(this.buttonLoadDefaults_Click); - // - // NewControllerConfig - // - this.AcceptButton = this.buttonOK; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.buttonCancel; - this.ClientSize = new System.Drawing.Size(864, 515); - this.Controls.Add(this.buttonLoadDefaults); - this.Controls.Add(this.checkBoxUDLR); - this.Controls.Add(this.tableLayoutPanel1); - this.Controls.Add(this.buttonCancel); - this.Controls.Add(this.buttonOK); - this.Controls.Add(this.checkBoxAutoTab); - this.Controls.Add(this.label2); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Name = "NewControllerConfig"; - this.Text = "Controller Config"; - this.Load += new System.EventHandler(this.NewControllerConfig_Load); - this.tabControl1.ResumeLayout(false); - this.tableLayoutPanel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); + this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pictureBox1.Location = new System.Drawing.Point(571, 23); + this.pictureBox1.Margin = new System.Windows.Forms.Padding(3, 23, 3, 3); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(334, 473); + this.pictureBox1.TabIndex = 2; + this.pictureBox1.TabStop = false; + // + // buttonLoadDefaults + // + this.buttonLoadDefaults.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonLoadDefaults.Location = new System.Drawing.Point(683, 514); + this.buttonLoadDefaults.Name = "buttonLoadDefaults"; + this.buttonLoadDefaults.Size = new System.Drawing.Size(75, 23); + this.buttonLoadDefaults.TabIndex = 8; + this.buttonLoadDefaults.Text = "Defaults"; + this.buttonLoadDefaults.UseVisualStyleBackColor = true; + this.buttonLoadDefaults.Click += new System.EventHandler(this.buttonLoadDefaults_Click); + // + // NewControllerConfig + // + this.AcceptButton = this.buttonOK; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.buttonCancel; + this.ClientSize = new System.Drawing.Size(932, 544); + this.Controls.Add(this.buttonLoadDefaults); + this.Controls.Add(this.checkBoxUDLR); + this.Controls.Add(this.tableLayoutPanel1); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOK); + this.Controls.Add(this.checkBoxAutoTab); + this.Controls.Add(this.label2); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "NewControllerConfig"; + this.Text = "Controller Config"; + this.Load += new System.EventHandler(this.NewControllerConfig_Load); + this.tabControl1.ResumeLayout(false); + this.tableLayoutPanel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); }