From 6e50c1b3a909a19931b0eb28c71ed13c16d4ca5b Mon Sep 17 00:00:00 2001 From: adelikat Date: Wed, 23 Jul 2014 23:04:43 +0000 Subject: [PATCH] TAstudio - double clicking a marker in the marker list takes you to that marker --- .../tools/TAStudio/MarkerControl.Designer.cs | 1 + BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.cs | 5 +++++ BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.Designer.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.Designer.cs index 51996b4715..836d2316b3 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.Designer.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.Designer.cs @@ -82,6 +82,7 @@ this.MarkerView.TabStop = false; this.MarkerView.UseCompatibleStateImageBehavior = false; this.MarkerView.View = System.Windows.Forms.View.Details; + this.MarkerView.ItemActivate += new System.EventHandler(this.MarkerView_ItemActivate); this.MarkerView.SelectedIndexChanged += new System.EventHandler(this.MarkerView_SelectedIndexChanged); // // columnHeader1 diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.cs index 13a27e441c..6208875a55 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.cs @@ -122,5 +122,10 @@ namespace BizHawk.Client.EmuHawk .ToList(); } } + + private void MarkerView_ItemActivate(object sender, EventArgs e) + { + Tastudio.GoToMarker(SelectedMarkers.First()); + } } } diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs index 1269415da3..c490fbcc27 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs @@ -293,6 +293,11 @@ namespace BizHawk.Client.EmuHawk Global.Config.TAStudioSettings.Height = Bottom - Top; } + public void GoToMarker(TasMovieMarker marker) + { + GoToFrame(marker.Frame); + } + private void GoToFrame(int frame) { // If past greenzone, emulate and capture states