Page 1 of 1

Entering Text Input Response On Touch Screen

Posted: Fri Jan 31, 2020 8:09 pm
by SilentNocturne
Hello,
this is probably a pretty elementary question,
but I'm a bit stuck at the moment and I'd really appreciate some help.

I'm trying to let the player save their name in a variable by using the [var=?VariableName] markup tag which opens
a text input bar for typing and after pressing enter the variable is saved. This works fine with a keyboard on a computer, but on a touch screen there is no way to press enter to confirm the name. Using a touch screen, how might I go about entering the new name and saving the variable?

Re: Entering Text Input Response On Touch Screen

Posted: Fri Jan 31, 2020 8:56 pm
by Tony Li
Hi,

Inspect the dialogue UI's Text Field UI > Text Field Panel. Add a UI button that the player can tap. Configure its OnClick() button to call the main Text Field UI's StandardUIInputField.AcceptTextInput() method.

Re: Entering Text Input Response On Touch Screen

Posted: Sat Feb 01, 2020 1:32 am
by SilentNocturne
Got it! Thanks for the quick reply, Tony!

Re: Entering Text Input Response On Touch Screen

Posted: Sat Feb 01, 2020 7:49 am
by Tony Li
Glad to help!