From 552649445a5194c3e34bcb7a6d824f1a52c0ba26 Mon Sep 17 00:00:00 2001 From: "andres.delikat" Date: Sun, 24 Apr 2011 19:38:08 +0000 Subject: [PATCH] Input Config - make TI83 buttons in 3 separate columns --- .../config/InputConfig.Designer.cs | 3 +- BizHawk.MultiClient/config/InputConfig.cs | 35 ++++++++++++++++++- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/BizHawk.MultiClient/config/InputConfig.Designer.cs b/BizHawk.MultiClient/config/InputConfig.Designer.cs index 1a6b8ee476..f41b4a4217 100644 --- a/BizHawk.MultiClient/config/InputConfig.Designer.cs +++ b/BizHawk.MultiClient/config/InputConfig.Designer.cs @@ -80,8 +80,7 @@ // // ControllerImage // - this.ControllerImage.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) + this.ControllerImage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Right))); this.ControllerImage.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.ControllerImage.Location = new System.Drawing.Point(258, 73); diff --git a/BizHawk.MultiClient/config/InputConfig.cs b/BizHawk.MultiClient/config/InputConfig.cs index 7e4eadb958..71146331b5 100644 --- a/BizHawk.MultiClient/config/InputConfig.cs +++ b/BizHawk.MultiClient/config/InputConfig.cs @@ -265,7 +265,9 @@ namespace BizHawk.MultiClient Changed = true; Labels.Clear(); TextBoxes.Clear(); - for (int i = 0; i < TI83ControlList.Length; i++) + + //NOTE: Uses a hard coded 50 buttons (but it isn't likely that a TI-83 will magically get more buttons + for (int i = 0; i < 17; i++) { TempLabel = new Label(); TempLabel.Text = TI83ControlList[i]; @@ -278,6 +280,37 @@ namespace BizHawk.MultiClient ButtonsGroupBox.Controls.Add(TempTextBox); ButtonsGroupBox.Controls.Add(TempLabel); } + int c = 0; + for (int i = 17; i < 34; i++) + { + TempLabel = new Label(); + TempLabel.Text = TI83ControlList[i]; + TempLabel.Location = new Point(150, 20 + (c * 24)); + Labels.Add(TempLabel); + TempTextBox = new InputWidget(); + TempTextBox.Location = new Point(190, 20 + (c * 24)); + TextBoxes.Add(TempTextBox); + TempTextBox.Text = ButtonMappings[i]; + ButtonsGroupBox.Controls.Add(TempTextBox); + ButtonsGroupBox.Controls.Add(TempLabel); + c++; + } + c = 0; + for (int i = 34; i < 50; i++) + { + TempLabel = new Label(); + TempLabel.Text = TI83ControlList[i]; + TempLabel.Location = new Point(292, 20 + (c * 24)); + Labels.Add(TempLabel); + TempTextBox = new InputWidget(); + TempTextBox.Location = new Point(348, 20 + (c * 24)); + TextBoxes.Add(TempTextBox); + TempTextBox.Text = ButtonMappings[i]; + ButtonsGroupBox.Controls.Add(TempTextBox); + ButtonsGroupBox.Controls.Add(TempLabel); + c++; + } + Changed = true; }