From 916e6eadb90608f8bf9eae64e04e896bcd55c793 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Sat, 18 Sep 2021 14:44:41 -0600 Subject: [PATCH] clear UI when escape is pressed --- projects/nat-flixel-playground/source/PlayState.kiss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/nat-flixel-playground/source/PlayState.kiss b/projects/nat-flixel-playground/source/PlayState.kiss index d1773408..a1551d5a 100644 --- a/projects/nat-flixel-playground/source/PlayState.kiss +++ b/projects/nat-flixel-playground/source/PlayState.kiss @@ -30,6 +30,10 @@ (when (and textInput !textInput.alive) (set textInput.callback null) (set textInput null)) + + // Press ESCAPE to clear the UI and cancel any input + (when FlxG.keys.justPressed.ESCAPE + (clearUI)) // Scroll the UI with the mouse: (var UI_SCROLL_FACTOR 2)