This commit is contained in:
hegyak 2015-12-03 17:44:14 -08:00
commit 8d724f0d14
7 changed files with 80 additions and 13 deletions

View File

@ -43,6 +43,8 @@ namespace BizHawk.Client.EmuHawk
public bool denoteStatesWithBGColor { get; set; }
public bool denoteMarkersWithIcons { get; set; }
public bool denoteMarkersWithBGColor { get; set; }
public bool allowRightClickSelecton { get; set; }
public bool letKeysModifySelection { get; set; }
private IntPtr RotatedFont;
private readonly Font NormalFont;
@ -1133,6 +1135,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)
@ -1281,6 +1295,58 @@ namespace BizHawk.Client.EmuHawk
LastVisibleRow = RowCount;
Refresh();
}
else if (e.Control && !e.Shift && !e.Alt && e.KeyCode == Keys.Up) // Ctrl + Up
{
if (SelectedRows.Any() && letKeysModifySelection)
{
foreach (var row in SelectedRows.ToList())
{
SelectRow(row - 1, true);
SelectRow(row, false);
}
}
}
else if (e.Control && !e.Shift && !e.Alt && e.KeyCode == Keys.Down) // Ctrl + Down
{
if (SelectedRows.Any() && letKeysModifySelection)
{
foreach (var row in SelectedRows.Reverse().ToList())
{
SelectRow(row + 1, true);
SelectRow(row, false);
}
}
}
else if (!e.Control && e.Shift && !e.Alt && e.KeyCode == Keys.Up) // Shift + Up
{
if (SelectedRows.Any() && letKeysModifySelection)
{
SelectRow(SelectedRows.First() - 1, true);
}
}
else if (!e.Control && e.Shift && !e.Alt && e.KeyCode == Keys.Down) // Shift + Down
{
if (SelectedRows.Any() && letKeysModifySelection)
{
SelectRow(SelectedRows.Last() + 1, true);
}
}
else if (!e.Control && !e.Shift && !e.Alt && e.KeyCode == Keys.Up) // Up
{
if (FirstVisibleRow > 0)
{
FirstVisibleRow--;
Refresh();
}
}
else if (!e.Control && !e.Shift && !e.Alt && e.KeyCode == Keys.Down) // Down
{
if (FirstVisibleRow < RowCount - 1)
{
FirstVisibleRow++;
Refresh();
}
}
base.OnKeyDown(e);
}

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -277,5 +277,10 @@ namespace BizHawk.Client.EmuHawk
}
return -1;
}
private void MarkerView_MouseClick(object sender, MouseEventArgs e)
{
MarkerContextMenu.Close();
}
}
}

View File

@ -1125,6 +1125,8 @@ namespace BizHawk.Client.EmuHawk
this.TasView.denoteMarkersWithIcons = false;
this.TasView.denoteStatesWithBGColor = false;
this.TasView.denoteStatesWithIcons = false;
this.TasView.allowRightClickSelecton = false;
this.TasView.letKeysModifySelection = true;
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;

View File

@ -855,22 +855,10 @@ namespace BizHawk.Client.EmuHawk
{
GoToPreviousMarker();
}
else if (e.Control && !e.Shift && !e.Alt && e.KeyCode == Keys.Right) // Ctrl + Left
else if (e.Control && !e.Shift && !e.Alt && e.KeyCode == Keys.Right) // Ctrl + Right
{
GoToNextMarker();
}
else if (e.Control && !e.Shift && !e.Alt && e.KeyCode == Keys.Up) // Ctrl + Up
{
GoToPreviousFrame();
}
else if (e.Control && !e.Shift && !e.Alt && e.KeyCode == Keys.Down) // Ctrl + Down
{
GoToNextFrame();
}
else if (e.Control && !e.Alt && e.Shift && e.KeyCode == Keys.R) // Ctrl + Shift + R
{
TasView.HorizontalOrientation ^= true;
}
// SuuperW: Float Editing
if (_floatEditRow != -1)