Lua Console - make Registered Lua functions hotkey F12 instead of Shift+F12, make Registered Lua Functions dialog modeless

This commit is contained in:
adelikat 2013-11-10 22:05:03 +00:00
parent 2e51e7ad4f
commit 9feb4d0871
2 changed files with 670 additions and 654 deletions

File diff suppressed because it is too large Load Diff

View File

@ -597,6 +597,10 @@ namespace BizHawk.Client.EmuHawk
{
SelectAll();
}
else if (e.KeyCode == Keys.F12 && !e.Control && !e.Alt && !e.Shift) //F12
{
showRegisteredFunctionsToolStripMenuItem_Click(null, null);
}
}
private void editScriptToolStripMenuItem_Click(object sender, EventArgs e)
@ -1248,8 +1252,20 @@ namespace BizHawk.Client.EmuHawk
{
if (LuaImp.RegisteredFunctions.Any())
{
LuaRegisteredFunctionsList dialog = new LuaRegisteredFunctionsList();
dialog.ShowDialog();
bool alreadyOpen = false;
foreach (Form form in Application.OpenForms)
{
if (form is LuaRegisteredFunctionsList)
{
alreadyOpen = true;
form.Focus();
}
}
if (!alreadyOpen)
{
new LuaRegisteredFunctionsList().Show();
}
}
}