Controller Config - respect autotab being off

This commit is contained in:
adelikat 2013-07-28 21:54:42 +00:00
parent 4b5d967ed4
commit 444a417712
3 changed files with 7 additions and 3 deletions

View File

@ -87,8 +87,10 @@ namespace BizHawk.MultiClient
RealConfigObject[buttons[button]] = Inputs[button].Text; RealConfigObject[buttons[button]] = Inputs[button].Text;
} }
public void LoadSettings(Dictionary<string, string> configobj, List<string> configbuttons = null, int? width = null, int? height = null) public bool Autotab = false;
public void LoadSettings(Dictionary<string, string> configobj, bool autotab, List<string> configbuttons = null, int? width = null, int? height = null)
{ {
Autotab = autotab;
if (width.HasValue && height.HasValue) if (width.HasValue && height.HasValue)
{ {
_panelSize = new Size(width.Value, height.Value); _panelSize = new Size(width.Value, height.Value);
@ -137,6 +139,7 @@ namespace BizHawk.MultiClient
x += ColumnWidth; x += ColumnWidth;
} }
InputWidget iw = new InputWidget {Location = new Point(x, y), Size = new Size(InputSize, 23), TabIndex = i}; InputWidget iw = new InputWidget {Location = new Point(x, y), Size = new Size(InputSize, 23), TabIndex = i};
iw.AutoTab = Autotab;
iw.BringToFront(); iw.BringToFront();
iw.Enter += InputWidget_Enter; iw.Enter += InputWidget_Enter;
iw.Leave += InputWidget_Leave; iw.Leave += InputWidget_Leave;

View File

@ -75,8 +75,9 @@ namespace BizHawk.MultiClient
tooltip1.AutoPopDelay = 2000; tooltip1.AutoPopDelay = 2000;
} }
public InputWidget(int maxBindings) public InputWidget(int maxBindings, bool autotab)
{ {
this.AutoTab = autotab;
this.ContextMenu = new ContextMenu(); this.ContextMenu = new ContextMenu();
this.timer.Tick += new System.EventHandler(this.Timer_Tick); this.timer.Tick += new System.EventHandler(this.Timer_Tick);
MaxBind = maxBindings; MaxBind = maxBindings;

View File

@ -43,7 +43,7 @@ namespace BizHawk.MultiClient.config
Control CreateNormalPanel(Dictionary<string, string> settings, List<string> buttons, Size size) Control CreateNormalPanel(Dictionary<string, string> settings, List<string> buttons, Size size)
{ {
var cp = new ControllerConfigPanel {Dock = DockStyle.Fill}; var cp = new ControllerConfigPanel {Dock = DockStyle.Fill};
cp.LoadSettings(settings, buttons, size.Width, size.Height); cp.LoadSettings(settings, checkBoxAutoTab.Checked, buttons, size.Width, size.Height);
return cp; return cp;
} }