mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2026-09-10 10:37:04 -06:00
Put scrollwheel zoom behind a config option
This commit is contained in:
parent
443187fb60
commit
e154e82fdb
3 changed files with 7 additions and 5 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
@ -25,4 +25,5 @@ public class GlobalJsonConfig {
|
|||
int server_port;
|
||||
int wl_port;
|
||||
int js5_port;
|
||||
boolean mouseWheelZoom;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue