Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Mininthebox on Tue 07/01/2025 18:19:03

Title: GUI text box error
Post by: Mininthebox on Tue 07/01/2025 18:19:03
Hello,
So im facing an error with the Gui text box. I want all speech to be displayed in a specific area, so I made a text box GUI and in general settings i have set the custom text-window GUI to the ID of the GUI. But its displaying that "GUI set as text window but is not actually a text window GUI". I don't know why its showing me this error.
Is there a better way to do this or am I making an error?
Thanks!
Title: Re: GUI text box error
Post by: eri0o on Tue 07/01/2025 18:58:55
There is a special type of GUI for text box in terms of 9-slice - you set the 4 corners and 4 edges and the background and AGS will resize it accordingly when drawing the textbox. The property in general settings is for this use.

It seems this is not what you want.

You have a specific area on the screen and would like to always use that, and not have the box to be dependant on any character position. Is this what you want?
Title: Re: GUI text box error
Post by: Snarky on Tue 07/01/2025 19:31:13
Note that in AGS there is a difference between a TextBox (a kind of GUIControl) and a TextWindow (a kind of GUI). You must use a TextWindow for custom text display. To create a TextWindow GUI, right-click on the GUIs node in the project tree.
Title: Re: GUI text box error
Post by: Khris on Tue 07/01/2025 22:17:49
The relevant part of the manual can be found here:
https://adventuregamestudio.github.io/ags-manual/EditorGUI.html#customized-text-windows
Title: Re: GUI text box error
Post by: Joacim Andersson on Thu 09/01/2025 11:50:10
Quote from: Mininthebox on Tue 07/01/2025 18:19:03I want all speech to be displayed in a specific area
If it's the speech itself you want to appear in a specific area, you can use the SayAt() method of a character.player.SayAt(someXvalue, someYvalue, widthOfText, "What am I saying?");But maybe I've misunderstood you.