Controller Config - auto tab checkbox
This commit is contained in:
parent
f50933b914
commit
bde940ad0b
File diff suppressed because it is too large
Load Diff
|
@ -119,15 +119,15 @@ namespace BizHawk.MultiClient
|
|||
COLAutofire2Panel.ColumnWidth = 170;
|
||||
COLAutofire2Panel.LoadSettings(Global.Config.ColecoAutoController[1]);
|
||||
|
||||
SetAutoTab(true);
|
||||
|
||||
|
||||
SetTabByPlatform();
|
||||
|
||||
if (!Global.MainForm.INTERIM)
|
||||
{
|
||||
PlatformTabControl.Controls.Remove(tabPageC64);
|
||||
}
|
||||
|
||||
AutoTab.Checked = Global.Config.InputConfigAutoTab;
|
||||
SetAutoTab();
|
||||
}
|
||||
|
||||
private void SetTabByPlatform()
|
||||
|
@ -186,29 +186,47 @@ namespace BizHawk.MultiClient
|
|||
//Input.Instance.EnableIgnoreModifiers = false;
|
||||
}
|
||||
|
||||
private void SetAutoTab(bool setting)
|
||||
private void SetAutoTab()
|
||||
{
|
||||
bool setting = AutoTab.Checked;
|
||||
foreach (Control control1 in PlatformTabControl.TabPages)
|
||||
{
|
||||
if (control1 is TabControl)
|
||||
if (control1 is TabPage)
|
||||
{
|
||||
foreach (Control control2 in (control1 as TabControl).TabPages)
|
||||
foreach (Control control2 in control1.Controls)
|
||||
{
|
||||
if (control2 is InputWidget)
|
||||
if (control2 is ControllerConfigPanel)
|
||||
{
|
||||
(control2 as InputWidget).AutoTab = setting;
|
||||
(control2 as ControllerConfigPanel).SetAutoTab(setting);
|
||||
}
|
||||
else if (control2 is TabControl)
|
||||
{
|
||||
foreach (Control control3 in (control2 as TabControl).TabPages)
|
||||
{
|
||||
if (control3 is TabPage)
|
||||
{
|
||||
foreach (Control control4 in control3.Controls)
|
||||
{
|
||||
if (control4 is ControllerConfigPanel)
|
||||
{
|
||||
(control4 as ControllerConfigPanel).SetAutoTab(setting);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (control3 is ControllerConfigPanel)
|
||||
{
|
||||
if (control1 is InputWidget)
|
||||
{
|
||||
(control1 as InputWidget).AutoTab = setting;
|
||||
(control3 as ControllerConfigPanel).SetAutoTab(setting);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (control1 is ControllerConfigPanel)
|
||||
{
|
||||
(control1 as ControllerConfigPanel).SetAutoTab(setting);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OK_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
@ -265,5 +283,11 @@ namespace BizHawk.MultiClient
|
|||
Global.OSD.AddMessage("Controller config aborted");
|
||||
Close();
|
||||
}
|
||||
|
||||
private void AutoTab_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config.HotkeyConfigAutoTab = AutoTab.Checked;
|
||||
SetAutoTab();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,5 +118,13 @@ namespace BizHawk.MultiClient
|
|||
Labels.Add(l);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetAutoTab(bool value)
|
||||
{
|
||||
foreach (InputWidget i in Inputs)
|
||||
{
|
||||
i.AutoTab = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue