Input Roll - Different highlight color when hovering an emphasized column

This commit is contained in:
adelikat 2014-09-25 18:12:18 +00:00
parent 5660fee947
commit d91256ceb9
2 changed files with 29 additions and 2 deletions

View File

@ -732,7 +732,15 @@ namespace BizHawk.Client.EmuHawk
continue;
}
Gdi.SetBrush(SystemColors.Highlight);
if (CurrentCell.Column.Emphasis)
{
Gdi.SetBrush(Add(SystemColors.Highlight, 0x00222222));
}
else
{
Gdi.SetBrush(SystemColors.Highlight);
}
Gdi.FillRectangle(1, i * CellHeight + 1, ColumnWidth - 1, ColumnHeight - 1);
}
}
@ -748,7 +756,16 @@ namespace BizHawk.Client.EmuHawk
}
int left = _columns[i].Left.Value - HBar.Value;
int width = _columns[i].Right.Value - HBar.Value - left;
Gdi.SetBrush(SystemColors.Highlight);
if (CurrentCell.Column.Emphasis)
{
Gdi.SetBrush(Add(SystemColors.Highlight, 0x00550000));
}
else
{
Gdi.SetBrush(SystemColors.Highlight);
}
Gdi.FillRectangle(left + 1, 1, width - 1, ColumnHeight - 1);
}
}
@ -756,6 +773,14 @@ namespace BizHawk.Client.EmuHawk
}
}
// TODO: Make into an extension method
private Color Add(Color color, int val)
{
var col = color.ToArgb();
col += val;
return Color.FromArgb(col);
}
//TODO refactor this and DoBackGroundCallback functions.
/// <summary>
/// Draw Gridlines and background colors using QueryItemBkColor.

View File

@ -218,6 +218,8 @@ namespace BizHawk.Client.EmuHawk
column.Emphasis ^= true;
Global.StickyXORAdapter.SetSticky(column.Name, column.Emphasis);
TasView.Refresh();
}
private void TasView_MouseDown(object sender, MouseEventArgs e)