Closed deepnight closed 3 years ago
From the advancedBase branch: The console hides before the !App.ME.anyInputHasFocus() check and is therefore always true when ESC is pressed. https://github.com/deepnight/gameBase/blob/2af1d7fc678c2dbd3567736cf425b622c24fbb1e/src/game/gm/Game.hx#L212 A quick and simple fix would be to hide the console after a 1 frame delay by overriding the hide() function:
advancedBase
!App.ME.anyInputHasFocus()
hide()
// Inside gameBase/src/ui/Console.hx override function hide() { App.ME.delayer.addF(() -> { bg.visible = false; tf.text = ""; hintTxt.text = ""; tf.cursorIndex = -1; }, 1); }
I'm quite new to Haxe so that may not be the best solution at all, but I hope it can still be useful!
From the
advancedBase
branch: The console hides before the!App.ME.anyInputHasFocus()
check and is therefore always true when ESC is pressed. https://github.com/deepnight/gameBase/blob/2af1d7fc678c2dbd3567736cf425b622c24fbb1e/src/game/gm/Game.hx#L212 A quick and simple fix would be to hide the console after a 1 frame delay by overriding thehide()
function:I'm quite new to Haxe so that may not be the best solution at all, but I hope it can still be useful!