1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-01-07 16:00:31 +00:00

Correctly offset scroll cursor positions

Fixes #330
This commit is contained in:
SquidDev 2020-01-13 14:59:56 +00:00
parent 0f82a4589b
commit 1862a439e2

View File

@ -55,7 +55,8 @@ public class WidgetWrapper implements IGuiEventListener
@Override @Override
public boolean mouseScrolled( double x, double y, double delta ) 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 @Override