NAT playground disable textinput callback immediately on enter

This commit is contained in:
2021-09-18 14:52:15 -06:00
parent 543f8aad63
commit 547dad9e66

View File

@@ -28,7 +28,6 @@
(when (and !textInput FlxG.keys.justPressed.ENTER) (when (and !textInput FlxG.keys.justPressed.ENTER)
(typeCommand)) (typeCommand))
(when (and textInput !textInput.alive) (when (and textInput !textInput.alive)
(set textInput.callback null)
(set textInput null)) (set textInput null))
// Press ESCAPE to clear the UI and cancel any input // Press ESCAPE to clear the UI and cancel any input
@@ -91,6 +90,7 @@
->:Void [text action] ->:Void [text action]
(case [text action] (case [text action]
([text FlxInputText.ENTER_ACTION] ([text FlxInputText.ENTER_ACTION]
(set textInput.callback null)
(hideUI textInput) (hideUI textInput)
// This part is hacky... // This part is hacky...
(set lastUI textInputLabel) (set lastUI textInputLabel)