Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Rui 'Trovatore' Pires on Sun 08/02/2004 07:30:43

Title: Suggestion - DisplayAt centering text
Post by: Rui 'Trovatore' Pires on Sun 08/02/2004 07:30:43
I've messed around with DisplayAt for my next project, which will have a LucasFilm style of messaging - i.e., all messages are displayed at the top while the characters speak (think Indiana Jones and the Last Crusade, or Manian Mansion, or even gabriel Knight 1). I used DisplayAt instead of DisplayAtY because there'll be a frame around the "box" where the text will be displayed.

And, much to my dismay, I found that, after setting the DisplayAt's virtual textbox, it displayed the text centered instead of left-aligned. Could that be an option? And could it be implemented soon, VERY soon?
Title: Re:Suggestion - DisplayAt centering text
Post by: Pumaman on Sun 08/02/2004 12:40:03
The text in DisplayAt, as with Display and DisplayAtY, is left-aligned by default.

If you want to centre it, you can set the game.text_align variable beforehand:

game.text_align = ALIGN_CENTRE;
DisplayAt(x, y, width, "Message");
Title: Re:Suggestion - DisplayAt centering text
Post by: Rui 'Trovatore' Pires on Sun 08/02/2004 21:52:29
Wait, sorry, my bad - the real issue is not aligning (game.text_align had iluded me completely), but the fact that any changes we set with it are NOT taken in consideration if we use LucasArts-style speech, which I'd need - again, like in MM, IJ3 or GK. That's what my suggestion really is - that even LucasArts-style speech is aligned left, or right, at least in DisplayAt situations.

EDIT - VERY sorry - it's not DisplayAt, it's DisplaySpeechAt. The issue remains...
Title: Re:Suggestion - DisplayAt centering text
Post by: Pumaman on Sun 08/02/2004 22:01:48
Ah ok, so what you're really asking for is the ability to change the alignment of lucasarts-style speech. Sounds reasonable enough, I'll add it to my list.