fix clickability of arrows on scrollable frame

This commit is contained in:
MachineMuse 2015-09-07 14:19:58 -06:00
parent a612231f26
commit c1d044c28d

View file

@ -35,7 +35,6 @@ public class ScrollableFrame implements IGuiFrame {
if (border.containsPoint(x, y)) {
int dscroll = (lastdWheel - Mouse.getDWheel()) / 15;
lastdWheel = Mouse.getDWheel();
currentscrollpixels = (int) MuseMathUtils.clampDouble(currentscrollpixels + dscroll, 0, getMaxScrollPixels());
if (Mouse.isButtonDown(0)) {
if ((y - border.top()) < buttonsize && currentscrollpixels > 0) {
dscroll -= getScrollAmount();
@ -43,6 +42,7 @@ public class ScrollableFrame implements IGuiFrame {
dscroll += getScrollAmount();
}
}
currentscrollpixels = (int) MuseMathUtils.clampDouble(currentscrollpixels + dscroll, 0, getMaxScrollPixels());
}
}