shift-click in GUI to jump 5 increments

This commit is contained in:
octarine-noise
2014-08-15 20:21:34 +02:00
parent f107fe0e1a
commit e88a1ba5ae
6 changed files with 18 additions and 16 deletions

View File

@@ -43,8 +43,8 @@ public class OptionIntegerWidget implements IOptionWidget {
screen.drawCenteredString(fontRenderer, Integer.toString(option.value), xOffset + x + width - 20 - numWidth / 2, yOffset + y + 5, numColor);
}
public void onAction(int buttonId) {
if (buttonId == idDecrement) option.decrement();
if (buttonId == idIncrement) option.increment();
public void onAction(int buttonId, boolean shiftPressed) {
if (buttonId == idDecrement) option.decrement(shiftPressed ? 5 :1);
if (buttonId == idIncrement) option.increment(shiftPressed ? 5 :1);
}
}