diff --git a/src/client/java/minicraft/screen/TutorialDisplayHandler.java b/src/client/java/minicraft/screen/TutorialDisplayHandler.java index 06be9c594..1e86d9ea0 100644 --- a/src/client/java/minicraft/screen/TutorialDisplayHandler.java +++ b/src/client/java/minicraft/screen/TutorialDisplayHandler.java @@ -62,7 +62,7 @@ private static void loadTutorialElement(String criterionName, JSONObject json) { private static ControlGuide currentGuide = null; static { - controlGuides.add(new ControlGuide(120, "move-up|move-down|move-left|move-right", + controlGuides.add(new ControlGuide(300, "move-up|move-down|move-left|move-right", () -> Localization.getLocalized("minicraft.control_guide.move", String.format("%s|%s|%s|%s", Game.input.getMapping("move-up"), Game.input.getMapping("move-left"), Game.input.getMapping("move-down"), @@ -90,16 +90,11 @@ private ControlGuide(int duration, String key, Supplier display) { } private void tick() { - if (this.key.contains("|")) { - InputHandler.Key key = new InputHandler.Key(); - for (String keyposs: this.key.split("\\|")) { - InputHandler.Key aKey = Game.input.getKey(keyposs); - key.down = key.down || aKey.down; - key.clicked = key.clicked || aKey.clicked; + if (key.contains("|")) { + for (String k : key.split("\\|")) { + if (Game.input.inputDown(k)) interactedDuration++; } - - if (key.down) interactedDuration++; - } else if (Game.input.getKey(key).down) + } else if (Game.input.inputDown(key)) interactedDuration++; } } @@ -188,7 +183,8 @@ public static void tick(InputHandler input) { return; } - currentGuide.tick(); + if (Game.getDisplay() == null) + currentGuide.tick(); } if (currentOngoingElement != null) {