Allow tool to be loaded from menu instead of ROM loading
This commit is contained in:
Hathor86 2015-10-17 20:44:36 +02:00
parent fa14d6965b
commit 9b46de0d3e
3 changed files with 38 additions and 20 deletions

View File

@ -205,6 +205,7 @@
this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
this.CheatsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.LuaConsoleMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.customToolToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator29 = new System.Windows.Forms.ToolStripSeparator();
this.MultiDiskBundlerFileMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.batchRunnerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -325,13 +326,13 @@
this.AppleDisksSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator31 = new System.Windows.Forms.ToolStripSeparator();
this.settingsToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.C64SubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.C64SettingsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.HelpSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.OnlineHelpMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ForumsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.FeaturesMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.AboutMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.C64SubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.C64SettingsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.MainStatusBar = new StatusStripEx();
this.DumpStatusButton = new System.Windows.Forms.ToolStripDropDownButton();
this.EmuStatus = new System.Windows.Forms.ToolStripStatusLabel();
@ -1825,6 +1826,7 @@
this.toolStripSeparator11,
this.CheatsMenuItem,
this.LuaConsoleMenuItem,
this.customToolToolStripMenuItem,
this.toolStripSeparator29,
this.MultiDiskBundlerFileMenuItem,
this.batchRunnerToolStripMenuItem});
@ -1944,6 +1946,14 @@
this.LuaConsoleMenuItem.Text = "Lua Console";
this.LuaConsoleMenuItem.Click += new System.EventHandler(this.LuaConsoleMenuItem_Click);
//
// customToolToolStripMenuItem
//
this.customToolToolStripMenuItem.Enabled = false;
this.customToolToolStripMenuItem.Name = "customToolToolStripMenuItem";
this.customToolToolStripMenuItem.Size = new System.Drawing.Size(172, 22);
this.customToolToolStripMenuItem.Text = "Custom Tool";
this.customToolToolStripMenuItem.Click += new System.EventHandler(this.CustomToolMenuItem_Click);
//
// toolStripSeparator29
//
this.toolStripSeparator29.Name = "toolStripSeparator29";
@ -2885,6 +2895,21 @@
this.settingsToolStripMenuItem1.Text = "&Settings...";
this.settingsToolStripMenuItem1.Click += new System.EventHandler(this.settingsToolStripMenuItem1_Click_1);
//
// C64SubMenu
//
this.C64SubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.C64SettingsMenuItem});
this.C64SubMenu.Name = "C64SubMenu";
this.C64SubMenu.Size = new System.Drawing.Size(39, 19);
this.C64SubMenu.Text = "&C64";
//
// C64SettingsMenuItem
//
this.C64SettingsMenuItem.Name = "C64SettingsMenuItem";
this.C64SettingsMenuItem.Size = new System.Drawing.Size(125, 22);
this.C64SettingsMenuItem.Text = "&Settings...";
this.C64SettingsMenuItem.Click += new System.EventHandler(this.C64SettingsMenuItem_Click);
//
// HelpSubMenu
//
this.HelpSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -2929,21 +2954,6 @@
this.AboutMenuItem.Text = "&About";
this.AboutMenuItem.Click += new System.EventHandler(this.AboutMenuItem_Click);
//
// C64SubMenu
//
this.C64SubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.C64SettingsMenuItem});
this.C64SubMenu.Name = "C64SubMenu";
this.C64SubMenu.Size = new System.Drawing.Size(39, 19);
this.C64SubMenu.Text = "&C64";
//
// C64SettingsMenuItem
//
this.C64SettingsMenuItem.Name = "C64SettingsMenuItem";
this.C64SettingsMenuItem.Size = new System.Drawing.Size(152, 22);
this.C64SettingsMenuItem.Text = "&Settings...";
this.C64SettingsMenuItem.Click += new System.EventHandler(this.C64SettingsMenuItem_Click);
//
// MainStatusBar
//
this.MainStatusBar.ClickThrough = true;
@ -3993,6 +4003,7 @@
private System.Windows.Forms.ToolStripMenuItem DisplayMessagesMenuItem;
private System.Windows.Forms.ToolStripMenuItem C64SubMenu;
private System.Windows.Forms.ToolStripMenuItem C64SettingsMenuItem;
private System.Windows.Forms.ToolStripMenuItem customToolToolStripMenuItem;
}
}

View File

@ -51,7 +51,7 @@ namespace BizHawk.Client.EmuHawk
var font = new System.Drawing.Font(SaveRAMSubMenu.Font, needBold ? FontStyle.Bold : FontStyle.Regular);
SaveRAMSubMenu.Font.Dispose();
SaveRAMSubMenu.Font = font;
}
}
}
private void RecentRomMenuItem_DropDownOpened(object sender, EventArgs e)
@ -1160,6 +1160,9 @@ namespace BizHawk.Client.EmuHawk
AutoHawkMenuItem.Visible = VersionInfo.DeveloperBuild;
BasicBotMenuItem.Enabled = GlobalWin.Tools.IsAvailable<BasicBot>();
string toolPath = Path.Combine(Global.Config.PathEntries["Global", "GameTools"].Path, string.Format("{0}.dll", Global.Game.Name));
customToolToolStripMenuItem.Enabled = File.Exists(toolPath);
}
private void AutoHawkMenuItem_Click(object sender, EventArgs e)
@ -1222,6 +1225,11 @@ namespace BizHawk.Client.EmuHawk
OpenLuaConsole();
}
private void CustomToolMenuItem_Click(object sender, EventArgs e)
{
GlobalWin.Tools.Load<ICustomGameTool>();
}
private void batchRunnerToolStripMenuItem_Click(object sender, EventArgs e)
{
new BatchRun().ShowDialog();

View File

@ -3543,8 +3543,7 @@ namespace BizHawk.Client.EmuHawk
{
Console.WriteLine(" {0} : {1}", f.FirmwareId, f.Hash);
}
}
GlobalWin.Tools.Load<ICustomGameTool>();
}
return true;
}