From ff218563892aa4121b08a334b9ae24b8a0039d01 Mon Sep 17 00:00:00 2001 From: Rolanmen1 Date: Tue, 13 Mar 2012 22:08:17 +0000 Subject: [PATCH] Toogling Scripts From The Toogle Button And Menu Option Works, Double Clicking Doesn't --- BizHawk.MultiClient/tools/LuaConsole.cs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/BizHawk.MultiClient/tools/LuaConsole.cs b/BizHawk.MultiClient/tools/LuaConsole.cs index 63b11cc74e..66c9793ca9 100644 --- a/BizHawk.MultiClient/tools/LuaConsole.cs +++ b/BizHawk.MultiClient/tools/LuaConsole.cs @@ -90,6 +90,13 @@ namespace BizHawk.MultiClient LoadConfigSettings(); } + private void StopScript(int x) + { + luaList[x].Enabled = false; + LuaImp.Close(); + LuaImp = new LuaImplementation(this); + } + private void StopAllScripts() { for (int x = 0; x < luaList.Count; x++) @@ -220,10 +227,14 @@ namespace BizHawk.MultiClient { for (int x = 0; x < luaList.Count; x++) { - if (luaList[x].Enabled) - { - LuaImp.DoLuaFile(luaList[x].Name); - } + if (luaList[x].Enabled) + { + LuaImp.DoLuaFile(luaList[x].Path); + } + else + { + StopScript(x); + } } }