From 5e126bf04f59351e7561f13f4df96c2f5841aeaf Mon Sep 17 00:00:00 2001 From: brandman211 Date: Sun, 25 Mar 2012 02:36:20 +0000 Subject: [PATCH] -Made the last two TI-83 buttons visible in the Config by increasing the height from 556 to 580. -Started merging TI-83 to Do: --This is going to be difficult because the field names are not the same as the label names, meaning that I'm going to have to use a dictionary for TI-83, if not for all of the controls. --I have to create a formula that calculates the proper row / column for a given field to be placed. Sounds like fun. --- BizHawk.MultiClient/config/InputConfig.cs | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/BizHawk.MultiClient/config/InputConfig.cs b/BizHawk.MultiClient/config/InputConfig.cs index 66ef0d8c0e..355767fdd5 100644 --- a/BizHawk.MultiClient/config/InputConfig.cs +++ b/BizHawk.MultiClient/config/InputConfig.cs @@ -33,7 +33,7 @@ namespace BizHawk.MultiClient {"SMS / GG / SG-1000", new string[8] { "Up", "Down", "Left", "Right", "B1", "B2", "Pause", "Reset" } }, { // TODO: display shift / alpha names too, Also order these like on the calculator - "TI83", new string[50] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "ON", + "TI-83", new string[50] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "ON", "ENTER", "Up", "Down", "Left", "Right", "+", "-", "Multiply", "Divide", "CLEAR", "^", "-", "(", ")", "TAN", "VARS", "COS", "PRGM", "STAT", "Matrix", "X", "STO->", "LN", "LOG", "^2", "^-1", "MATH", "ALPHA", "GRAPH", "TRACE", "ZOOM", "WINDOW", "Y", "2nd", "MODE", "Del", ",", "SIN" } @@ -41,7 +41,7 @@ namespace BizHawk.MultiClient }; public static readonly Dictionary PADS = new Dictionary() { - {"NES", 4}, {"PC Engine / SuperGrafx", 5}, {"SMS / GG / SG-1000", 2} + {"NES", 4}, {"PC Engine / SuperGrafx", 5}, {"SMS / GG / SG-1000", 2}, {"TI-83", 1} }; public static string[] AtariControlList = new string[] { "Up", "Down", "Left", "Right", "Button" }; private ArrayList Labels; @@ -631,6 +631,10 @@ namespace BizHawk.MultiClient controller = Global.Config.SMSController; autoController = Global.Config.SMSAutoController; break; + case "TI-83": + ControllerImage.Image = BizHawk.MultiClient.Properties.Resources.TI83CalculatorCrop; + controller = Global.Config.TI83Controller; + break; default: return; } @@ -652,6 +656,9 @@ namespace BizHawk.MultiClient case "SMS / GG / SG-1000": IDX_CONTROLLERENABLED.Checked = ((SMSControllerTemplate)mainController[jpad]).Enabled; break; + case "TI-83": + IDX_CONTROLLERENABLED.Checked = ((TI83ControllerTemplate)mainController[jpad]).Enabled; + break; } Labels.Clear(); TextBoxes.Clear(); @@ -693,6 +700,12 @@ namespace BizHawk.MultiClient field = Global.Config.SmsReset; break; } + case "TI-83": + { + TI83ControllerTemplate obj = (TI83ControllerTemplate)controller[jpad]; + field = obj.GetType().GetField(fieldName).GetValue(obj); + break; + } } TempTextBox.SetBindings((string)field); ButtonsGroupBox.Controls.Add(TempTextBox); @@ -862,8 +875,8 @@ namespace BizHawk.MultiClient joypads = 1; if (this.Width < 690) this.Width = 690; - if (this.Height < 556) - this.Height = 556; + if (this.Height < 580) + this.Height = 580; break; case "NES": joypads = 4;