From c1d044c28d0b3fc3168240bbd521d10cadd32c1f Mon Sep 17 00:00:00 2001 From: MachineMuse Date: Mon, 7 Sep 2015 14:19:58 -0600 Subject: [PATCH] fix clickability of arrows on scrollable frame --- .../net/machinemuse/general/gui/frame/ScrollableFrame.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/net/machinemuse/general/gui/frame/ScrollableFrame.java b/src/main/scala/net/machinemuse/general/gui/frame/ScrollableFrame.java index be70fc9..296eaf6 100644 --- a/src/main/scala/net/machinemuse/general/gui/frame/ScrollableFrame.java +++ b/src/main/scala/net/machinemuse/general/gui/frame/ScrollableFrame.java @@ -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()); } }