Changing the default location of text windows

Started by Raggit, Tue 30/12/2003 00:56:23

Previous topic - Next topic

Raggit

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.
--- BARACK OBAMA '08 ---
www.barackobama.com

Scorpiorus

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);

Pumaman

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.

Ishmael

The one I used in EFL 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,"");
}
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

SMF spam blocked by CleanTalk