Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: CynicalCode on November 14, 2012, 05:26:25 PM

Title: Support for keyboard navigation (e.g. tabbing between UIInputs, enter on button)
Post by: CynicalCode on November 14, 2012, 05:26:25 PM
Hey there,

I noticed that Windward (http://www.tasharen.com/windward/game.html) has a login screen where the user can tab through username, password and even onto the buttons.

Are there samples or code snippets to show how this was done?

Cheers,

Code
Title: Re: Support for keyboard navigation (e.g. tabbing between UIInputs, enter on button)
Post by: ArenMook on November 14, 2012, 05:59:49 PM
UIButtonKeys script can be used for that purpose. Just attach it to something with a collider (button, input, etc), then set what gets selected on up, right, down, tab, etc. Holding Shift reverses the operation, and they are intuitive (ex: if you specify down and nothing else, hitting Tab will act as if you pressed down).
Title: Re: Support for keyboard navigation (e.g. tabbing between UIInputs, enter on button)
Post by: CynicalCode on November 14, 2012, 09:39:07 PM
This works a treat, thank-you!