Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - BrienKing

Pages: [1]
1
NGUI 3 Support / Re: Feature Request: Add Tab Order to controls
« on: October 07, 2015, 09:19:27 PM »
Except that Buttons do not have the onTab property on them, so you cannot set that.  So instead it has to do the GoLeft/Right/etc...

If every control had a "TabOrder" field (int) and the code searched for the control with the next control where the tab order was greater than the current controls tab order, you could skip the whole searching in different directions and would give us a lot more control over how the tabbing worked.

2
NGUI 3 Support / Re: Confused about UIPanel and Sprite Behavior
« on: October 07, 2015, 09:11:36 PM »
If you look at picture #2, you'll see that the Sprite is a child of the Panel.

3
NGUI 3 Support / Confused about UIPanel and Sprite Behavior
« on: October 06, 2015, 04:45:03 AM »
I dropped a panel on the scene, plus a couple labels, text boxes, and buttons on it.

Since the panel doesn't have a Sprite property I decided to add a Sprite to it so I could have a background.

The problem is, is if I move the panel, the Sprite does not move with it.

The Anchoring of the Sprite appears to be on the Camera and not the Panel it's a child of even though the Target says my panel.

What am I doing wrong and is there a better way to do what I want?

4
Inside a panel, I have two input boxes and two buttons.  On all the controls I added the "UI Key Navigation" script.  I want the Username control to have focus when the game starts, so I set the "Starts Selected" option on the UIKeyNavigation script that is part of the Username TextBox.

However, when the game starts, it does not have focus.

Changing the code in UIKeyNavigation.cs from this:

  1.         void Start ()
  2.         {
  3. #if UNITY_EDITOR
  4.                 if (!Application.isPlaying) return;
  5. #endif
  6.                 mStarted = true;
  7.                 if (startsSelected && isColliderEnabled)
  8.                 UICamera.hoveredObject = gameObject;
  9.         }
  10.  
  11.  

To this:

  1.         void Start ()
  2.         {
  3. #if UNITY_EDITOR
  4.                 if (!Application.isPlaying) return;
  5. #endif
  6.                 mStarted = true;
  7.                 //if (startsSelected && isColliderEnabled)
  8.                 if (startsSelected)
  9.                 {
  10.                         UICamera.hoveredObject = gameObject;
  11.                         UIInput inp = gameObject.GetComponent<UIInput>();
  12.                         if (inp != null)
  13.                                 inp.isSelected = true;
  14.                 }
  15.         }
  16.  
  17.  

Fixes my issue.  Not sure why you are checking if the collider is enabled, so my solution may have an unforeseen side effect.

5
NGUI 3 Support / Feature Request: Add Tab Order to controls
« on: October 05, 2015, 01:02:26 AM »
Right now, I am fighting with Tabbing through controls.

Inside a panel, I have two input boxes and two buttons.  On all the controls I added the "UI Key Navigation" script. 

The Text Boxes have a "Tab" option, but the buttons do not.  So I decided to leave them all blank to take the default behavior.

When I hit Tab, it goes from Useraname to Password to Create New Account and then it just cycles between Password and Create New Account.  I can fix the cycle somewhat, but it will still leave out the "Username".

Ultimately though, it should go Username->Password->Sign In->Create New Account-><back to Username>.

If we had a "Tab Order" field it would be pretty simple to search for the next control in order and move to it. 

The quicker fix would be if the Button had a Tab object I could attach to like the Text Boxes.

Pages: [1]