Add `Edit` > `Go to Frame...` to TAStudio (resolves #2373)

This commit is contained in:
YoshiRulz 2025-02-11 01:24:30 +10:00
parent 59be77248a
commit 6a115e4e65
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 20 additions and 0 deletions

View File

@ -9,6 +9,7 @@ using BizHawk.Client.EmuHawk.ToolExtensions;
using BizHawk.Client.EmuHawk.Properties;
using BizHawk.Common.StringExtensions;
using BizHawk.Emulation.Common;
using BizHawk.WinForms.Controls;
namespace BizHawk.Client.EmuHawk
{
@ -119,6 +120,25 @@ namespace BizHawk.Client.EmuHawk
public TAStudio()
{
InitializeComponent();
ToolStripMenuItemEx goToFrameMenuItem = new()
{
ShortcutKeys = Keys.Control | Keys.G,
Text = "Go to Frame...",
};
goToFrameMenuItem.Click += (_, _) =>
{
MainForm.PauseEmulator();
using InputPrompt dialog = new()
{
Text = "Go to Frame",
Message = "Jump/Seek to frame index:",
TextInputType = InputPrompt.InputType.Unsigned,
};
if (this.ShowDialogWithTempMute(dialog).IsOk()) GoToFrame(int.Parse(dialog.PromptText));
};
EditSubMenu.DropDownItems.Insert(
EditSubMenu.DropDownItems.IndexOf(ReselectClipboardMenuItem) + 1,
goToFrameMenuItem);
RecentSubMenu.Image = Resources.Recent;
recentMacrosToolStripMenuItem.Image = Resources.Recent;