Entering Text Input Response On Touch Screen

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
SilentNocturne
Posts: 2
Joined: Thu Jan 30, 2020 11:26 pm

Entering Text Input Response On Touch Screen

Post 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?
Attachments
Screen Shot 2020-01-31 at 7.04.26 PM.png
Screen Shot 2020-01-31 at 7.04.26 PM.png (212.66 KiB) Viewed 306 times
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Entering Text Input Response On Touch Screen

Post 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.
SilentNocturne
Posts: 2
Joined: Thu Jan 30, 2020 11:26 pm

Re: Entering Text Input Response On Touch Screen

Post by SilentNocturne »

Got it! Thanks for the quick reply, Tony!
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Entering Text Input Response On Touch Screen

Post by Tony Li »

Glad to help!
Post Reply