Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: xenogia on Fri 29/01/2010 03:47:15

Title: When using labels or the think command it does something weird.
Post by: xenogia on Fri 29/01/2010 03:47:15
Whenever I use say the text command from a gui, or the think command it removes the first character of the sentence that I type.  So for example:


gLabel.Text = "Hello There!";


or


cEgo.Think ("Hello There!");


it actually outputs as

ello there!


So I have to keep putting a space at the start of the sentence to get the text to display correctly.  Is this a bug in AGS?
Title: Re: When using labels or the think command it does something weird.
Post by: Gilbert on Fri 29/01/2010 04:00:28
Hmmm odd.

Can you upload some small files to demonstrate your problems? (No need to use your real game materials.)
Title: Re: When using labels or the think command it does something weird.
Post by: xenogia on Fri 29/01/2010 04:08:50
I think maybe it might be the font, cause I just tested it using a default template.  I'll get onto it when I get home from work making a template that does it.

EDIT: Actually on a quick note it only happens if I have text box GUI attached to it.  I did this by testing at my pc via remote access.
Title: Re: When using labels or the think command it does something weird.
Post by: Gilbert on Fri 29/01/2010 05:02:02
Is that a True Type Font? I'm not sure, but maybe the font contains some hinting information which somehow makes the text misaligned to the left.

You may try to change the font and see if that changes anything.
Title: Re: When using labels or the think command it does something weird.
Post by: xenogia on Fri 29/01/2010 05:05:53
Correct it is, I'll try changing and it see how it goes.
Title: Re: When using labels or the think command it does something weird.
Post by: xenogia on Fri 29/01/2010 09:41:51
Gilbot I figured it out, it only happens when you anti-alias a true type font, if its not anti-aliased it is fine.  This must be a bug in the new ags beta.
Title: Re: When using labels or the think command it does something weird.
Post by: Gilbert on Fri 29/01/2010 10:02:20
Did it happen with all TTF fonts?

I've tested some beta version (as I won't go into the troubles to install the RC releases on this office computer, so I'm not sure if this was introduced in a more recent version) of V3.2 and I just imported the Arial font shipped with XP and so far I don't see any problems when displaying the text in a label or the message box.

Edit:
Hmmm. From the change log, in RC2:
Quote
* Fixed GUI label text not being anti-aliased if there was a background image but the BGColor was set to 0
Don't know whether this change caused your problem, but one thing I don't understand is, if the change was written like this, it should have been checked.
Title: Re: When using labels or the think command it does something weird.
Post by: xenogia on Fri 29/01/2010 10:16:11
For me yes, tried a few different ones.. I'll upload the template for you to have a look at, and you can try it.

http://xenogiagames.com/bug.zip (http://xenogiagames.com/bug.zip)