It also requires the user to click somewhere else, to unfocus the text input so it’s saved or something, can I make it so it doesn’t require that extra click?
Im super new to gdevelop and programming in general but i think i figured out a way to do this
I set my text input to a text area and essentially instead of the event being for the return button my event is if the text input contains a new line (it doesnt show it well in the screenshot but its literally typed out as
"
"
)
my intention is a command line, so when the new line event happens it sets a global text variable (CurrentCommand) to the the text inputs string and then sets the text input to be empty
you might notice that the text input will still have that animation of moving to the next line, what i did was add a text box with a event that made it copy a 2nd global text variable (CurrentText), set the text input opacity to 1 (and moved it to the side) so that the text box is what looks like its typing and made an event that made the text input be constantly focused on (so theres not an issue with the user not being able to type in the text input)
I just stumbled over this post while searching for a solution to the same problem (not being able to unfocus the input field). Like you, I didn’t want to force my players to use a mouse.
As this is quite an old thread, I’m sure I’m not the first person to find the solution, but just in case someone else struggles with text inputs and stumbles over this forum post, look for the “input is submitted” condition.
I don’t know how long ago the “input is submitted” condition was added to GDevelop - it may have been added in response to lots of people looking for a solution…? In any case, I hope this helps someone.