Author Topic: Support for keyboard navigation (e.g. tabbing between UIInputs, enter on button)  (Read 3206 times)

CynicalCode

  • Guest
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
« Last Edit: November 14, 2012, 05:29:37 PM by CynicalCode »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
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).

CynicalCode

  • Guest
This works a treat, thank-you!