From a9b822089f23802d997b6b493e6306495bfb3132 Mon Sep 17 00:00:00 2001 From: Joshua Fan Date: Thu, 14 Nov 2019 11:41:15 -0800 Subject: [PATCH] Make Esc mirror back button behavior in settings (#1061) --- .../io/anuke/mindustry/ui/dialogs/SettingsMenuDialog.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/io/anuke/mindustry/ui/dialogs/SettingsMenuDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/SettingsMenuDialog.java index f351fd133a..fcf5a882a2 100644 --- a/core/src/io/anuke/mindustry/ui/dialogs/SettingsMenuDialog.java +++ b/core/src/io/anuke/mindustry/ui/dialogs/SettingsMenuDialog.java @@ -360,7 +360,11 @@ public class SettingsMenuDialog extends SettingsDialog{ keyDown(key -> { if(key == KeyCode.ESCAPE || key == KeyCode.BACK){ - hide(); + if(prefs.getChildren().first() != menu){ + back(); + }else{ + hide(); + } } }); }