Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: schellenberghq on October 22, 2014, 10:02:41 AM

Title: Tab navigation works in editor but not browser.
Post by: schellenberghq on October 22, 2014, 10:02:41 AM
I've created my own tabIndex type navigation.

For some reason though, in the Unity editor pressing tab works just fine, even when a UIInput is the current selected object. However once I build for web and try it in the browser, suddenly my tabs stop working. However if I add a KeyNavigation script from NGUI it kind of works better.

Is NGUI doing something cancel my Tab presses because the UI element doesn't have a KeyNavigation script? It's just odd that it doesn't matter because it works in the editor, but not in the browser.

Any ideas?
Title: Re: Tab navigation works in editor but not browser.
Post by: ArenMook on October 23, 2014, 03:11:32 PM
Web plugin has different rules, as far as I know. Try stand-alone.
Title: Re: Tab navigation works in editor but not browser.
Post by: schellenberghq on November 03, 2014, 11:02:01 AM
Tabbing works stand alone, and in editor.

Webplayer still doesn't work, even if I use Up/Down arrows for the events. It's like NGUI is eating the event or something. This is only the case for UIInputs.

#Edit: In fact I'm fairly certain NGUI is eating the event somehow, because when I use the up/down arrow, instead of listening to my logic, the i-beam moves to the beginning or end of the typed input. How can override this behavior, or add onto it?

Yet... why would it only seem to override in the web player? Bwah...

Although somehow you have it working, but only if I use the UIKeyControl... then somehow tab works.

#Edit2: I ended up using Left+Control as Shift+Tab, and Right+Control as Tab.
Title: Re: Tab navigation works in editor but not browser.
Post by: ArenMook on November 04, 2014, 09:39:13 AM
NGUI listens to input events in UICamera.cs. Key navigation is around line 1600 (GetDirection calls), which in turn checks GetKeyDown/GetKeyUp which are bound to Input.GetKeyDown / Input.GetKeyUp by default.