Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: aussie on Sat 01/10/2011 22:31:12

Title: Centering text with the "display" instruction (SOLVED)
Post by: aussie on Sat 01/10/2011 22:31:12
Hi again guys  :)

I'm looking for the function which allows you to center text when you use an instruction such as:

Display ("My text here.");

By default, this text comes up left-justified in a white Sierra-style window. I'd like it to be centered. I know this was possible in the old days with the ALIGN_CENTER function, but I can't find the right instruction now. Neither in the help file nor in the forums.

Does anyone know if centering text is possible?

As always, thanks in advance.


Title: Re: Centering text with the "display" instruction
Post by: pcj on Sat 01/10/2011 22:37:41
game.text_align = eAlignCentre;

Only for message boxes and Sierra-style speech.
Title: Re: Centering text with the "display" instruction
Post by: aussie on Sat 01/10/2011 22:38:57
Quote from: pcj on Sat 01/10/2011 22:37:41
game.text_align = eAlignCentre;

Only for message boxes and Sierra-style speech.

Perfect. Thanks a lot.
Title: Re: Centering text with the "display" instruction
Post by: Arjunaz78 on Sat 01/10/2011 22:41:52
What about if i use the Lucasarts style template?can i use the same code too?or i still need to use the custom text function like densming show at densming's Youtube videos channel? (function ShowTextCentered) ??
Title: Re: Centering text with the "display" instruction (SOLVED)
Post by: pcj on Sat 01/10/2011 22:43:20
LucasArts speech is always centered (with respect to the character).