tastudio: select the new cell on every rightclick.
only enabled for branches and markers, since in tasview we use rightclick to start advance/rewind. involved some hackery, like killing context menu while OnMouseDown of the given listview, then going back to InputRoll's OnMouseDown and actually selecting a new cell. can we figure out a hovered cell while context menu is still active? also, it'd make sense to do this for leftclick as well, but without context menu hiding, there doesn't seem to be a way to force updating of listviews from InputRoll.
This commit is contained in:
parent
31cc08a954
commit
69970c5ae5
|
@ -43,6 +43,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
public bool denoteStatesWithBGColor { get; set; }
|
||||
public bool denoteMarkersWithIcons { get; set; }
|
||||
public bool denoteMarkersWithBGColor { get; set; }
|
||||
public bool allowRightClickSelecton { get; set; }
|
||||
|
||||
private IntPtr RotatedFont;
|
||||
private readonly Font NormalFont;
|
||||
|
@ -1133,6 +1134,18 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
|
||||
base.OnMouseDown(e);
|
||||
|
||||
if (allowRightClickSelecton && e.Button == MouseButtons.Right)
|
||||
{
|
||||
if (!IsHoveringOnColumnCell)
|
||||
{
|
||||
_currentX = e.X;
|
||||
_currentY = e.Y;
|
||||
Cell newCell = CalculatePointedCell(_currentX.Value, _currentY.Value);
|
||||
CellChanged(newCell);
|
||||
SelectCell(CurrentCell);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnMouseUp(MouseEventArgs e)
|
||||
|
|
|
@ -226,6 +226,7 @@
|
|||
this.BranchView.denoteMarkersWithIcons = false;
|
||||
this.BranchView.denoteStatesWithBGColor = false;
|
||||
this.BranchView.denoteStatesWithIcons = false;
|
||||
this.BranchView.allowRightClickSelecton = true;
|
||||
this.BranchView.FullRowSelect = true;
|
||||
this.BranchView.HideWasLagFrames = false;
|
||||
this.BranchView.HorizontalOrientation = false;
|
||||
|
|
|
@ -326,6 +326,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
LoadBranchButton.Enabled =
|
||||
EditBranchTextButton.Enabled =
|
||||
SelectedBranch != null;
|
||||
|
||||
BranchesContextMenu.Close();
|
||||
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
if (BranchView.CurrentCell != null && BranchView.CurrentCell.IsDataCell
|
||||
|
|
|
@ -185,6 +185,7 @@
|
|||
//
|
||||
this.MarkerView.AllowColumnReorder = false;
|
||||
this.MarkerView.AllowColumnResize = false;
|
||||
this.MarkerView.allowRightClickSelecton = true;
|
||||
this.MarkerView.AlwaysScroll = false;
|
||||
this.MarkerView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
|
@ -210,6 +211,7 @@
|
|||
this.MarkerView.TabIndex = 5;
|
||||
this.MarkerView.TabStop = false;
|
||||
this.MarkerView.SelectedIndexChanged += new System.EventHandler(this.MarkerView_SelectedIndexChanged);
|
||||
this.MarkerView.MouseClick += new System.Windows.Forms.MouseEventHandler(this.MarkerView_MouseClick);
|
||||
this.MarkerView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.MarkerView_MouseDoubleClick);
|
||||
//
|
||||
// MarkerControl
|
||||
|
|
|
@ -277,5 +277,10 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
private void MarkerView_MouseClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
MarkerContextMenu.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1125,6 +1125,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
this.TasView.denoteMarkersWithIcons = false;
|
||||
this.TasView.denoteStatesWithBGColor = false;
|
||||
this.TasView.denoteStatesWithIcons = false;
|
||||
this.TasView.allowRightClickSelecton = false;
|
||||
this.TasView.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.TasView.FullRowSelect = true;
|
||||
this.TasView.HideWasLagFrames = false;
|
||||
|
|
Loading…
Reference in New Issue