mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-20 21:40:30 -07:00
Allow camera zooming by default without it in json
Also had to add an extra check if json isn't loaded
This commit is contained in:
parent
5792a3c92b
commit
299ebc243d
3 changed files with 5 additions and 2 deletions
|
|
@ -51,6 +51,8 @@ public class GlobalConfig {
|
|||
public static boolean USE_SHIFT_CLICK = true;
|
||||
public static boolean USE_TWEENING = true;
|
||||
public static boolean BILINEAR_MINIMAP = true;
|
||||
public static boolean MOUSEWHEEL_ZOOM = true;
|
||||
|
||||
public static int JS5_RESPONSE_TIMEOUT = 5000;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,5 +25,6 @@ public class GlobalJsonConfig {
|
|||
int server_port;
|
||||
int wl_port;
|
||||
int js5_port;
|
||||
boolean mouseWheelZoom;
|
||||
boolean mouseWheelZoom = GlobalConfig.MOUSEWHEEL_ZOOM;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public final class JavaMouseWheel extends MouseWheel implements MouseWheelListen
|
|||
this.anInt4233 += arg0.getWheelRotation();
|
||||
int diff = this.anInt4233 - previous;
|
||||
|
||||
if (GlobalJsonConfig.instance.mouseWheelZoom && Keyboard.instance.isShiftPressed()) {
|
||||
if (((GlobalJsonConfig.instance != null && GlobalJsonConfig.instance.mouseWheelZoom) || (GlobalJsonConfig.instance == null && GlobalConfig.MOUSEWHEEL_ZOOM)) && Keyboard.instance.isShiftPressed()) {
|
||||
Camera.ZOOM = clamp(200, 1200, Camera.ZOOM + (diff >= 0 ? 50: -50));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue