Antialiasing not showing up on gui text (SOLVED)

Started by Shane 'ProgZmax' Stevens, Tue 11/10/2005 06:53:23

Previous topic - Next topic

Shane 'ProgZmax' Stevens

As I hate posting retread questions I did a search for someone encountering this problem and had no luck (someone explicitly states having been able to get antialiased text on buttons and such but doesn't say how).  To the problem:

I'm trying to get a label control to display text that is antialiased on a gui (not a text window, which antialiases text with no problems).  I have also tried buttons and text boxes to no avail.  The antialias option is on (of course), the gui has a visible background, it's NOT transparent, and I've even tried putting backgrounds on the buttons,etc to see if that mattered.  The text appears as normal on the gui background without any antialiasing.

The reason I'm doing this in the first place is because of the way ags handles speech views and sierra style dialogs in general.  I don't like how it's handled at all and the function I've written essentially replaces it by allowing you to specify a view, loop number, mode (either foreground or background conversation - this determines whether to pause the game and make you click to proceed or not so Sierra style games can have dialogs going on without pausing the action), and even style (lucasarts or sierra) and of course the text to display.  With this function you will be able to load ALL of your speech animations into ONE view instead of many (if you have multiple portraits or speech anims) and simply pop from loop to loop.  What it won't do (probably ever) is resize the text gui based on word length or lip syncing, as those are internalized features that don't seem to be able to be controlled via scripting.  I may even add the ability to display a talking sprite animation along with the animated portrait in Sierra style mode (quite easy).

Any help with the antialiasing bit is appreciated. 


strazer

Use a true color image with an alpha channel as the GUI's background.

Unfortunately, this affects the transparency of all GUI controls on this GUI so you may have to use alpha-channeled images for these or put them on another GUI.

Shane 'ProgZmax' Stevens

#2
Thanks for the quick reply, I'll give it a go.

Edit:  Wonderful, photoshop doesn't seem to save 32 bit images in a type compatible with AGS...sigh.

strazer

Use this image for testing.

Btw, the text only shows where the background image is non-transparent. I don't think it's possible to have anti-aliased text on a transparent background...

Shane 'ProgZmax' Stevens

I knew about the background image for the gui not being transparent already.  As to it working, the image you posted as well as one I made and one scotch made for me do not work properly.  The text is not antialiased or affected in any way.  Can someone confirm that this method works with a screenshot maybe?  Bear in mind I am NOT using a text window, I'm using a gui with a label control and using settext to write it myself since text windows pause the game.

SSH

#5
EDIT:
After some experimenting with ProgZmax on #ags,. we find that the only way to have AA text on a GUI is to have NO background image for the gui at all.
12

Shane 'ProgZmax' Stevens

#6
After playing around and talking with SSH it seems that you can only get the font to antialias if there is NO background sprite on the gui, just a background color.  The background color cannot be transparent, so thus ends my attempts at making a text window substitute.  Major suckage :<.

Edit:  You can have a background image so long as the gui background color is NOT transparent.  This eliminates the possibility of having non perfect rectangle guis, but it's better than nothing I guess.

strazer

Quote from: ProgZmax on Tue 11/10/2005 14:33:16This eliminates the possibility of having non perfect rectangle guis, but it's better than nothing I guess.



AGS v2.7. 32-bit game, 32-bit GUI background image, GUI set to background color 1 (but any other works as well). If I set the GUI background color to 0, the text isn't anti-aliased anymore.

Shane 'ProgZmax' Stevens

#8
How are you able to make the background color appear transparent around a non rectangular shape background image?  When I set background color > 0 it fills a bounding box rectangle around the image.

ags 2.7 32-bit 32-bit background image and background color set to 1.  If you look closely you can see the blue where the jagged background image has transparent parts. There is also a border color around it that seems to reappear constantly if I have background color > 0. 


Shane 'ProgZmax' Stevens


strazer

#11
Yep, works. ???

You have clicked "Yes" when you're asked if you want to use the alpha channel, right?

Edit: When importing the image, I mean.

Shane 'ProgZmax' Stevens

Aha, that fixed it.  Sorry for wasting your time.

strazer

No problem, I'm glad we could work it out. :)

SMF spam blocked by CleanTalk