Tastudio - change context menu activation to be on right-mouse up instead of down, only show it if the user did not move the mouse wheel first (fixes the conflict between right-click-mousewheel scrolling vs context menu activation), wire up the clear greenzone context menu item. Instead of only activating right-click if there are selected items, show it anyway, and disable menu items that need selected items (which is a majority of them but not all)
This commit is contained in:
parent
985e6ffc80
commit
7fa6e0093d
|
@ -708,7 +708,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
// toolStripSeparator19
|
||||
//
|
||||
this.toolStripSeparator19.Name = "toolStripSeparator19";
|
||||
this.toolStripSeparator19.Size = new System.Drawing.Size(57, 6);
|
||||
this.toolStripSeparator19.Size = new System.Drawing.Size(149, 6);
|
||||
//
|
||||
// HelpSubMenu
|
||||
//
|
||||
|
@ -874,10 +874,10 @@ namespace BizHawk.Client.EmuHawk
|
|||
//
|
||||
// UngreenzoneContextMenuItem
|
||||
//
|
||||
this.UngreenzoneContextMenuItem.Enabled = false;
|
||||
this.UngreenzoneContextMenuItem.Name = "UngreenzoneContextMenuItem";
|
||||
this.UngreenzoneContextMenuItem.Size = new System.Drawing.Size(272, 22);
|
||||
this.UngreenzoneContextMenuItem.Text = "Ungreenzone";
|
||||
this.UngreenzoneContextMenuItem.Text = "Clear Greenzone";
|
||||
this.UngreenzoneContextMenuItem.Click += new System.EventHandler(this.ClearGreenzoneMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator17
|
||||
//
|
||||
|
|
|
@ -17,6 +17,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
private float _floatPaintState;
|
||||
private bool _startMarkerDrag;
|
||||
private bool _startFrameDrag;
|
||||
private bool _supressContextMenu = false;
|
||||
|
||||
public static Color CurrentFrame_FrameCol = Color.FromArgb(0xCFEDFC);
|
||||
public static Color CurrentFrame_InputLog = Color.FromArgb(0xB5E7F7);
|
||||
|
@ -271,31 +272,32 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (e.Button == MouseButtons.Right)
|
||||
{
|
||||
var frame = TasView.CurrentCell.RowIndex.Value;
|
||||
var buttonName = TasView.CurrentCell.Column.Name;
|
||||
if (TasView.SelectedRows.ToList().IndexOf(frame) != -1 && (buttonName == MarkerColumnName || buttonName == FrameColumnName))
|
||||
{
|
||||
RightClickMenu.Show(TasView, e.X, e.Y);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void TasView_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
_startMarkerDrag = false;
|
||||
_startFrameDrag = false;
|
||||
_startBoolDrawColumn = string.Empty;
|
||||
_startFloatDrawColumn = string.Empty;
|
||||
_floatPaintState = 0;
|
||||
if (e.Button == MouseButtons.Right && !_supressContextMenu)
|
||||
{
|
||||
RightClickMenu.Show(TasView, e.X, e.Y);
|
||||
}
|
||||
else if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
_startMarkerDrag = false;
|
||||
_startFrameDrag = false;
|
||||
_startBoolDrawColumn = string.Empty;
|
||||
_startFloatDrawColumn = string.Empty;
|
||||
_floatPaintState = 0;
|
||||
}
|
||||
|
||||
_supressContextMenu = false;
|
||||
}
|
||||
|
||||
private void TasView_MouseWheel(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (TasView.RightButtonHeld && TasView.CurrentCell.RowIndex.HasValue)
|
||||
{
|
||||
_supressContextMenu = true;
|
||||
if (e.Delta < 0)
|
||||
{
|
||||
GoToFrame(Global.Emulator.Frame + 1);
|
||||
|
|
|
@ -1172,6 +1172,18 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void RightClickMenu_Opened(object sender, EventArgs e)
|
||||
{
|
||||
SetMarkersContextMenuItem.Enabled =
|
||||
SelectBetweenMarkersContextMenuItem.Enabled =
|
||||
RemoveMarkersContextMenuItem.Enabled =
|
||||
DeselectContextMenuItem.Enabled =
|
||||
ClearContextMenuItem.Enabled =
|
||||
DeleteFramesContextMenuItem.Enabled =
|
||||
CloneContextMenuItem.Enabled =
|
||||
InsertFrameContextMenuItem.Enabled =
|
||||
InsertNumFramesContextMenuItem.Enabled =
|
||||
TruncateContextMenuItem.Enabled =
|
||||
TasView.SelectedRows.Any();
|
||||
|
||||
RemoveMarkersContextMenuItem.Enabled = _currentTasMovie.Markers.Any(m => TasView.SelectedRows.Contains(m.Frame)); // Disable the option to remove markers if no markers are selected (FCEUX does this).
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue