diff --git a/src/main/java/dan200/computercraft/client/gui/widgets/WidgetWrapper.java b/src/main/java/dan200/computercraft/client/gui/widgets/WidgetWrapper.java index df5c46f6b..4eeeaf8ee 100644 --- a/src/main/java/dan200/computercraft/client/gui/widgets/WidgetWrapper.java +++ b/src/main/java/dan200/computercraft/client/gui/widgets/WidgetWrapper.java @@ -55,7 +55,8 @@ public class WidgetWrapper implements IGuiEventListener @Override public boolean mouseScrolled( double x, double y, double delta ) { - return listener.mouseScrolled( x, y, delta ); + double dx = x - this.x, dy = y - this.y; + return dx >= 0 && dx < width && dy >= 0 && dy < height && listener.mouseScrolled( dx, dy, delta ); } @Override