Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Raggit on Tue 30/12/2003 00:56:23

Title: Changing the default location of text windows
Post by: Raggit on Tue 30/12/2003 00:56:23
How can I change the default coordinants of message windows?

I'd like them to popup at the bottom of the screen without having specifiaclly code each one to do so.
Title: Re:Changing the default location of text windows
Post by: Scorpiorus on Tue 30/12/2003 13:08:55
Of course you could have a custom GUI and print all the messages on the label, but I'd suggest to look at DisplayAt() script function.

You can have:

//global script:

// Display parameters:
int dX = xxx;
int dY = xxx;
int dWidth = xxx;

//at the end of the global script
export LOCATION;

//script header:
#define LOCATION dX, dY, dWidth
import int LOCATION;

then in script:

DisplayAt(LOCATION, "blah blah %d %s", 1, buffer);
Title: Re:Changing the default location of text windows
Post by: Pumaman on Tue 30/12/2003 18:13:04
You'd have to write your own script function to call DisplayAt, or do as Scorpiorus suggests.

It's on my to-do list to allow customizing the default location of text and speech windows.
Title: Re:Changing the default location of text windows
Post by: Ishmael on Tue 30/12/2003 18:22:06
The one I used in EFL (http://www.agsforums.com/games.php?action=detail&id=288) was just a GUI with a label on it, and I called it with my own display command, something like

function DisplayEx(string msg) {
SetLabelText(TXTGUI,0,msg);
GUIOn(TXTGUI);
while (disp = 1) {
if (IsButtonDown(LEFT) == 0) disp = 1;
else disp = 0;
}
GUIOff(TXTGUI);
SetLabelText(TXTGUI,0,"");
}