Author Topic: 3.0 UIInput Select on Tab Function Broken?  (Read 2882 times)

chuk2bp

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 13
    • View Profile
3.0 UIInput Select on Tab Function Broken?
« on: September 28, 2013, 03:46:56 PM »
Hey Michael,

I'm having some strange issues after updating getting UIInput's Select on Tab function to actually select the object when hitting Tab. Specifically, when selecting another UIInput after hitting tab on the "previous" UIInput. They're set up correctly, the next UIInput is definitely the targeted GameObject on the UIInput control, but when hitting tab it's as if the key event is not registering at all...

Just want to see if you can confirm this problem on your side. Thanks again!

phenotype

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
Re: 3.0 UIInput Select on Tab Function Broken?
« Reply #1 on: December 23, 2013, 01:57:23 PM »
Having a similar, possibly related problem. I have six inputs, when I tab from the first to second, no problem but when I tab from second to third it jumps to the last. After inserting debugs through the uiinput script I found that it seems to be repeating the tab multiple times because I can see it jump from control to control in code.
« Last Edit: December 23, 2013, 02:17:24 PM by phenotype »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 3.0 UIInput Select on Tab Function Broken?
« Reply #2 on: December 23, 2013, 02:00:39 PM »
Which version of NGUI?

phenotype

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
Re: 3.0 UIInput Select on Tab Function Broken?
« Reply #3 on: December 23, 2013, 02:15:48 PM »
Sorry, should have included it; 3.0.2. I have a temporary fix. I added a static bool to the UIInput script called tabbed and set it to false, then made the following change to update;

  1.                
  2. if (selectOnTab != null && Input.GetKeyDown(KeyCode.Tab) && tabbed == false)
  3. {
  4.         tabbed = true;
  5.         Debug.Log("Tabbing from " + UICamera.selectedObject.name + " to " + selectOnTab.name);
  6.         UICamera.selectedObject = selectOnTab;
  7. }
  8. else
  9. {
  10.         tabbed = false;
  11. }
  12.  

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 3.0 UIInput Select on Tab Function Broken?
« Reply #4 on: December 23, 2013, 03:14:37 PM »
You need to update to the latest because this was fixed quite a while ago.

phenotype

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
Re: 3.0 UIInput Select on Tab Function Broken?
« Reply #5 on: December 23, 2013, 09:22:04 PM »
Sorry, when I saw the readme versioned at 3.0.2 I thought I was up to date. Problem is resolved.