Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: bx83 on Mon 19/08/2019 09:05:48

Title: How do I use a custom text GUI to display anything else?
Post by: bx83 on Mon 19/08/2019 09:05:48
I have this:

(https://redrom.ltd/img/description1.png)

It displays the current Description of a hotspot, object etc. at the top of the screen.
Then I learned about this:

(https://redrom.ltd/img/description2.png)
(https://redrom.ltd/img/descriptiontest.png)

Which allows custom borders for everything inside of it.
However - How do I make the 1st one the 2nd?

There is no option for adding a text label in the text window gui.
Title: Re: How do I use a custom text GUI to display anything else?
Post by: Snarky on Mon 19/08/2019 10:30:16
Text Window GUIs can be used when you call Display(), and for Say() if you are using Sierra-style speech. See manual:
https://www.adventuregamestudio.co.uk/manual/ags13.htm#TextWin
https://www.adventuregamestudio.co.uk/manual/ags53.htm#SetTextWindowGUI
https://www.adventuregamestudio.co.uk/manual/ags38.htm#Gamevariables (game.speech_text_gui)

AFAIK you can't use them for non-blocking text display.

If you want a tiled border/background for some other GUI, you have to render it yourself. This alternate version of the SpeechBubble module (https://www.adventuregamestudio.co.uk/forums/index.php?topic=56121.msg636585590#msg636585590) has code for that. (The key functions are drawImageTiled() and parts of render() â€" specifically the "Draw outline", case eRenderSprite section.)