From 66185662891ff423c2cc2c762b780c96e1ad6d35 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Fri, 26 Nov 2021 14:42:08 +0900 Subject: - Ctrl press to add or subtract 5 --- .../syeyoung/dungeonsguide/gui/elements/MIntegerSelectionButton.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/java/kr/syeyoung') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MIntegerSelectionButton.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MIntegerSelectionButton.java index 9f5ac258..a80b0e7a 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MIntegerSelectionButton.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MIntegerSelectionButton.java @@ -21,6 +21,7 @@ package kr.syeyoung.dungeonsguide.gui.elements; import kr.syeyoung.dungeonsguide.gui.MPanel; import lombok.Getter; import lombok.Setter; +import org.lwjgl.input.Keyboard; import java.awt.*; @@ -56,7 +57,7 @@ public class MIntegerSelectionButton extends MPanel { dec.setOnActionPerformed(new Runnable() { @Override public void run() { - data--; + data -= (Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) ? 5 : 1); updateSelected(); onUpdate.run(); } @@ -64,7 +65,7 @@ public class MIntegerSelectionButton extends MPanel { inc.setOnActionPerformed(new Runnable() { @Override public void run() { - data ++; + data += (Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) ? 5 : 1); updateSelected(); onUpdate.run(); } -- cgit