InputRoll - in horizontal orientation, account for the draw area being shorter than the height of the columns
This commit is contained in:
parent
0d2770044a
commit
ea6704a2b8
|
@ -21,11 +21,15 @@ namespace BizHawk.Client.EmuHawk
|
||||||
// Lag frame calculations
|
// Lag frame calculations
|
||||||
SetLagFramesArray();
|
SetLagFramesArray();
|
||||||
|
|
||||||
|
CalculateHorizontalColumnPositions(VisibleColumns.ToList());
|
||||||
|
|
||||||
List<RollColumn> visibleColumns;
|
List<RollColumn> visibleColumns;
|
||||||
|
|
||||||
if (HorizontalOrientation)
|
if (HorizontalOrientation)
|
||||||
{
|
{
|
||||||
visibleColumns = VisibleColumns.ToList(); // TODO
|
visibleColumns = VisibleColumns
|
||||||
|
.Take(_horizontalColumnTops.Count(c => c < e.ClipRectangle.Height))
|
||||||
|
.ToList();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -42,8 +46,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
var lastVisibleRow = firstVisibleRow + visibleRows;
|
var lastVisibleRow = firstVisibleRow + visibleRows;
|
||||||
|
|
||||||
CalculateHorizontalColumnPositions(visibleColumns);
|
|
||||||
|
|
||||||
var needsColumnRedraw = HorizontalOrientation || e.ClipRectangle.Y < ColumnHeight;
|
var needsColumnRedraw = HorizontalOrientation || e.ClipRectangle.Y < ColumnHeight;
|
||||||
if (visibleColumns.Any() && needsColumnRedraw)
|
if (visibleColumns.Any() && needsColumnRedraw)
|
||||||
{
|
{
|
||||||
|
|
|
@ -285,6 +285,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
int h = VisibleColumns.Any()
|
int h = VisibleColumns.Any()
|
||||||
? GetHColBottom(VisibleColumns.Count() - 1)
|
? GetHColBottom(VisibleColumns.Count() - 1)
|
||||||
: 0;
|
: 0;
|
||||||
|
h = Math.Min(h, _drawHeight);
|
||||||
|
|
||||||
Invalidate(new Rectangle(x, y, w, h));
|
Invalidate(new Rectangle(x, y, w, h));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue