Rename all "new" config dialogs to their correct names
This commit is contained in:
parent
b299430408
commit
8557c96758
|
@ -167,6 +167,12 @@
|
|||
<Compile Include="config\AutofireConfig.Designer.cs">
|
||||
<DependentUpon>AutofireConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="config\ControllerConfig.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="config\ControllerConfig.Designer.cs">
|
||||
<DependentUpon>ControllerConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="config\ControllerConfig\AnalogBindControl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
|
@ -194,6 +200,12 @@
|
|||
<Compile Include="config\GifAnimator.Designer.cs">
|
||||
<DependentUpon>GifAnimator.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="config\HotkeyConfig.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="config\HotkeyConfig.Designer.cs">
|
||||
<DependentUpon>HotkeyConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="config\InputWidget.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
|
@ -203,17 +215,11 @@
|
|||
<Compile Include="config\MessageConfig.Designer.cs">
|
||||
<DependentUpon>MessageConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="config\NewControllerConfig.cs">
|
||||
<Compile Include="config\PathConfig.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="config\NewControllerConfig.Designer.cs">
|
||||
<DependentUpon>NewControllerConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="config\NewHotkeyWindow.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="config\NewHotkeyWindow.Designer.cs">
|
||||
<DependentUpon>NewHotkeyWindow.cs</DependentUpon>
|
||||
<Compile Include="config\PathConfig.Designer.cs">
|
||||
<DependentUpon>PathConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="config\PathInfo.cs">
|
||||
<SubType>Form</SubType>
|
||||
|
@ -317,12 +323,6 @@
|
|||
<Compile Include="NameStateForm.Designer.cs">
|
||||
<DependentUpon>NameStateForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="config\NewPathConfig.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="config\NewPathConfig.Designer.cs">
|
||||
<DependentUpon>NewPathConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="tools\Cheats\Cheat.cs" />
|
||||
|
@ -573,7 +573,9 @@
|
|||
<DependentUpon>SNESOptions.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\StateVisualizer.cs" />
|
||||
<Compile Include="tools\TI83\TI83KeyPad.cs" />
|
||||
<Compile Include="tools\TI83\TI83KeyPad.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\TI83\TI83KeyPad.Designer.cs">
|
||||
<DependentUpon>TI83KeyPad.cs</DependentUpon>
|
||||
</Compile>
|
||||
|
@ -725,6 +727,9 @@
|
|||
<EmbeddedResource Include="AVOut\VideoWriterChooserForm.resx">
|
||||
<DependentUpon>VideoWriterChooserForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="config\ControllerConfig.resx">
|
||||
<DependentUpon>ControllerConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="config\ControllerConfig\AnalogBindControl.resx">
|
||||
<DependentUpon>AnalogBindControl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
@ -737,11 +742,11 @@
|
|||
<EmbeddedResource Include="config\GifAnimator.resx">
|
||||
<DependentUpon>GifAnimator.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="config\NewControllerConfig.resx">
|
||||
<DependentUpon>NewControllerConfig.cs</DependentUpon>
|
||||
<EmbeddedResource Include="config\HotkeyConfig.resx">
|
||||
<DependentUpon>HotkeyConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="config\NewHotkeyWindow.resx">
|
||||
<DependentUpon>NewHotkeyWindow.cs</DependentUpon>
|
||||
<EmbeddedResource Include="config\PathConfig.resx">
|
||||
<DependentUpon>PathConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="config\PathInfo.resx">
|
||||
<DependentUpon>PathInfo.cs</DependentUpon>
|
||||
|
@ -763,9 +768,6 @@
|
|||
<DependentUpon>NameStateForm.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="config\NewPathConfig.resx">
|
||||
<DependentUpon>NewPathConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
|
|
|
@ -169,6 +169,12 @@
|
|||
<Compile Include="config\AutofireConfig.Designer.cs">
|
||||
<DependentUpon>AutofireConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="config\ControllerConfig.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="config\ControllerConfig.Designer.cs">
|
||||
<DependentUpon>ControllerConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="config\ControllerConfig\AnalogBindControl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
|
@ -196,6 +202,12 @@
|
|||
<Compile Include="config\GifAnimator.Designer.cs">
|
||||
<DependentUpon>GifAnimator.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="config\HotkeyConfig.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="config\HotkeyConfig.Designer.cs">
|
||||
<DependentUpon>HotkeyConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="config\InputWidget.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
|
@ -205,23 +217,11 @@
|
|||
<Compile Include="config\MessageConfig.Designer.cs">
|
||||
<DependentUpon>MessageConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="config\NewControllerConfig.cs">
|
||||
<Compile Include="config\PathConfig.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="config\NewControllerConfig.Designer.cs">
|
||||
<DependentUpon>NewControllerConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="config\NewHotkeyWindow.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="config\NewHotkeyWindow.Designer.cs">
|
||||
<DependentUpon>NewHotkeyWindow.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="config\NewPathConfig.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="config\NewPathConfig.Designer.cs">
|
||||
<DependentUpon>NewPathConfig.cs</DependentUpon>
|
||||
<Compile Include="config\PathConfig.Designer.cs">
|
||||
<DependentUpon>PathConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="config\PathInfo.cs">
|
||||
<SubType>Form</SubType>
|
||||
|
@ -575,7 +575,9 @@
|
|||
<DependentUpon>SNESOptions.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\StateVisualizer.cs" />
|
||||
<Compile Include="tools\TI83\TI83KeyPad.cs" />
|
||||
<Compile Include="tools\TI83\TI83KeyPad.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\TI83\TI83KeyPad.Designer.cs">
|
||||
<DependentUpon>TI83KeyPad.cs</DependentUpon>
|
||||
</Compile>
|
||||
|
@ -727,6 +729,9 @@
|
|||
<EmbeddedResource Include="AVOut\VideoWriterChooserForm.resx">
|
||||
<DependentUpon>VideoWriterChooserForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="config\ControllerConfig.resx">
|
||||
<DependentUpon>ControllerConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="config\ControllerConfig\AnalogBindControl.resx">
|
||||
<DependentUpon>AnalogBindControl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
@ -739,14 +744,11 @@
|
|||
<EmbeddedResource Include="config\GifAnimator.resx">
|
||||
<DependentUpon>GifAnimator.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="config\NewControllerConfig.resx">
|
||||
<DependentUpon>NewControllerConfig.cs</DependentUpon>
|
||||
<EmbeddedResource Include="config\HotkeyConfig.resx">
|
||||
<DependentUpon>HotkeyConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="config\NewHotkeyWindow.resx">
|
||||
<DependentUpon>NewHotkeyWindow.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="config\NewPathConfig.resx">
|
||||
<DependentUpon>NewPathConfig.cs</DependentUpon>
|
||||
<EmbeddedResource Include="config\PathConfig.resx">
|
||||
<DependentUpon>PathConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="config\PathInfo.resx">
|
||||
<DependentUpon>PathInfo.cs</DependentUpon>
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
public Config()
|
||||
{
|
||||
config.NewControllerConfig.ConfigCheckAllControlDefaults(this);
|
||||
ControllerConfig.ConfigCheckAllControlDefaults(this);
|
||||
}
|
||||
|
||||
public void ResolveDefaults()
|
||||
|
|
|
@ -439,7 +439,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void OpenControllerConfig()
|
||||
{
|
||||
config.NewControllerConfig c = new config.NewControllerConfig(Global.Emulator.ControllerDefinition);
|
||||
ControllerConfig c = new ControllerConfig(Global.Emulator.ControllerDefinition);
|
||||
c.ShowDialog();
|
||||
if (c.DialogResult == DialogResult.OK)
|
||||
{
|
||||
|
@ -455,7 +455,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void OpenHotkeyDialog()
|
||||
{
|
||||
NewHotkeyWindow h = new NewHotkeyWindow();
|
||||
HotkeyConfig h = new HotkeyConfig();
|
||||
h.ShowDialog();
|
||||
if (h.DialogResult == DialogResult.OK)
|
||||
{
|
||||
|
@ -691,7 +691,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void pathsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
new NewPathConfig().ShowDialog();
|
||||
new PathConfig().ShowDialog();
|
||||
}
|
||||
|
||||
private void displayRerecordCountToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -2330,7 +2330,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void pathsToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
new NewPathConfig().ShowDialog();
|
||||
new PathConfig().ShowDialog();
|
||||
}
|
||||
|
||||
private void soundToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -1785,9 +1785,9 @@ namespace BizHawk.MultiClient
|
|||
|
||||
//modals that need to capture input for binding purposes get input, of course
|
||||
//if (ActiveForm is HotkeyWindow) return true;
|
||||
if (ActiveForm is NewHotkeyWindow) return true;
|
||||
if (ActiveForm is HotkeyConfig) return true;
|
||||
//if (ActiveForm is ControllerConfig) return true;
|
||||
if (ActiveForm is config.NewControllerConfig) return true;
|
||||
if (ActiveForm is ControllerConfig) return true;
|
||||
if (ActiveForm is TAStudio) return true;
|
||||
if (ActiveForm is VirtualPadForm) return true;
|
||||
//if no form is active on this process, then the background input setting applies
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
namespace BizHawk.MultiClient.config
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
partial class NewControllerConfig
|
||||
partial class ControllerConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
|
@ -28,7 +28,7 @@
|
|||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NewControllerConfig));
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ControllerConfig));
|
||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
|
@ -3,42 +3,41 @@ using System.Collections.Generic;
|
|||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using BizHawk.MultiClient.config.ControllerConfig;
|
||||
|
||||
namespace BizHawk.MultiClient.config
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class NewControllerConfig : Form
|
||||
public partial class ControllerConfig : Form
|
||||
{
|
||||
static readonly Dictionary<string, Bitmap> ControllerImages = new Dictionary<string, Bitmap>();
|
||||
static NewControllerConfig()
|
||||
static ControllerConfig()
|
||||
{
|
||||
ControllerImages.Add("NES Controller", Properties.Resources.NES_Controller);
|
||||
ControllerImages.Add("SNES Controller", Properties.Resources.SNES_Controller);
|
||||
ControllerImages.Add("Nintento 64 Controller", Properties.Resources.N64);
|
||||
ControllerImages.Add("Gameboy Controller", Properties.Resources.GBController);
|
||||
ControllerImages.Add("GBA Controller", Properties.Resources.GBA_Controller);
|
||||
ControllerImages.Add("Dual Gameboy Controller", Properties.Resources.GBController);
|
||||
ControllerImages.Add("SNES Controller", Properties.Resources.SNES_Controller);
|
||||
ControllerImages.Add("Nintento 64 Controller", Properties.Resources.N64);
|
||||
ControllerImages.Add("Gameboy Controller", Properties.Resources.GBController);
|
||||
ControllerImages.Add("GBA Controller", Properties.Resources.GBA_Controller);
|
||||
ControllerImages.Add("Dual Gameboy Controller", Properties.Resources.GBController);
|
||||
|
||||
ControllerImages.Add("SMS Controller", Properties.Resources.SMSController);
|
||||
ControllerImages.Add("Genesis 3-Button Controller", Properties.Resources.GENController);
|
||||
ControllerImages.Add("Saturn Controller", Properties.Resources.SaturnController);
|
||||
ControllerImages.Add("SMS Controller", Properties.Resources.SMSController);
|
||||
ControllerImages.Add("Genesis 3-Button Controller", Properties.Resources.GENController);
|
||||
ControllerImages.Add("Saturn Controller", Properties.Resources.SaturnController);
|
||||
|
||||
ControllerImages.Add("Intellivision Controller", Properties.Resources.IntVController);
|
||||
ControllerImages.Add("ColecoVision Basic Controller", Properties.Resources.colecovisioncontroller);
|
||||
ControllerImages.Add("Atari 2600 Basic Controller", Properties.Resources.atari_controller);
|
||||
ControllerImages.Add("Atari 7800 ProLine Joystick Controller", Properties.Resources.A78Joystick);
|
||||
ControllerImages.Add("Intellivision Controller", Properties.Resources.IntVController);
|
||||
ControllerImages.Add("ColecoVision Basic Controller", Properties.Resources.colecovisioncontroller);
|
||||
ControllerImages.Add("Atari 2600 Basic Controller", Properties.Resources.atari_controller);
|
||||
ControllerImages.Add("Atari 7800 ProLine Joystick Controller", Properties.Resources.A78Joystick);
|
||||
|
||||
ControllerImages.Add("PC Engine Controller", Properties.Resources.PCEngineController);
|
||||
ControllerImages.Add("PC Engine Controller", Properties.Resources.PCEngineController);
|
||||
ControllerImages.Add("Commodore 64 Controller", Properties.Resources.C64Joystick);
|
||||
ControllerImages.Add("TI83 Controller", Properties.Resources.TI83_Controller);
|
||||
ControllerImages.Add("TI83 Controller", Properties.Resources.TI83_Controller);
|
||||
|
||||
//ControllerImages.Add("PSP Controller", Properties.Resources); //TODO
|
||||
//ControllerImages.Add("PSP Controller", Properties.Resources); //TODO
|
||||
}
|
||||
|
||||
const int MAXPLAYERS = 8;
|
||||
string ControllerType;
|
||||
|
||||
private NewControllerConfig()
|
||||
private ControllerConfig()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
@ -47,7 +46,7 @@ namespace BizHawk.MultiClient.config
|
|||
|
||||
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, checkBoxAutoTab.Checked, buttons, size.Width, size.Height);
|
||||
return cp;
|
||||
}
|
||||
|
@ -102,7 +101,7 @@ namespace BizHawk.MultiClient.config
|
|||
else
|
||||
{
|
||||
// create multiple player tabs
|
||||
var tt = new TabControl {Dock = DockStyle.Fill};
|
||||
var tt = new TabControl { Dock = DockStyle.Fill };
|
||||
dest.Controls.Add(tt);
|
||||
int pageidx = 0;
|
||||
for (int i = 1; i <= MAXPLAYERS; i++)
|
||||
|
@ -131,8 +130,8 @@ namespace BizHawk.MultiClient.config
|
|||
}
|
||||
|
||||
private ControllerDefinition the_definition;
|
||||
|
||||
public NewControllerConfig(ControllerDefinition def)
|
||||
|
||||
public ControllerConfig(ControllerDefinition def)
|
||||
: this()
|
||||
{
|
||||
the_definition = def;
|
||||
|
@ -186,22 +185,22 @@ namespace BizHawk.MultiClient.config
|
|||
pictureBox1.Size = bmp.Size;
|
||||
tableLayoutPanel1.ColumnStyles[1].Width = bmp.Width;
|
||||
|
||||
//Uberhack
|
||||
if (ControlName == "Commodore 64 Controller")
|
||||
{
|
||||
PictureBox pictureBox2 = new PictureBox();
|
||||
pictureBox2.Image = Properties.Resources.C64Keyboard;
|
||||
pictureBox2.Size = Properties.Resources.C64Keyboard.Size;
|
||||
tableLayoutPanel1.ColumnStyles[1].Width = Properties.Resources.C64Keyboard.Width;
|
||||
pictureBox1.Height /= 2;
|
||||
pictureBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
pictureBox1.Dock = DockStyle.Top;
|
||||
pictureBox2.Location = new Point(pictureBox1.Location.X, pictureBox1.Location.Y + pictureBox1.Size.Height + 10);
|
||||
tableLayoutPanel1.Controls.Add(pictureBox2, 1, 0);
|
||||
//Uberhack
|
||||
if (ControlName == "Commodore 64 Controller")
|
||||
{
|
||||
PictureBox pictureBox2 = new PictureBox();
|
||||
pictureBox2.Image = Properties.Resources.C64Keyboard;
|
||||
pictureBox2.Size = Properties.Resources.C64Keyboard.Size;
|
||||
tableLayoutPanel1.ColumnStyles[1].Width = Properties.Resources.C64Keyboard.Width;
|
||||
pictureBox1.Height /= 2;
|
||||
pictureBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
pictureBox1.Dock = DockStyle.Top;
|
||||
pictureBox2.Location = new Point(pictureBox1.Location.X, pictureBox1.Location.Y + pictureBox1.Size.Height + 10);
|
||||
tableLayoutPanel1.Controls.Add(pictureBox2, 1, 0);
|
||||
|
||||
|
||||
pictureBox2.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom;
|
||||
}
|
||||
|
||||
pictureBox2.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom;
|
||||
}
|
||||
}
|
||||
|
||||
// lazy methods, but they're not called often and actually
|
||||
|
@ -279,40 +278,40 @@ namespace BizHawk.MultiClient.config
|
|||
get { return PathManager.MakeProgramRelativePath("defctrl.json"); }
|
||||
}
|
||||
|
||||
private TabControl GetTabControl(System.Windows.Forms.Control.ControlCollection controls)
|
||||
{
|
||||
if (controls != null)
|
||||
{
|
||||
foreach (Control c in controls)
|
||||
{
|
||||
if (c is TabControl)
|
||||
{
|
||||
return (c as TabControl);
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
private TabControl GetTabControl(System.Windows.Forms.Control.ControlCollection controls)
|
||||
{
|
||||
if (controls != null)
|
||||
{
|
||||
foreach (Control c in controls)
|
||||
{
|
||||
if (c is TabControl)
|
||||
{
|
||||
return (c as TabControl);
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void buttonLoadDefaults_Click(object sender, EventArgs e)
|
||||
{
|
||||
tabControl1.SuspendLayout();
|
||||
tabControl1.SuspendLayout();
|
||||
|
||||
string wasTabbedMain = tabControl1.SelectedTab.Name;
|
||||
TabControl tb1 = GetTabControl(tabPage1.Controls ?? null);
|
||||
TabControl tb2 = GetTabControl(tabPage2.Controls ?? null);
|
||||
TabControl tb3 = GetTabControl(tabPage3.Controls ?? null);
|
||||
int? wasTabbedPage1 = null;
|
||||
int? wasTabbedPage2 = null;
|
||||
int? wasTabbedPage3 = null;
|
||||
string wasTabbedMain = tabControl1.SelectedTab.Name;
|
||||
TabControl tb1 = GetTabControl(tabPage1.Controls ?? null);
|
||||
TabControl tb2 = GetTabControl(tabPage2.Controls ?? null);
|
||||
TabControl tb3 = GetTabControl(tabPage3.Controls ?? null);
|
||||
int? wasTabbedPage1 = null;
|
||||
int? wasTabbedPage2 = null;
|
||||
int? wasTabbedPage3 = null;
|
||||
|
||||
if (tb1 != null && tb1.SelectedTab != null) { wasTabbedPage1 = tb1.SelectedIndex; }
|
||||
if (tb2 != null && tb2.SelectedTab != null) { wasTabbedPage2 = tb2.SelectedIndex; }
|
||||
if (tb3 != null && tb3.SelectedTab != null) { wasTabbedPage2 = tb3.SelectedIndex; }
|
||||
if (tb1 != null && tb1.SelectedTab != null) { wasTabbedPage1 = tb1.SelectedIndex; }
|
||||
if (tb2 != null && tb2.SelectedTab != null) { wasTabbedPage2 = tb2.SelectedIndex; }
|
||||
if (tb3 != null && tb3.SelectedTab != null) { wasTabbedPage2 = tb3.SelectedIndex; }
|
||||
|
||||
tabPage1.Controls.Clear();
|
||||
tabPage2.Controls.Clear();
|
||||
tabPage3.Controls.Clear();
|
||||
tabPage1.Controls.Clear();
|
||||
tabPage2.Controls.Clear();
|
||||
tabPage3.Controls.Clear();
|
||||
|
||||
// load panels directly from the default config.
|
||||
// this means that the changes are NOT committed. so "Cancel" works right and you
|
||||
|
@ -321,36 +320,36 @@ namespace BizHawk.MultiClient.config
|
|||
cd = ConfigService.Load(ControlDefaultPath, cd);
|
||||
LoadPanels(cd);
|
||||
|
||||
tabControl1.SelectTab(wasTabbedMain);
|
||||
tabControl1.SelectTab(wasTabbedMain);
|
||||
|
||||
if (wasTabbedPage1.HasValue)
|
||||
{
|
||||
TabControl newTb1 = GetTabControl(tabPage1.Controls ?? null);
|
||||
if (newTb1 != null)
|
||||
{
|
||||
newTb1.SelectTab(wasTabbedPage1.Value);
|
||||
}
|
||||
}
|
||||
if (wasTabbedPage1.HasValue)
|
||||
{
|
||||
TabControl newTb1 = GetTabControl(tabPage1.Controls ?? null);
|
||||
if (newTb1 != null)
|
||||
{
|
||||
newTb1.SelectTab(wasTabbedPage1.Value);
|
||||
}
|
||||
}
|
||||
|
||||
if (wasTabbedPage2.HasValue)
|
||||
{
|
||||
TabControl newTb2 = GetTabControl(tabPage2.Controls ?? null);
|
||||
if (newTb2 != null)
|
||||
{
|
||||
newTb2.SelectTab(wasTabbedPage2.Value);
|
||||
}
|
||||
}
|
||||
if (wasTabbedPage2.HasValue)
|
||||
{
|
||||
TabControl newTb2 = GetTabControl(tabPage2.Controls ?? null);
|
||||
if (newTb2 != null)
|
||||
{
|
||||
newTb2.SelectTab(wasTabbedPage2.Value);
|
||||
}
|
||||
}
|
||||
|
||||
if (wasTabbedPage3.HasValue)
|
||||
{
|
||||
TabControl newTb3 = GetTabControl(tabPage3.Controls ?? null);
|
||||
if (newTb3 != null)
|
||||
{
|
||||
newTb3.SelectTab(wasTabbedPage3.Value);
|
||||
}
|
||||
}
|
||||
if (wasTabbedPage3.HasValue)
|
||||
{
|
||||
TabControl newTb3 = GetTabControl(tabPage3.Controls ?? null);
|
||||
if (newTb3 != null)
|
||||
{
|
||||
newTb3.SelectTab(wasTabbedPage3.Value);
|
||||
}
|
||||
}
|
||||
|
||||
tabControl1.ResumeLayout();
|
||||
tabControl1.ResumeLayout();
|
||||
}
|
||||
|
||||
class ControlDefaults
|
|
@ -1,4 +1,4 @@
|
|||
namespace BizHawk.MultiClient.config.ControllerConfig
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
partial class AnalogBindControl
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace BizHawk.MultiClient.config.ControllerConfig
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class AnalogBindControl : UserControl
|
||||
{
|
||||
|
|
|
@ -5,7 +5,7 @@ using System.Text;
|
|||
using System.Windows.Forms;
|
||||
using System.Drawing;
|
||||
|
||||
namespace BizHawk.MultiClient.config.ControllerConfig
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
class AnalogBindPanel : UserControl
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
namespace BizHawk.MultiClient
|
||||
{
|
||||
partial class NewHotkeyWindow
|
||||
partial class HotkeyConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
|
@ -28,7 +28,7 @@
|
|||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NewHotkeyWindow));
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HotkeyConfig));
|
||||
this.label38 = new System.Windows.Forms.Label();
|
||||
this.AutoTabCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.HotkeyTabControl = new System.Windows.Forms.TabControl();
|
|
@ -9,22 +9,22 @@ using System.Windows.Forms;
|
|||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class NewHotkeyWindow : Form
|
||||
public partial class HotkeyConfig : Form
|
||||
{
|
||||
public NewHotkeyWindow()
|
||||
public HotkeyConfig()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void NewHotkeyWindow_Load(object sender, EventArgs e)
|
||||
{
|
||||
AutoCompleteStringCollection source = new AutoCompleteStringCollection();
|
||||
source.AddRange(Global.Config.HotkeyBindings.Select(x => x.DisplayName).ToArray());
|
||||
AutoCompleteStringCollection source = new AutoCompleteStringCollection();
|
||||
source.AddRange(Global.Config.HotkeyBindings.Select(x => x.DisplayName).ToArray());
|
||||
|
||||
SearchBox.AutoCompleteCustomSource = source;
|
||||
SearchBox.AutoCompleteSource = AutoCompleteSource.CustomSource;
|
||||
SearchBox.AutoCompleteCustomSource = source;
|
||||
SearchBox.AutoCompleteSource = AutoCompleteSource.CustomSource;
|
||||
|
||||
AutoTabCheckBox.Checked = Global.Config.HotkeyConfigAutoTab;
|
||||
AutoTabCheckBox.Checked = Global.Config.HotkeyConfigAutoTab;
|
||||
DoTabs();
|
||||
DoFocus();
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
Global.Config.HotkeyConfigAutoTab = AutoTabCheckBox.Checked;
|
||||
|
||||
foreach(InputWidget w in _inputWidgets)
|
||||
foreach (InputWidget w in _inputWidgets)
|
||||
{
|
||||
Binding b = Global.Config.HotkeyBindings.FirstOrDefault(x => x.DisplayName == w.WidgetName);
|
||||
b.Bindings = w.Text;
|
||||
|
@ -114,7 +114,7 @@ namespace BizHawk.MultiClient
|
|||
InputWidget w = new InputWidget()
|
||||
{
|
||||
Bindings = b.Bindings,
|
||||
Location = new Point(_x + iw_offset_x , _y + iw_offset_y),
|
||||
Location = new Point(_x + iw_offset_x, _y + iw_offset_y),
|
||||
AutoTab = AutoTabCheckBox.Checked,
|
||||
Width = iw_width,
|
||||
WidgetName = b.DisplayName,
|
||||
|
@ -172,29 +172,29 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
}
|
||||
|
||||
private void SearchBox_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
//Tab or Enter
|
||||
if (!e.Control && !e.Alt && !e.Shift &&
|
||||
(e.KeyCode == Keys.Enter || e.KeyCode == Keys.Tab))
|
||||
{
|
||||
string user_selection = SearchBox.Text;
|
||||
private void SearchBox_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
//Tab or Enter
|
||||
if (!e.Control && !e.Alt && !e.Shift &&
|
||||
(e.KeyCode == Keys.Enter || e.KeyCode == Keys.Tab))
|
||||
{
|
||||
string user_selection = SearchBox.Text;
|
||||
|
||||
Binding b = Global.Config.HotkeyBindings.FirstOrDefault(x => x.DisplayName == SearchBox.Text);
|
||||
Binding b = Global.Config.HotkeyBindings.FirstOrDefault(x => x.DisplayName == SearchBox.Text);
|
||||
|
||||
//Found
|
||||
if (b != null)
|
||||
{
|
||||
InputWidget w = _inputWidgets.FirstOrDefault(x => x.WidgetName == b.DisplayName);
|
||||
if (w != null)
|
||||
{
|
||||
HotkeyTabControl.SelectTab((w.Parent as TabPage));
|
||||
w.Focus();
|
||||
}
|
||||
}
|
||||
//Found
|
||||
if (b != null)
|
||||
{
|
||||
InputWidget w = _inputWidgets.FirstOrDefault(x => x.WidgetName == b.DisplayName);
|
||||
if (w != null)
|
||||
{
|
||||
HotkeyTabControl.SelectTab((w.Parent as TabPage));
|
||||
w.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
namespace BizHawk.MultiClient
|
||||
{
|
||||
partial class NewPathConfig
|
||||
partial class PathConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
|
@ -9,7 +9,7 @@ using System.Windows.Forms;
|
|||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class NewPathConfig : Form
|
||||
public partial class PathConfig : Form
|
||||
{
|
||||
//All path text boxes should do some kind of error checking
|
||||
//config path under base, config will default to %exe%
|
||||
|
@ -42,7 +42,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
}
|
||||
|
||||
public NewPathConfig()
|
||||
public PathConfig()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
Loading…
Reference in New Issue