Offer Mod Info Screen

This commit is contained in:
Frank 2021-08-25 14:11:48 +02:00
parent 9d7fa9f925
commit b959e17c18
7 changed files with 41 additions and 18 deletions

View file

@ -134,7 +134,7 @@ public class GridLayout extends GridColumn {
GridElement el = this.buildElement((int)this.width, 0, 1, 0,0, elements);
this.height = el.height;
if (centerVertically && el.height + initialTopPadding < screenHeight) {
topPadding = (screenHeight - el.height - initialTopPadding) >> 1;
topPadding = (screenHeight - el.height) >> 1;
} else {
topPadding = initialTopPadding;
}

View file

@ -144,12 +144,11 @@ public abstract class GridScreen extends Screen {
}
public int getMaxScrollPos() {
return height-getScrollHeight();
return height - (getScrollHeight() + topPadding);
}
public boolean isScrollable() {
if (grid==null) return false;
return height<grid.getHeight();
return height<getScrollHeight();
}
public boolean isMouseOverScroller(double x, double y) {
@ -166,7 +165,7 @@ public abstract class GridScreen extends Screen {
final int y1 = height;
final int y0 = 0;
final int yd = y1 - y0;
final int maxPosition = getScrollHeight();
final int maxPosition = getScrollHeight() + topPadding;
final int x0 = width-SCROLLER_WIDTH;
final int x1 = width;