GUI Text Window XY repositioning

Started by Revonx, Thu 25/09/2008 19:36:06

Previous topic - Next topic

Revonx

Couldn't find anything in the tutorials, all I want is to increase the width and height and position it so its a rectangle at the bottom of the screen rather than a square in the middle of the screen. Thanks in advance.

Khris

This is a joke, right?
You can set every single one of those parameters right in the editor ...

Creator

#2
When you open up a GUI, on the property tree (when no controls are selected) under the 'Layout' sub-category you can set the Height (How tall the GUI is), the Width (How wide the GUI is) and the Left (x) and Top (y) positions.

Without trying to sound rude, did you even look at the GUI settings before posting this?

Khris

Hm, considering it says GUI Text Window in the title, AGS probably resizes and centers the gui automatically, regardless of the editor settings.
I've never really used them, so I'm not sure though.
You might have to use a standard GUI with some labels, then break up the string and resize/position the GUI manually.

Revonx

Quote from: Creator on Fri 26/09/2008 08:33:10
When you open up a GUI, on the property tree (when no controls are selected) under the 'Layout' sub-category you can set the Height (How tall the GUI is), the Width (How wide the GUI is) and the Left (x) and Top (y) positions.

Without trying to sound rude, did you even look at the GUI settings before posting this?

Yes, but there are no settings for a text window, I'm not talking about an inventory window, label, text box, e.t.c

Revonx

Quote from: KhrisMUC on Fri 26/09/2008 13:08:46
Hm, considering it says GUI Text Window in the title, AGS probably resizes and centers the gui automatically, regardless of the editor settings.
I've never really used them, so I'm not sure though.
You might have to use a standard GUI with some labels, then break up the string and resize/position the GUI manually.

The only visible settings available for a text window are background color,  background image and text image, no standard GUI scripts apply, (from what I've tried) so I couldn't use a gGui.SetPosition(mouse.x, mouse.y); script for the text window. I don't really know what you mean when you talk about breaking up the string, could you possibly elaborate.

Khris

I'm saying, do everything manually. Go through the string's characters, look for spaces and divide it into lines of appropriate length, the resize the GUI depending on the number of lines and put them in the GUI's labels.

Creator

Quote from: Revonx on Fri 26/09/2008 13:27:33
Yes, but there are no settings for a text window, I'm not talking about an inventory window, label, text box, e.t.c

Woops. Sorry. Didn't read the title carefully enough.
I just checked it out and there doesn't seem to be anyway to control a text box's X and Y coordinates.

Khris's method seems to be the easiest method, though I'd have no way of knowing how to script it.

Revonx

Quote from: Creator on Fri 26/09/2008 14:40:46
Quote from: Revonx on Fri 26/09/2008 13:27:33
Yes, but there are no settings for a text window, I'm not talking about an inventory window, label, text box, e.t.c

Woops. Sorry. Didn't read the title carefully enough.
I just checked it out and there doesn't seem to be anyway to control a text box's X and Y coordinates.

Khris's method seems to be the easiest method, though I'd have no way of knowing how to script it.

lol, thats ok, any advice is much appreciated, thankyou for taking the time to help  ;D

Pumaman

The DisplayAt command allows you to display the standard text box at a specific position.

You could create a custom function called my_display() or something which could wrap DisplayAt to display text at your preferred position.

Revonx

Quote from: Pumaman on Sat 27/09/2008 15:52:09
The DisplayAt command allows you to display the standard text box at a specific position.

You could create a custom function called my_display() or something which could wrap DisplayAt to display text at your preferred position.

I've actually already solved this problem, but thankyou anyway

SMF spam blocked by CleanTalk