rafaskb/typing-label

Parent alpha not working

fgnm opened this issue · 4 comments

fgnm commented

If the typing label is placed inside a scene2d group that fades (change alpha value) the label doesn't change alpha accordingly. The alpha works only if the text is wrapped between {GRADIENT} or {RAINBOW} but simple colors don't change alpha anymore.

This is a screen of a group with several buttons and labels with 0.4 alpha value
image

Labels and buttons correctly apply parent alpha, while the typing label only works on the Treasures word which is wrapped into a {GRADIENT} tag

Huh that's odd, on my end changing the alpha of parents properly propagates it to all glyphs, even the ones without any tokens.
image

There was a big change regarding how colors are applied to glyphs in the latest update, which is only compatible with libGDX 1.11.0 (see https://github.com/rafaskb/typing-label/releases/tag/1.3.0). Can you please double check which TypingLabel and libGDX versions you're using?

fgnm commented

Yes, I'm sure to be on latest versions both of typing labels and libGDX.. I tried to switch to textratypist which has a 1:1 implementation of this library and the bug was fixed there.

Yes, I'm sure to be on latest versions both of typing labels and libGDX.. I tried to switch to textratypist which has a 1:1 implementation of this library and the bug was fixed there.

Would you be able to provide some code containing the issue? I can't seem to reproduce it on my end.

Yes, I'm sure to be on latest versions both of typing labels and libGDX.. I tried to switch to textratypist which has a 1:1 implementation of this library and the bug was fixed there.

Woohoo! I'm 1:1! (I think.) If I remember this correctly, the typing-label code I initially copied into TextraTypist didn't fully handle parentAlpha from scene2d, but by sufficiently messing with the Batch color, it did get working without a ton of effort. Any fixes I had are unlikely to directly apply to typing-label, though, because of how differently the libraries store color internally...