Input Config - auto focus when drop down menus change
This commit is contained in:
parent
06b7055e4b
commit
9196e5d1ec
|
@ -192,6 +192,7 @@
|
||||||
this.Controls.Add(this.ButtonsGroupBox);
|
this.Controls.Add(this.ButtonsGroupBox);
|
||||||
this.Controls.Add(this.Cancel);
|
this.Controls.Add(this.Cancel);
|
||||||
this.Controls.Add(this.OK);
|
this.Controls.Add(this.OK);
|
||||||
|
this.DoubleBuffered = true;
|
||||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
this.MaximizeBox = false;
|
this.MaximizeBox = false;
|
||||||
this.MinimizeBox = false;
|
this.MinimizeBox = false;
|
||||||
|
|
|
@ -116,6 +116,7 @@ namespace BizHawk.MultiClient
|
||||||
}
|
}
|
||||||
Changed = true;
|
Changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateSMS(int prev)
|
private void UpdateSMS(int prev)
|
||||||
{
|
{
|
||||||
ButtonsGroupBox.Controls.Clear();
|
ButtonsGroupBox.Controls.Clear();
|
||||||
|
@ -183,6 +184,7 @@ namespace BizHawk.MultiClient
|
||||||
TempLabel.Dispose();
|
TempLabel.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DoPCE()
|
private void DoPCE()
|
||||||
{
|
{
|
||||||
Label TempLabel;
|
Label TempLabel;
|
||||||
|
@ -234,6 +236,7 @@ namespace BizHawk.MultiClient
|
||||||
}
|
}
|
||||||
Changed = true;
|
Changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdatePCE(int prev)
|
private void UpdatePCE(int prev)
|
||||||
{
|
{
|
||||||
ButtonsGroupBox.Controls.Clear();
|
ButtonsGroupBox.Controls.Clear();
|
||||||
|
@ -303,6 +306,7 @@ namespace BizHawk.MultiClient
|
||||||
TempLabel.Dispose();
|
TempLabel.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DoGen()
|
private void DoGen()
|
||||||
{
|
{
|
||||||
this.Text = ControllerStr + "Sega Genesis";
|
this.Text = ControllerStr + "Sega Genesis";
|
||||||
|
@ -581,7 +585,6 @@ namespace BizHawk.MultiClient
|
||||||
TempLabel.Dispose();
|
TempLabel.Dispose();
|
||||||
}
|
}
|
||||||
IDX_CONTROLLERENABLED.Enabled = true;
|
IDX_CONTROLLERENABLED.Enabled = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DoGameBoy()
|
private void DoGameBoy()
|
||||||
|
@ -618,6 +621,7 @@ namespace BizHawk.MultiClient
|
||||||
}
|
}
|
||||||
Changed = true;
|
Changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateGameBoy()
|
private void UpdateGameBoy()
|
||||||
{
|
{
|
||||||
ButtonsGroupBox.Controls.Clear();
|
ButtonsGroupBox.Controls.Clear();
|
||||||
|
@ -709,6 +713,7 @@ namespace BizHawk.MultiClient
|
||||||
}
|
}
|
||||||
Changed = true;
|
Changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateNES(int prev)
|
private void UpdateNES(int prev)
|
||||||
{
|
{
|
||||||
ButtonsGroupBox.Controls.Clear();
|
ButtonsGroupBox.Controls.Clear();
|
||||||
|
@ -780,6 +785,7 @@ namespace BizHawk.MultiClient
|
||||||
TempLabel.Dispose();
|
TempLabel.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InputConfig_Load(object sender, EventArgs e)
|
private void InputConfig_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
AutoTab.Checked = Global.Config.InputConfigAutoTab;
|
AutoTab.Checked = Global.Config.InputConfigAutoTab;
|
||||||
|
@ -789,6 +795,7 @@ namespace BizHawk.MultiClient
|
||||||
AllowLR.Checked = Global.Config.AllowUD_LR;
|
AllowLR.Checked = Global.Config.AllowUD_LR;
|
||||||
|
|
||||||
if (Global.Game != null)
|
if (Global.Game != null)
|
||||||
|
{
|
||||||
switch (Global.Game.System)
|
switch (Global.Game.System)
|
||||||
{
|
{
|
||||||
case "SMS":
|
case "SMS":
|
||||||
|
@ -809,7 +816,6 @@ namespace BizHawk.MultiClient
|
||||||
case "TI83":
|
case "TI83":
|
||||||
this.SystemComboBox.SelectedIndex = SystemComboBox.Items.IndexOf("TI-83");
|
this.SystemComboBox.SelectedIndex = SystemComboBox.Items.IndexOf("TI-83");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "NES":
|
case "NES":
|
||||||
this.SystemComboBox.SelectedIndex = SystemComboBox.Items.IndexOf("NES");
|
this.SystemComboBox.SelectedIndex = SystemComboBox.Items.IndexOf("NES");
|
||||||
break;
|
break;
|
||||||
|
@ -817,7 +823,9 @@ namespace BizHawk.MultiClient
|
||||||
this.SystemComboBox.SelectedIndex = 0;
|
this.SystemComboBox.SelectedIndex = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OK_Click(object sender, EventArgs e)
|
private void OK_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (Changed)
|
if (Changed)
|
||||||
|
@ -889,6 +897,7 @@ namespace BizHawk.MultiClient
|
||||||
ControllComboBox.SelectedIndex = 0;
|
ControllComboBox.SelectedIndex = 0;
|
||||||
CurSelectConsole = this.SystemComboBox.SelectedItem.ToString();
|
CurSelectConsole = this.SystemComboBox.SelectedItem.ToString();
|
||||||
CurSelectController = 0;
|
CurSelectController = 0;
|
||||||
|
SetFocus();
|
||||||
}
|
}
|
||||||
private void ControllComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
private void ControllComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
@ -918,6 +927,7 @@ namespace BizHawk.MultiClient
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
CurSelectController = ControllComboBox.SelectedIndex;
|
CurSelectController = ControllComboBox.SelectedIndex;
|
||||||
|
SetFocus();
|
||||||
}
|
}
|
||||||
private void UpdateAll()
|
private void UpdateAll()
|
||||||
{
|
{
|
||||||
|
@ -951,6 +961,18 @@ namespace BizHawk.MultiClient
|
||||||
SetAutoTab();
|
SetAutoTab();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void SetFocus()
|
||||||
|
{
|
||||||
|
for (int x = 0; x < ButtonsGroupBox.Controls.Count; x++)
|
||||||
|
{
|
||||||
|
if (ButtonsGroupBox.Controls[x] is InputWidget)
|
||||||
|
{
|
||||||
|
ButtonsGroupBox.Controls[x].Focus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void SetAutoTab()
|
private void SetAutoTab()
|
||||||
{
|
{
|
||||||
for (int x = 0; x < ButtonsGroupBox.Controls.Count; x++)
|
for (int x = 0; x < ButtonsGroupBox.Controls.Count; x++)
|
||||||
|
|
Loading…
Reference in New Issue