Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: T800System on Tue 08/01/2013 19:18:19

Title: Positioning text window GUI[SOLVED]
Post by: T800System on Tue 08/01/2013 19:18:19
Hey, I'm having trouble trying to position my text window GUI. It's for a dialog option, which I want to position at the bottom centre of the screen. Obviously to do this I have set "Use GUI for dialog options" to 1 (which corresponds to the GUI number that I want to use) in the general settings.

In my first (and only) room script, I've got the following regarding this dialog option:

    gTestgui.SetPosition(10, 10);
    dBartender.Start();

The setposition code isn't doing anything to move the dialog options to where I want them. They're just staying centred. Could someone tell me what I'm doing wrong please?

Thank you in advance
Title: Re: Positioning text window GUI
Post by: Slasher on Tue 08/01/2013 19:52:15
Text Window Gui's are hard coded and are always centered. You need to use a plain Gui and then you can set its position.

You might need to adjust dialog options x and y if required.

Example:
Positions dialog options
Code (AGS) Select

game.dialog_options_x = 10;
game.dialog_options_y = 14;

Unlike Text Windows, plain Gui's don't stretch or shrink to accommodate text.

Hope this helps
Title: Re: Positioning text window GUI
Post by: T800System on Tue 08/01/2013 20:03:48
Aha! I was just trying this and then you replied confirming it :) And just as I saw it was working; a new question entered my head - and that was how I could specify where the text would sit in the GUI. And you have preemptively answered that with the game dialog options. Brilliant!

Thank you very much, mate!
Title: Re: Positioning text window GUI[SOLVED]
Post by: Khris on Tue 08/01/2013 20:21:39
If you need to get a bit more sophisticated, you can render the dialog options GUI yourself:
http://www.adventuregamestudio.co.uk/manual/CustomDialogOptions.htm
Title: Re: Positioning text window GUI[SOLVED]
Post by: T800System on Tue 08/01/2013 23:50:04
Quote from: Khris on Tue 08/01/2013 20:21:39
If you need to get a bit more sophisticated, you can render the dialog options GUI yourself:
http://www.adventuregamestudio.co.uk/manual/CustomDialogOptions.htm

Awesome, thank you.