Tastudio - right-click a column to toggle autohold on that button
This commit is contained in:
parent
35c147136f
commit
5660fee947
|
@ -242,6 +242,12 @@ namespace BizHawk.Client.EmuHawk
|
|||
[Category("Action")]
|
||||
public event System.Windows.Forms.ColumnClickEventHandler ColumnClick;
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when a column header is right-clicked
|
||||
/// </summary>
|
||||
[Category("Action")]
|
||||
public event System.Windows.Forms.ColumnClickEventHandler ColumnRightClick;
|
||||
|
||||
/// <summary>
|
||||
/// Occurs whenever the 'SelectedItems' property for this control changes
|
||||
/// </summary>
|
||||
|
@ -703,13 +709,14 @@ namespace BizHawk.Client.EmuHawk
|
|||
// Emphasis
|
||||
foreach (var column in Columns.Where(c => c.Emphasis))
|
||||
{
|
||||
Gdi.SetBrush(SystemColors.ActiveBorder);
|
||||
if (HorizontalOrientation)
|
||||
{
|
||||
|
||||
Gdi.FillRectangle(1, Columns.IndexOf(column) * CellHeight + 1, ColumnWidth - 1, ColumnHeight - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Gdi.FillRectangle(column.Left.Value + 1, 1, column.Width.Value - 1, ColumnHeight - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -748,6 +755,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//TODO refactor this and DoBackGroundCallback functions.
|
||||
/// <summary>
|
||||
/// Draw Gridlines and background colors using QueryItemBkColor.
|
||||
|
@ -965,7 +973,14 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
if (e.Button == MouseButtons.Right)
|
||||
{
|
||||
RightButtonHeld = true;
|
||||
if (IsHoveringOnColumnCell)
|
||||
{
|
||||
ColumnRightClickEvent(ColumnAtX(e.X));
|
||||
}
|
||||
else
|
||||
{
|
||||
RightButtonHeld = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (e.Button == MouseButtons.Left)
|
||||
|
@ -1136,6 +1151,14 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
private void ColumnRightClickEvent(RollColumn column)
|
||||
{
|
||||
if (ColumnRightClick != null)
|
||||
{
|
||||
ColumnRightClick(this, new ColumnClickEventArgs(_columns.IndexOf(column)));
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Change Events
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -212,6 +212,14 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
private void TasView_ColumnRightClick(object sender, ColumnClickEventArgs e)
|
||||
{
|
||||
var column = TasView.Columns[e.Column];
|
||||
column.Emphasis ^= true;
|
||||
|
||||
Global.StickyXORAdapter.SetSticky(column.Name, column.Emphasis);
|
||||
}
|
||||
|
||||
private void TasView_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Middle)
|
||||
|
|
|
@ -489,6 +489,17 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
private void SetColumnsFromCurrentStickies()
|
||||
{
|
||||
foreach (var column in TasView.Columns)
|
||||
{
|
||||
if (Global.StickyXORAdapter.IsSticky(column.Name))
|
||||
{
|
||||
column.Emphasis = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region Events
|
||||
|
||||
#region File Menu
|
||||
|
@ -1023,6 +1034,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
EngageTastudio();
|
||||
SetUpColumns();
|
||||
LoadConfigSettings();
|
||||
SetColumnsFromCurrentStickies();
|
||||
RefreshDialog();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue