mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2026-08-22 10:55:17 -06:00
Fixed shift mouse wheel zoom on Windows
This commit is contained in:
parent
299ebc243d
commit
41ea81d31a
2 changed files with 1 additions and 14 deletions
|
|
@ -37,7 +37,7 @@ public final class JavaMouseWheel extends MouseWheel implements MouseWheelListen
|
|||
this.anInt4233 += arg0.getWheelRotation();
|
||||
int diff = this.anInt4233 - previous;
|
||||
|
||||
if (((GlobalJsonConfig.instance != null && GlobalJsonConfig.instance.mouseWheelZoom) || (GlobalJsonConfig.instance == null && GlobalConfig.MOUSEWHEEL_ZOOM)) && Keyboard.instance.isShiftPressed()) {
|
||||
if (((GlobalJsonConfig.instance != null && GlobalJsonConfig.instance.mouseWheelZoom) || (GlobalJsonConfig.instance == null && GlobalConfig.MOUSEWHEEL_ZOOM)) && Keyboard.pressedKeys[Keyboard.KEY_SHIFT]) {
|
||||
Camera.ZOOM = clamp(200, 1200, Camera.ZOOM + (diff >= 0 ? 50: -50));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -337,19 +337,6 @@ public final class Keyboard implements KeyListener, FocusListener {
|
|||
}
|
||||
}
|
||||
|
||||
public boolean isShiftPressed() {
|
||||
//I did this the Jagex(TM) way just for you Pazaz xoxo
|
||||
boolean isPressed = false;
|
||||
for (int keyCode : eventQueue) {
|
||||
if (keyCode == 81)
|
||||
isPressed = true;
|
||||
else if (keyCode == ~(81 & 0xFFFFFF7F))
|
||||
isPressed = false;
|
||||
}
|
||||
|
||||
return isPressed;
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!uf", name = "keyTyped", descriptor = "(Ljava/awt/event/KeyEvent;)V")
|
||||
@Override
|
||||
public final void keyTyped(@OriginalArg(0) KeyEvent event) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue