Lua console - remove bad user option (defaulted to true even) that clears all registered functions on toggle, toggle already clears all registered functions registered to the script. If there is some edge case there, we need to fix it, not clear registered funcitons that don't even belong to the given script
This commit is contained in:
parent
7a95fa543d
commit
263a72f57d
|
@ -399,7 +399,6 @@ namespace BizHawk.Client.Common
|
|||
public RecentFiles RecentLuaSession = new RecentFiles(8);
|
||||
public bool DisableLuaScriptsOnLoad = false;
|
||||
public bool ToggleAllIfNoneSelected = true;
|
||||
public bool RemoveRegisteredFunctionsOnToggle = true;
|
||||
public bool LuaReloadOnScriptFileChange = false;
|
||||
public bool RunLuaDuringTurbo = true;
|
||||
|
||||
|
|
|
@ -71,7 +71,6 @@
|
|||
this.SettingsSubMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.DisableScriptsOnLoadMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.ReturnAllIfNoneSelectedMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.RemoveRegisteredFunctionsOnToggleMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.ReloadWhenScriptFileChangesMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.RegisterToTextEditorsSubMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
|
@ -462,7 +461,6 @@
|
|||
this.SettingsSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.DisableScriptsOnLoadMenuItem,
|
||||
this.ReturnAllIfNoneSelectedMenuItem,
|
||||
this.RemoveRegisteredFunctionsOnToggleMenuItem,
|
||||
this.ReloadWhenScriptFileChangesMenuItem,
|
||||
this.toolStripSeparator4,
|
||||
this.RegisterToTextEditorsSubMenu});
|
||||
|
@ -485,13 +483,6 @@
|
|||
this.ReturnAllIfNoneSelectedMenuItem.Text = "Toggle All if None Selected";
|
||||
this.ReturnAllIfNoneSelectedMenuItem.Click += new System.EventHandler(this.ToggleAllIfNoneSelectedMenuItem_Click);
|
||||
//
|
||||
// RemoveRegisteredFunctionsOnToggleMenuItem
|
||||
//
|
||||
this.RemoveRegisteredFunctionsOnToggleMenuItem.Name = "RemoveRegisteredFunctionsOnToggleMenuItem";
|
||||
this.RemoveRegisteredFunctionsOnToggleMenuItem.Size = new System.Drawing.Size(285, 22);
|
||||
this.RemoveRegisteredFunctionsOnToggleMenuItem.Text = "Remove Registered Functions on Toggle";
|
||||
this.RemoveRegisteredFunctionsOnToggleMenuItem.Click += new System.EventHandler(this.RemoveRegisteredFunctionsOnToggleMenuItem_Click);
|
||||
//
|
||||
// ReloadWhenScriptFileChangesMenuItem
|
||||
//
|
||||
this.ReloadWhenScriptFileChangesMenuItem.Name = "ReloadWhenScriptFileChangesMenuItem";
|
||||
|
@ -966,9 +957,8 @@
|
|||
private System.Windows.Forms.ToolStripButton DuplicateToolbarButton;
|
||||
private System.Windows.Forms.ToolStripMenuItem DuplicateScriptMenuItem;
|
||||
private System.Windows.Forms.TextBox InputBox;
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.ToolStripMenuItem ReturnAllIfNoneSelectedMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem RemoveRegisteredFunctionsOnToggleMenuItem;
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.ToolStripMenuItem ReturnAllIfNoneSelectedMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem ReloadWhenScriptFileChangesMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
|
||||
private System.Windows.Forms.ToolStripMenuItem RegisterToTextEditorsSubMenu;
|
||||
|
|
|
@ -1054,7 +1054,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
DisableScriptsOnLoadMenuItem.Checked = Global.Config.DisableLuaScriptsOnLoad;
|
||||
ReturnAllIfNoneSelectedMenuItem.Checked = Global.Config.ToggleAllIfNoneSelected;
|
||||
RemoveRegisteredFunctionsOnToggleMenuItem.Checked = Global.Config.RemoveRegisteredFunctionsOnToggle;
|
||||
ReloadWhenScriptFileChangesMenuItem.Checked = Global.Config.LuaReloadOnScriptFileChange;
|
||||
}
|
||||
|
||||
|
@ -1068,11 +1067,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
Global.Config.ToggleAllIfNoneSelected ^= true;
|
||||
}
|
||||
|
||||
private void RemoveRegisteredFunctionsOnToggleMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config.RemoveRegisteredFunctionsOnToggle ^= true;
|
||||
}
|
||||
|
||||
private void ReloadWhenScriptFileChangesMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config.LuaReloadOnScriptFileChange ^= true;
|
||||
|
@ -1485,10 +1479,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
LuaImp.CallExitEvent(file);
|
||||
file.Stop();
|
||||
if (Global.Config.RemoveRegisteredFunctionsOnToggle)
|
||||
{
|
||||
LuaImp.RegisteredFunctions.ClearAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue