Input config - fix height resizing of TI83, fix ordering of controllers in combo box. Remove calls to hardcoded indexes of the comboboxes (use the string names instead!)

This commit is contained in:
andres.delikat 2011-07-10 13:16:24 +00:00
parent 61f466ca8e
commit 3a9acac5a4
2 changed files with 13 additions and 14 deletions

View File

@ -143,12 +143,12 @@
this.SystemComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.SystemComboBox.FormattingEnabled = true;
this.SystemComboBox.Items.AddRange(new object[] {
"SMS / GG / SG-1000",
"PC Engine / SGX",
"NES",
"Gameboy",
"SMS / GG / SG-1000",
"Sega Genesis",
"TI-83",
"NES"});
"PC Engine / SGX",
"TI-83"});
this.SystemComboBox.Location = new System.Drawing.Point(6, 19);
this.SystemComboBox.Name = "SystemComboBox";
this.SystemComboBox.Size = new System.Drawing.Size(146, 21);

View File

@ -11,7 +11,6 @@ using System.Windows.Forms;
namespace BizHawk.MultiClient
{
//TODO:
//Sizing event should change prevWidth & prevHeight
//Remove AppendMapping and TruncateMapping functions
public partial class InputConfig : Form
@ -56,7 +55,7 @@ namespace BizHawk.MultiClient
InputWidget TempTextBox;
this.Text = ControllerStr + "SMS / GG / SG-1000";
ControllerImage.Image = BizHawk.MultiClient.Properties.Resources.SMSController;
this.SystemComboBox.SelectedIndex = 0;
int jpad = this.ControllComboBox.SelectedIndex;
string[] ButtonMappings = new string[SMSControlList.Length];
ButtonMappings[0] = Global.Config.SMSController[jpad].Up;
@ -633,24 +632,24 @@ namespace BizHawk.MultiClient
case "SMS":
case "SG":
case "GG":
this.SystemComboBox.SelectedIndex = 0;
this.SystemComboBox.SelectedIndex = SystemComboBox.Items.IndexOf("SMS / GG / SG-1000");
break;
case "PCE":
case "SGX":
this.SystemComboBox.SelectedIndex = 1;
this.SystemComboBox.SelectedIndex = SystemComboBox.Items.IndexOf("PC Engine / SGX");
break;
case "GB":
this.SystemComboBox.SelectedIndex = 2;
this.SystemComboBox.SelectedIndex = SystemComboBox.Items.IndexOf("Gameboy");
break;
case "GEN":
this.SystemComboBox.SelectedIndex = 3;
this.SystemComboBox.SelectedIndex = SystemComboBox.Items.IndexOf("Sega Genesis");
break;
case "TI83":
this.SystemComboBox.SelectedIndex = 4;
this.SystemComboBox.SelectedIndex = SystemComboBox.Items.IndexOf("TI-83");
break;
case "NES":
this.SystemComboBox.SelectedIndex = 5;
this.SystemComboBox.SelectedIndex = SystemComboBox.Items.IndexOf("NES");
break;
default:
this.SystemComboBox.SelectedIndex = 0;
@ -706,8 +705,8 @@ namespace BizHawk.MultiClient
joypads = 1;
if (this.Width < 690)
this.Width = 690;
if (this.Height < 540)
this.Height = 540;
if (this.Height < 556)
this.Height = 556;
break;
case "NES":
joypads = 4;