Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: harrisonpink on April 03, 2015, 12:27:04 AM
-
Hi all,
I would love to be able to choose when the user clicks a text field between having the normal mobile keyboard pop up and the numeric keyboard. I know Unity has TouchScreenKeyboardType.NumberPad, but I know NGUI is using its own UIInput script.
Any help to get this working would be very appreciated!
Thanks.
-
UIInput.keyboardType lets you specify what kind of keyboard it will be.
-
Thank you for the info! I'm not sure where to actually execute this code though. Right now, when you tap a text box that accepts input, it automatically pops open the keyboard. Where should I add the code that specifies what type of keyboard it should be?
(Teaching myself programming is hard! Thank you for your assistance!)
-
It's set in inspector on the UIInput when you are targeting a mobile platform.
-
Is this something I can change on the fly? I'm making a quiz app and some questions are words and some are numbers.
-
Yes. GetComponent<UIInput>().keyboardType = ...