Skip to content

Commit

Permalink
Only when double-clicking TAStudio frame# cell, open dialog at cursor
Browse files Browse the repository at this point in the history
fixes 128c8e6
see #3714
  • Loading branch information
YoshiRulz committed Nov 28, 2024
1 parent c3bd723 commit 04c70c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public void UpdateTextColumnWidth()
}
}

public void EditMarkerPopUp(TasMovieMarker marker)
public void EditMarkerPopUp(TasMovieMarker marker, bool openAtMouseCursor = false)
{
var markerFrame = marker.Frame;
var i = new InputPrompt
Expand All @@ -218,7 +218,11 @@ public void EditMarkerPopUp(TasMovieMarker marker)
? Markers.PreviousOrCurrent(markerFrame).Message
: ""
};

if (openAtMouseCursor)
{
i.StartPosition = FormStartPosition.Manual;
i.Location = Cursor.Position - i.HalfSize(); // eww
}
if (!this.ShowDialogWithTempMute(i).IsOk()) return;

marker.Message = i.PromptText;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ private void TasView_MouseDoubleClick(object sender, MouseEventArgs e)

if (existingMarker != null)
{
MarkerControl.EditMarkerPopUp(existingMarker);
MarkerControl.EditMarkerPopUp(existingMarker, openAtMouseCursor: true);
}
else
{
Expand Down

0 comments on commit 04c70c3

Please sign in to comment.