Overlay Z order?

Started by Laura Hunt, Fri 28/08/2020 19:45:55

Previous topic - Next topic

Laura Hunt

Hi all,

As mentioned in another thread, I have created a lantern effect using a GUI with a transparent "hole" in the middle.

When my player character speaks, his lines appear on top of this GUI, as expected. However, when I use SayBackground for another character, their lines appear under the GUI, making them illegible. I have also tried using Overlay.CreateTextual, but unfortunately, with the same results.

(Click below if you don't mind spoilers if you want to see what I mean).

Spoiler
[close]

My question, then, is obvious: is there any way to assign some Z-order of sorts to an overlay, or are overlays always drawn on the background? Is my only option to put this character's lines in a label on a second GUI with a higher Z-order than my lantern?

Cassiebsg

Maybe you could try and draw the text on the lantern GUI? That way you wouldn't need a new GUI, though not sure that would work, since I haven't tried it and don't know if there's any special code that would interfere with the text being there.

There are those who believe that life here began out there...

Crimson Wizard

No, currently there's no way to control overlay's z order.

Laura Hunt

Quote from: Cassiebsg on Fri 28/08/2020 20:14:53
Maybe you could try and draw the text on the lantern GUI? That way you wouldn't need a new GUI, though not sure that would work, since I haven't tried it and don't know if there's any special code that would interfere with the text being there.

Oh, nice. I pretty much never use Draw commands, so it hadn't crossed my mind. It might work, thanks for the tip :)

Quote from: Crimson Wizard on Fri 28/08/2020 21:04:11
No, currently there's no way to control overlay's z order.

Oh, well. Thanks for confirming!

SMF spam blocked by CleanTalk