UI: Added help shortcuts to main window and script window

This commit is contained in:
Sour 2020-06-28 23:31:04 -04:00
parent bfaff15dda
commit 8ae115c430
4 changed files with 41 additions and 16 deletions

View file

@ -367,13 +367,12 @@
this.mnuHelp.Name = "mnuHelp"; this.mnuHelp.Name = "mnuHelp";
this.mnuHelp.Size = new System.Drawing.Size(44, 20); this.mnuHelp.Size = new System.Drawing.Size(44, 20);
this.mnuHelp.Text = "Help"; this.mnuHelp.Text = "Help";
this.mnuHelp.Visible = false;
// //
// mnuApiReference // mnuApiReference
// //
this.mnuApiReference.Image = global::Mesen.GUI.Properties.Resources.Exclamation; this.mnuApiReference.Image = global::Mesen.GUI.Properties.Resources.Exclamation;
this.mnuApiReference.Name = "mnuApiReference"; this.mnuApiReference.Name = "mnuApiReference";
this.mnuApiReference.Size = new System.Drawing.Size(147, 22); this.mnuApiReference.Size = new System.Drawing.Size(180, 22);
this.mnuApiReference.Text = "API Reference"; this.mnuApiReference.Text = "API Reference";
this.mnuApiReference.Click += new System.EventHandler(this.mnuApiReference_Click); this.mnuApiReference.Click += new System.EventHandler(this.mnuApiReference_Click);
// //
@ -413,6 +412,7 @@
this.txtScriptContent.Cursor = System.Windows.Forms.Cursors.IBeam; this.txtScriptContent.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtScriptContent.DisabledColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); this.txtScriptContent.DisabledColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180)))));
this.txtScriptContent.Dock = System.Windows.Forms.DockStyle.Fill; this.txtScriptContent.Dock = System.Windows.Forms.DockStyle.Fill;
this.txtScriptContent.Font = new System.Drawing.Font("Courier New", 9.75F);
this.txtScriptContent.IsReplaceMode = false; this.txtScriptContent.IsReplaceMode = false;
this.txtScriptContent.Language = FastColoredTextBoxNS.Language.Lua; this.txtScriptContent.Language = FastColoredTextBoxNS.Language.Lua;
this.txtScriptContent.LeftBracket = '('; this.txtScriptContent.LeftBracket = '(';

View file

@ -491,7 +491,7 @@ namespace Mesen.GUI.Debugger
private void mnuApiReference_Click(object sender, EventArgs e) private void mnuApiReference_Click(object sender, EventArgs e)
{ {
Process.Start("https://www.mesen.ca/ApiReference.php"); Process.Start("https://www.mesen.ca/snes/ApiReference.php");
} }
private void mnuSetScriptTimeout_Click(object sender, EventArgs e) private void mnuSetScriptTimeout_Click(object sender, EventArgs e)

View file

@ -161,11 +161,11 @@
this.mnuDebugger = new System.Windows.Forms.ToolStripMenuItem(); this.mnuDebugger = new System.Windows.Forms.ToolStripMenuItem();
this.mnuEventViewer = new System.Windows.Forms.ToolStripMenuItem(); this.mnuEventViewer = new System.Windows.Forms.ToolStripMenuItem();
this.mnuMemoryTools = new System.Windows.Forms.ToolStripMenuItem(); this.mnuMemoryTools = new System.Windows.Forms.ToolStripMenuItem();
this.mnuDebugLog = new System.Windows.Forms.ToolStripMenuItem();
this.mnuRegisterViewer = new System.Windows.Forms.ToolStripMenuItem(); this.mnuRegisterViewer = new System.Windows.Forms.ToolStripMenuItem();
this.mnuTraceLogger = new System.Windows.Forms.ToolStripMenuItem(); this.mnuTraceLogger = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem26 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripMenuItem26 = new System.Windows.Forms.ToolStripSeparator();
this.mnuAssembler = new System.Windows.Forms.ToolStripMenuItem(); this.mnuAssembler = new System.Windows.Forms.ToolStripMenuItem();
this.mnuDebugLog = new System.Windows.Forms.ToolStripMenuItem();
this.mnuProfiler = new System.Windows.Forms.ToolStripMenuItem(); this.mnuProfiler = new System.Windows.Forms.ToolStripMenuItem();
this.mnuScriptWindow = new System.Windows.Forms.ToolStripMenuItem(); this.mnuScriptWindow = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem12 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripMenuItem12 = new System.Windows.Forms.ToolStripSeparator();
@ -187,6 +187,8 @@
this.mnuAbout = new System.Windows.Forms.ToolStripMenuItem(); this.mnuAbout = new System.Windows.Forms.ToolStripMenuItem();
this.pnlRenderer = new System.Windows.Forms.Panel(); this.pnlRenderer = new System.Windows.Forms.Panel();
this.ctrlRecentGames = new Mesen.GUI.Controls.ctrlRecentGames(); this.ctrlRecentGames = new Mesen.GUI.Controls.ctrlRecentGames();
this.mnuOnlineHelp = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem27 = new System.Windows.Forms.ToolStripSeparator();
this.mnuMain.SuspendLayout(); this.mnuMain.SuspendLayout();
this.pnlRenderer.SuspendLayout(); this.pnlRenderer.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
@ -1219,13 +1221,6 @@
this.mnuMemoryTools.Size = new System.Drawing.Size(183, 22); this.mnuMemoryTools.Size = new System.Drawing.Size(183, 22);
this.mnuMemoryTools.Text = "Memory Tools"; this.mnuMemoryTools.Text = "Memory Tools";
// //
// mnuDebugLog
//
this.mnuDebugLog.Image = global::Mesen.GUI.Properties.Resources.LogWindow;
this.mnuDebugLog.Name = "mnuDebugLog";
this.mnuDebugLog.Size = new System.Drawing.Size(183, 22);
this.mnuDebugLog.Text = "Debug Log";
//
// mnuRegisterViewer // mnuRegisterViewer
// //
this.mnuRegisterViewer.Image = global::Mesen.GUI.Properties.Resources.RegisterIcon; this.mnuRegisterViewer.Image = global::Mesen.GUI.Properties.Resources.RegisterIcon;
@ -1252,6 +1247,13 @@
this.mnuAssembler.Size = new System.Drawing.Size(183, 22); this.mnuAssembler.Size = new System.Drawing.Size(183, 22);
this.mnuAssembler.Text = "Assembler"; this.mnuAssembler.Text = "Assembler";
// //
// mnuDebugLog
//
this.mnuDebugLog.Image = global::Mesen.GUI.Properties.Resources.LogWindow;
this.mnuDebugLog.Name = "mnuDebugLog";
this.mnuDebugLog.Size = new System.Drawing.Size(183, 22);
this.mnuDebugLog.Text = "Debug Log";
//
// mnuProfiler // mnuProfiler
// //
this.mnuProfiler.Image = global::Mesen.GUI.Properties.Resources.PerfTracker; this.mnuProfiler.Image = global::Mesen.GUI.Properties.Resources.PerfTracker;
@ -1342,6 +1344,8 @@
// mnuHelp // mnuHelp
// //
this.mnuHelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.mnuHelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.mnuOnlineHelp,
this.toolStripMenuItem27,
this.mnuCheckForUpdates, this.mnuCheckForUpdates,
this.toolStripMenuItem20, this.toolStripMenuItem20,
this.mnuReportBug, this.mnuReportBug,
@ -1357,33 +1361,33 @@
// //
this.mnuCheckForUpdates.Image = global::Mesen.GUI.Properties.Resources.Update; this.mnuCheckForUpdates.Image = global::Mesen.GUI.Properties.Resources.Update;
this.mnuCheckForUpdates.Name = "mnuCheckForUpdates"; this.mnuCheckForUpdates.Name = "mnuCheckForUpdates";
this.mnuCheckForUpdates.Size = new System.Drawing.Size(170, 22); this.mnuCheckForUpdates.Size = new System.Drawing.Size(180, 22);
this.mnuCheckForUpdates.Text = "Check for updates"; this.mnuCheckForUpdates.Text = "Check for updates";
this.mnuCheckForUpdates.Click += new System.EventHandler(this.mnuCheckForUpdates_Click); this.mnuCheckForUpdates.Click += new System.EventHandler(this.mnuCheckForUpdates_Click);
// //
// toolStripMenuItem20 // toolStripMenuItem20
// //
this.toolStripMenuItem20.Name = "toolStripMenuItem20"; this.toolStripMenuItem20.Name = "toolStripMenuItem20";
this.toolStripMenuItem20.Size = new System.Drawing.Size(167, 6); this.toolStripMenuItem20.Size = new System.Drawing.Size(177, 6);
// //
// mnuReportBug // mnuReportBug
// //
this.mnuReportBug.Image = global::Mesen.GUI.Properties.Resources.Comment; this.mnuReportBug.Image = global::Mesen.GUI.Properties.Resources.Comment;
this.mnuReportBug.Name = "mnuReportBug"; this.mnuReportBug.Name = "mnuReportBug";
this.mnuReportBug.Size = new System.Drawing.Size(170, 22); this.mnuReportBug.Size = new System.Drawing.Size(180, 22);
this.mnuReportBug.Text = "Report a bug"; this.mnuReportBug.Text = "Report a bug";
this.mnuReportBug.Click += new System.EventHandler(this.mnuReportBug_Click); this.mnuReportBug.Click += new System.EventHandler(this.mnuReportBug_Click);
// //
// toolStripMenuItem5 // toolStripMenuItem5
// //
this.toolStripMenuItem5.Name = "toolStripMenuItem5"; this.toolStripMenuItem5.Name = "toolStripMenuItem5";
this.toolStripMenuItem5.Size = new System.Drawing.Size(167, 6); this.toolStripMenuItem5.Size = new System.Drawing.Size(177, 6);
// //
// mnuAbout // mnuAbout
// //
this.mnuAbout.Image = global::Mesen.GUI.Properties.Resources.Exclamation; this.mnuAbout.Image = global::Mesen.GUI.Properties.Resources.Exclamation;
this.mnuAbout.Name = "mnuAbout"; this.mnuAbout.Name = "mnuAbout";
this.mnuAbout.Size = new System.Drawing.Size(170, 22); this.mnuAbout.Size = new System.Drawing.Size(180, 22);
this.mnuAbout.Text = "About"; this.mnuAbout.Text = "About";
this.mnuAbout.Click += new System.EventHandler(this.mnuAbout_Click); this.mnuAbout.Click += new System.EventHandler(this.mnuAbout_Click);
// //
@ -1407,6 +1411,19 @@
this.ctrlRecentGames.TabIndex = 1; this.ctrlRecentGames.TabIndex = 1;
this.ctrlRecentGames.Visible = false; this.ctrlRecentGames.Visible = false;
// //
// mnuOnlineHelp
//
this.mnuOnlineHelp.Image = global::Mesen.GUI.Properties.Resources.Help;
this.mnuOnlineHelp.Name = "mnuOnlineHelp";
this.mnuOnlineHelp.Size = new System.Drawing.Size(180, 22);
this.mnuOnlineHelp.Text = "Online Help";
this.mnuOnlineHelp.Click += new System.EventHandler(this.mnuOnlineHelp_Click);
//
// toolStripMenuItem27
//
this.toolStripMenuItem27.Name = "toolStripMenuItem27";
this.toolStripMenuItem27.Size = new System.Drawing.Size(177, 6);
//
// frmMain // frmMain
// //
this.AllowDrop = true; this.AllowDrop = true;
@ -1592,5 +1609,7 @@
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem22; private System.Windows.Forms.ToolStripSeparator toolStripMenuItem22;
private System.Windows.Forms.ToolStripMenuItem mnuGameboyConfig; private System.Windows.Forms.ToolStripMenuItem mnuGameboyConfig;
private System.Windows.Forms.ToolStripMenuItem mnuDebugLog; private System.Windows.Forms.ToolStripMenuItem mnuDebugLog;
private System.Windows.Forms.ToolStripMenuItem mnuOnlineHelp;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem27;
} }
} }

View file

@ -803,5 +803,11 @@ namespace Mesen.GUI.Forms
Interlocked.Decrement(ref _inMenu); Interlocked.Decrement(ref _inMenu);
}); });
} }
private void mnuOnlineHelp_Click(object sender, EventArgs e)
{
string platform = Program.IsMono ? "linux" : "win";
Process.Start("http://www.mesen.ca/snes/docs/?v=" + EmuApi.GetMesenVersion() + "&p=" + platform + "&l=" + ResourceHelper.GetLanguageCode());
}
} }
} }