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 - brisck1

Pages: [1]
1
NGUI 3 Support / Re: UIButton Keys not respecting disabled buttons?
« on: January 05, 2014, 05:36:45 AM »
Ok so I tried the code revision this morning and it doesn't seem to make any difference - I'm still able to select disabled items. Also, it seems the 'Select On Click' option no longer works at all...  :(

2
NGUI 3 Support / Re: UIButton Keys not respecting disabled buttons?
« on: January 04, 2014, 11:56:43 AM »
Awesome, thanks! I will give that a go!

3
NGUI 3 Support / UIButton Keys not respecting disabled buttons?
« on: January 03, 2014, 01:43:05 PM »
So I've been working on setting up my UI so that it can be navigated via keyboard and a controller, but a problem I seem to be having is that the UIButton Keys doesn't seem to respect if a button is disabled or not. Firstly it will continue to cycle through the disabled items (although it is not visible), but worst of all it still allows the user to select the invisibly selected item when pressing enter or a controller button.

Everything works fine for the mouse, so I'm not sure what's going on with the keyboard controls. At the moment i'm using the input "OnClick" to activate a button's function, perhaps this is not the best way for a mouse + Keyboard + controller combo?

4
NGUI 3 Support / Re: Subtitles/captions in NGUI?
« on: December 29, 2013, 05:52:10 AM »
Thanks for the suggestion, initially it didn't work how I needed it to, so I took a look at the code and changed it to:

  1.     protected override void OnAnchor ()
  2.     {
  3.         if (mOverflow == Overflow.ResizeFreely)
  4.         {
  5.             mOverflow = Overflow.ShrinkContent;
  6.         }
  7.         else if (mOverflow == Overflow.ResizeHeight)
  8.         {
  9.             if (topAnchor.target != null)
  10.             {
  11.                 mOverflow = Overflow.ShrinkContent;
  12.             }
  13.         }
  14.         base.OnAnchor();
  15.     }

Which allowed me to set a bottom anchor and not have one for the top, although ideally it should work both ways (in the original code resize height only works if there are no anchors on the top and bottom, whereas it should be top or bottom - but I have no idea how to do that in code)


The more I think about it, the more it seems odd that anchored labels must be always be forced to shrink content - there are many situations I can think of where being able to override the overflow would be useful, especially if you just want to anchor something with dynamic content to a certain side of the screen and not have to worry about screen resolution, etc.

5
NGUI 3 Support / Re: Subtitles/captions in NGUI?
« on: December 28, 2013, 08:56:59 AM »
Hi Aren,

Thanks for the reply! So it turns out UI Stretch was not the answer anyway (it was still not anchoring properly) so I came back here and saw your suggestion and thought i'd give it a go. However, I'm having issues when it comes to setting the label's overflow to "Resize Height". Whenever an anchor is set on a Label the overflow automatically switches back to "ShrinkContent" even if I set it to Height after setting an anchor, it will still switch to "ShrinkContent".

I'm not sure if i'm doing something wrong or if it is a bug - perhaps you could post a working example I could look at?

Thanks

6
NGUI 3 Support / Re: Subtitles/captions in NGUI?
« on: December 23, 2013, 05:06:01 PM »
On further experimentation it seems the UIStretch script does pretty much what I want! :)

7
NGUI 3 Support / Subtitles/captions in NGUI?
« on: December 23, 2013, 04:19:50 PM »
So I'm relatively new to NGUI, and am desperately trying to get a system set up with NGUI to display subtitles (after failing with Unity's regular UI) and have not had much luck.

So far my thinking was to set up a Label and then put the subtitle text into it dynamically via a script when needed. The problem I'm having is getting the label to behave the way I want it, for example:

  • It needs to be anchored to the bottom of the screen regardless of screens size
  • It needs to adapt to the width of the screen
  • It needs a sprite as a background panel which also adapts to the size of the label (for readability)
  • and it also needs to automatically adapt it's height to fit the amount of text inserted into it.

That last point is where I'm having the most issues. I thought setting the label overflow to Resize Height would give me the desired effect, but for some reason it keeps reverting back to Shrink content to fit text into the box instead of expanding the box size upward.

Perhaps I'm not taking the right approach here? Could you give me some advice on the best way to tackle this?

Thanks.

Pages: [1]