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
|
||||
SetLagFramesArray();
|
||||
|
||||
CalculateHorizontalColumnPositions(VisibleColumns.ToList());
|
||||
|
||||
List<RollColumn> visibleColumns;
|
||||
|
||||
if (HorizontalOrientation)
|
||||
{
|
||||
visibleColumns = VisibleColumns.ToList(); // TODO
|
||||
visibleColumns = VisibleColumns
|
||||
.Take(_horizontalColumnTops.Count(c => c < e.ClipRectangle.Height))
|
||||
.ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -34,7 +38,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
.Where(c => c.Left - _hBar.Value < e.ClipRectangle.Width)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
|
||||
var firstVisibleRow = Math.Max(FirstVisibleRow, 0);
|
||||
var visibleRows = HorizontalOrientation
|
||||
? e.ClipRectangle.Width / CellWidth
|
||||
|
@ -42,8 +46,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
var lastVisibleRow = firstVisibleRow + visibleRows;
|
||||
|
||||
CalculateHorizontalColumnPositions(visibleColumns);
|
||||
|
||||
var needsColumnRedraw = HorizontalOrientation || e.ClipRectangle.Y < ColumnHeight;
|
||||
if (visibleColumns.Any() && needsColumnRedraw)
|
||||
{
|
||||
|
|
|
@ -285,6 +285,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
int h = VisibleColumns.Any()
|
||||
? GetHColBottom(VisibleColumns.Count() - 1)
|
||||
: 0;
|
||||
h = Math.Min(h, _drawHeight);
|
||||
|
||||
Invalidate(new Rectangle(x, y, w, h));
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue