GUI pushes off spoken text

Started by hedgefield, Thu 08/09/2011 13:29:00

Previous topic - Next topic

hedgefield

So I'm trying to put a little semitransparent textbox behind the speech text in my game, but there is something funky going on when I try to line the two up.

I have one GUI, 1000x64, left:100, top:392.
Then I use a SayAt command to put the text on top of it, but then this happens:



First of all 430 seems way too far from 392 to give me that little spacing between the top of the box and the text (confirmed when putting SayAt at 392 the text hovers halfway above the box), but then a two-pixel difference makes the text jump down all the way below the box! Is there some sort of issue with displaying text over a GUI that I am unaware of?

Khris

This is deliberate; the status line shouldn't cover spoken text so the "box" containing the displayed message is moved out of the way if it overlaps with a GUI.

I'm not sure if it's possible to turn this off.

One workaround: use a semi-transparent, non-clickable character with baseline 1 and put a dynamically cropped black sprite into the first loop & frame of their view.

Another way is to code your own Say function and use a label on a GUI of equal dimensions.

hedgefield

Thanks Khris. Hm well I can work around that I suppose. I tried the custom say function before, I just couldn't get my head around building a queue at the time. I had everything else in place; Display text that closed itself after a timeout depending on the length of the string, position over characters and all, but queueing stuff up so you can skip it one line at a time was the missing link. I could integrate the QueuedSpeech module, but it seems like a lot of effort, in this case a non-clickable character should do fine, it's not a dialogue-heavy game.

SMF spam blocked by CleanTalk