InputRoll - highlighted cells should have highlight colored text

This commit is contained in:
adelikat 2014-10-16 20:43:02 +00:00
parent ce55143340
commit 3bc665a9c8
1 changed files with 28 additions and 0 deletions

View File

@ -651,6 +651,7 @@ namespace BizHawk.Client.EmuHawk
var columns = _columns.VisibleColumns.ToList();
if (QueryItemText != null)
{
// TODO: icon callback for horizontal view!
if (HorizontalOrientation)
{
int startIndex = FirstVisibleRow;
@ -668,10 +669,24 @@ namespace BizHawk.Client.EmuHawk
int x = RowsToPixels(i) + (CellWidth - text.Length * _charSize.Width) / 2;
int y = (j * CellHeight) + CellHeightPadding;
var point = new Point(x, y);
bool rePrep = false;
if (SelectedItems.Contains(new Cell { Column = columns[j], RowIndex = i }))
{
Gdi.PrepDrawString(this.Font, SystemColors.HighlightText);
rePrep = true;
}
if (!string.IsNullOrWhiteSpace(text))
{
Gdi.DrawString(text, point);
}
if (rePrep)
{
Gdi.PrepDrawString(this.Font, this.ForeColor);
}
}
}
}
@ -707,10 +722,23 @@ namespace BizHawk.Client.EmuHawk
else
{
QueryItemText(i + startRow, columns[j], out text);
bool rePrep = false;
if (SelectedItems.Contains(new Cell { Column = columns[j], RowIndex = i }))
{
Gdi.PrepDrawString(this.Font, SystemColors.HighlightText);
rePrep = true;
}
if (!string.IsNullOrWhiteSpace(text))
{
Gdi.DrawString(text, point);
}
if (rePrep)
{
Gdi.PrepDrawString(this.Font, this.ForeColor);
}
}
}
}