Toogling Scripts From The Toogle Button And Menu Option Works, Double Clicking Doesn't

This commit is contained in:
Rolanmen1 2012-03-13 22:08:17 +00:00
parent 21fbe4f16e
commit ff21856389
1 changed files with 15 additions and 4 deletions

View File

@ -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);
}
}
}