Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Mantra of Doom on Fri 19/09/2008 06:26:59

Title: Custom Dialog Gui
Post by: Mantra of Doom on Fri 19/09/2008 06:26:59
As I work on all the guis, hotspots, cursors, walkable areas to put off making that last pesky walk cycle, I came across the customized text window feature.

The problem is, that I can't seem to find a way to move the gui anywhere except smack in the middle of the screen. I've tried gText.Y=200 and a few other things that seemed to make sense (it's a bit late now and I can't remember what all gave me an error.

Is there a way that I can manually set the coordinates of this gui?

(http://www.asmedleydesigns.com/game/example.png)
Title: Re: Custom Dialog Gui
Post by: Gilbert on Fri 19/09/2008 06:47:44
Text windows are automatically centred on screen (as when used with Display() ) by default.

To display the text window at a specific position you can use the DisplayAt() or DisplayAtY() functions.
Title: Re: Custom Dialog Gui
Post by: Mantra of Doom on Fri 19/09/2008 08:24:27
I tried setting DisplayAtY (200, "message"); but that doesn't launch into a conversation, it only gives me the speech/message text at that coordinate. I would like to move the dialog options down towards the bottom.

Or am I completely misunderstand things here and am putting the script in the wrong place with the wrong variables? I was putting it in the global script.

Sorry to be such a pest about this, I spent so much time customizing the rest of the gui windows, I would like to do this last one for conformity's sake.
Title: Re: Custom Dialog Gui
Post by: J.E.S. on Fri 19/09/2008 09:53:51
Have you tried gYourGuiName.setposition(xx, xx)?
Title: Re: Custom Dialog Gui
Post by: Mantra of Doom on Fri 19/09/2008 15:09:55
I have tried  gText.SetPosition(50, 100);
but it doesn't seem to have done anything, the dialog options still appear in the center of the screen and often covers up the character while she's talking.
Title: Re: Custom Dialog Gui
Post by: TwinMoon on Fri 19/09/2008 16:17:59
Custom text windows and a gui for dialog options are two different things.

You can just set the position of the GUI by selecting that GUI and setting the top and left values (in the events tab). Try setting those both to 0, the GUI should then be in the top left.
Title: Re: Custom Dialog Gui
Post by: Mantra of Doom on Fri 19/09/2008 23:41:08
I got it to work, I thought that "text Gui" was what I needed. I guess that's what you get when you try to learn something at 3am.

Thanks for the help guys, now I just have to tweak it so the text is centered.