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

@ -1,8 +1,9 @@
{
"ip_management": "test.2009scape.org",
"ip_address": "test.2009scape.org",
"ip_management": "localhost",
"ip_address": "localhost",
"world": 1,
"server_port": 43594,
"wl_port": 5555,
"js5_port": 43593
"wl_port": 43595,
"js5_port": 43595,
"mouseWheelZoom": true
}

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));
}
}