Lua console - implement double click toggle
This commit is contained in:
parent
571c172bd4
commit
f802f48754
|
@ -815,6 +815,7 @@
|
|||
this.LuaListView.UseCustomBackground = true;
|
||||
this.LuaListView.ColumnClick += new BizHawk.Client.EmuHawk.InputRoll.ColumnClickEventHandler(this.LuaListView_ColumnClick);
|
||||
this.LuaListView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.LuaListView_KeyDown);
|
||||
this.LuaListView.DoubleClick += new System.EventHandler(this.LuaListView_DoubleClick);
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
|
|
|
@ -13,6 +13,7 @@ using BizHawk.Client.EmuHawk.ToolExtensions;
|
|||
using BizHawk.Client.EmuHawk.WinFormExtensions;
|
||||
using BizHawk.Common;
|
||||
using BizHawk.Emulation.Common;
|
||||
using NLua;
|
||||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
|
@ -1453,5 +1454,19 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void LuaListView_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
var index = LuaListView.CurrentCell?.RowIndex;
|
||||
if (index < LuaImp.ScriptList.Count)
|
||||
{
|
||||
var file = LuaImp.ScriptList[index.Value];
|
||||
if (!file.IsSeparator)
|
||||
{
|
||||
file.Toggle();
|
||||
UpdateDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue