Hotkeys - some ground work for showing conflicts with other hotkeys, no functional changes from this commit

This commit is contained in:
adelikat 2012-09-17 22:33:16 +00:00
parent f173aee3f4
commit 8090ac64df
1 changed files with 20 additions and 0 deletions

View File

@ -11,6 +11,8 @@ namespace BizHawk.MultiClient.tools
{
public partial class HotkeyWindow : Form
{
private List<KeyValuePair<string, string>> HotkeyMappingList = new List<KeyValuePair<string, string>>(); //A list of all button mappings and the hotkey they are assigned to
public HotkeyWindow()
{
InitializeComponent();
@ -260,6 +262,8 @@ namespace BizHawk.MultiClient.tools
private void HotkeyWindow_Load(object sender, EventArgs e)
{
HotkeyMappingList = Global.ClientControls.MappingList();
SetConflictLists();
AutoTabCheckBox.Checked = Global.Config.HotkeyConfigAutoTab;
SetAutoTab();
}
@ -270,6 +274,22 @@ namespace BizHawk.MultiClient.tools
SetAutoTab();
}
private void SetConflictLists()
{
//adelikat: TODO: set up the conflict list, but it is going to have to be updated and checked on the fly as the user changes the mappings
//for (int i = 0; i < hotkeyTabs.TabPages.Count; i++)
//{
// for (int j = 0; j < hotkeyTabs.TabPages[i].Controls.Count; j++)
// {
// if (hotkeyTabs.TabPages[i].Controls[j] is InputWidget)
// {
// InputWidget w = hotkeyTabs.TabPages[i].Controls[j] as InputWidget;
// w.SetConflictList(HotkeyMappingList);
// }
// }
//}
}
private void SetAutoTab()
{
for (int x = 0; x < hotkeyTabs.TabPages.Count; x++)