Author Topic: Nested UILabels inheriting parent's alpha  (Read 3232 times)

npritchard

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Nested UILabels inheriting parent's alpha
« 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]
« Last Edit: December 29, 2013, 10:24:18 AM by npritchard »

AGB

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 74
    • View Profile
    • Steam Defense
Re: Nested UILabels inheriting parent's alpha
« Reply #1 on: December 29, 2013, 12:26:53 PM »
This is feature, not a bug. This is how it is working now.
I'm a busy man... I have places to go,monsters to kill...

npritchard

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: Nested UILabels inheriting parent's alpha
« Reply #2 on: December 29, 2013, 12:33:33 PM »
Ah, ok, must have missed that buried in the patch notes.

Thanks.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Nested UILabels inheriting parent's alpha
« Reply #3 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.

mrexcessive

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Nested UILabels inheriting parent's alpha
« Reply #4 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



ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Nested UILabels inheriting parent's alpha
« Reply #5 on: February 22, 2014, 11:12:21 AM »
Not parent them to the same object. That's the only way (and an obvious one!).

mrexcessive

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Nested UILabels inheriting parent's alpha
« Reply #6 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/
(this is a wip for miniLudumDare49...)


Cheers!
Peter