InputRoll - implement PageUp/PageDown logic

This commit is contained in:
adelikat 2014-10-22 23:03:17 +00:00
parent 6099d4006e
commit ade5cfa8e6
1 changed files with 23 additions and 0 deletions

View File

@ -1429,6 +1429,29 @@ namespace BizHawk.Client.EmuHawk
{
HorizontalOrientation ^= true;
}
else if (!e.Control && !e.Alt && !e.Shift && e.KeyCode == Keys.PageUp) // Page Up
{
if (FirstVisibleRow > 0)
{
LastVisibleRow = FirstVisibleRow;
Refresh();
}
}
else if (!e.Control && !e.Alt && !e.Shift && e.KeyCode == Keys.PageDown) // Page Down
{
var totalRows = LastVisibleRow - FirstVisibleRow;
if (totalRows <= RowCount)
{
var final = LastVisibleRow + totalRows;
if (final > RowCount)
{
final = RowCount;
}
LastVisibleRow = final;
Refresh();
}
}
base.OnKeyDown(e);
}