Only input scroll wheel if we're within it

This commit is contained in:
Kam committed 2025-02-03 20:32:02 -05:00
1 parent d84092eeaf
commit a0ace95d35
1 file changed
+2 -1
@@ -332,7 +332,8 @@ public abstract class GuiNPCDiagram extends Gui {
// ---------------
public void drawDiagram(int mouseX, int mouseY) {
// Update zoom based on mouse scroll.
handleMouseScroll(Mouse.getDWheel());
if(isWithin(mouseX, mouseY))
handleMouseScroll(Mouse.getDWheel());
Minecraft mc = Minecraft.getMinecraft();
ScaledResolution sr = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);