Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: npritchard on December 29, 2013, 09:31:10 AM

Title: Nested UILabels inheriting parent's alpha
Post by: npritchard on December 29, 2013, 09:31:10 AM
Hi - I've noticed that nested UILabels appear to be inheriting parent's widget's alpha and couldn't see any obvious reference to this in the patch notes.

This is after upgrading to 3.0.8 from 3.0.6 f6.

The unnested appearance is the desired effect, however the nested layout is used extensively throughout the game and hence this is happening in a lot of places.

Wondering if anyone else is experiencing this?


[edit: I think this applies generic widget nesting - not just UILabels]
Title: Re: Nested UILabels inheriting parent's alpha
Post by: AGB on December 29, 2013, 12:26:53 PM
This is feature, not a bug. This is how it is working now.
Title: Re: Nested UILabels inheriting parent's alpha
Post by: npritchard on December 29, 2013, 12:33:33 PM
Ah, ok, must have missed that buried in the patch notes.

Thanks.
Title: Re: Nested UILabels inheriting parent's alpha
Post by: ArenMook on December 29, 2013, 06:43:46 PM
It was a part of 3.0.7 I think? It's not just widgets that nest alpha. All rects do, so if you have a widget, and it has a child panel, that panel is going to be affected by the widget's alpha. It was done this way to make it easy to fade out parts of the UI.
Title: Re: Nested UILabels inheriting parent's alpha
Post by: mrexcessive on February 22, 2014, 05:55:22 AM
Hi..
I would quite like to be able to have text/fonts on a chat window NOT inherit their parent alpha... so that scenery can be partially visible but still some fading to help with readability.


Is there a 'correct'/obvious place where I could change code to make this non-standard behaviour happen ?
Or would it be too painful... ;)

Thank you
Peter


Title: Re: Nested UILabels inheriting parent's alpha
Post by: ArenMook on February 22, 2014, 11:12:21 AM
Not parent them to the same object. That's the only way (and an obvious one!).
Title: Re: Nested UILabels inheriting parent's alpha
Post by: mrexcessive on February 22, 2014, 11:42:53 AM
Thank you for your quick reply.
OK... yes that seems to work exactly as I wanted... I mistakenly thought it would break the drag and drop, resize etc.... but that's all fine as you're sending the draws through the object links instead of relying on the hierarchy !!

Most excellent thank you.

See it working here... http://web2.mrexcessive.net/thingdo/ (http://web2.mrexcessive.net/thingdo/)
(this is a wip for miniLudumDare49...)


Cheers!
Peter