Put scrollwheel zoom behind a config option

This commit is contained in:
ceikry 2022-06-19 12:20:03 -05:00
parent 443187fb60
commit e154e82fdb
3 changed files with 7 additions and 5 deletions

View file

@ -25,4 +25,5 @@ public class GlobalJsonConfig {
int server_port;
int wl_port;
int js5_port;
boolean mouseWheelZoom;
}

View file

@ -37,7 +37,7 @@ public final class JavaMouseWheel extends MouseWheel implements MouseWheelListen
this.anInt4233 += arg0.getWheelRotation();
int diff = this.anInt4233 - previous;
if (Keyboard.instance.isShiftPressed()) {
if (GlobalJsonConfig.instance.mouseWheelZoom && Keyboard.instance.isShiftPressed()) {
Camera.ZOOM = clamp(200, 1200, Camera.ZOOM + (diff >= 0 ? 50: -50));
}
}