Coloring the inside of outline fonts in "display"-type boxes

Started by aussie, Sat 01/10/2011 22:56:58

Previous topic - Next topic

aussie

Here is another question on display boxes. (*)

Anyway, I have this dark-grey display window instead of the custom white Sierra-style box.

I'd like the font inside the box to be white in the inside with a black outline. However, when I use the display instruction [i.e. Display("My text here");] the inside of my outlined font always shows in the color of the window background (dark grey). A dark grey font with black outline against a dark grey background doesn't look very good.

Lucasarts-style speech fills outlined fonts with color, so I guess what I need to do is possible. However, I don't know how to go about it.

Any ideas?

Thanks very much in advance.  




(*) I'm loving the new AGS editor, but I'm also having lots of trouble finding the functions I need.  :-\
It's not the size of the dog in the fight. It's the size of the fight in the dog.

http://www.freewebs.com/aussiesoft/

Ghost

IIRC you can work around that by just using a background SPRITE for the text window- and if you are using a non-shaded gray anyway, that's easy (the background sprite is tiled, so "solid monochrome works best). Hope that helps.

aussie

Nope. That didn't work.  :-\

It sounded like a good idea. Thanks anyway.

Any more takers?
It's not the size of the dog in the fight. It's the size of the fight in the dog.

http://www.freewebs.com/aussiesoft/

pcj

Change the text color in your text window GUI's properties.
Space Quest: Vohaul Strikes Back is now available to download!

aussie

Nope. That doesn't work either. It's the first thing I tried.  :)

That changes the color of the outline, but the inside of the font remains transparent.

Other ideas?
It's not the size of the dog in the fight. It's the size of the fight in the dog.

http://www.freewebs.com/aussiesoft/

pcj

Uh, that works for me.  Make sure you have Game.NormalFont (and Game.SpeechFont for speech) set to the font and not its outline.



Space Quest: Vohaul Strikes Back is now available to download!

aussie

When I set white to the TextColor property I get the top message.



I would like to get the bottom one, which I made with photoshop just to show what it should look like.

Maybe it has something to do with you using a TTF font?
It's not the size of the dog in the fight. It's the size of the fight in the dog.

http://www.freewebs.com/aussiesoft/

Ghost

You could, of course, write a custom display function that uses non-outlines text and draws the same string NINE times, with offsets and a colour you set:

BLACK:
x-1, y0
x+1,y0
x-1,y-1
x+1,y-1
x+1,y+1
y-1,y-1
x0,y-1
x0,y+1

WHITE
x0,y0

That would give you an outline (due to the offsets), and then the string on top of it. I think AGS already DOES outlining that way internally.

[edit]
As I re-read this, it really sounds very much overboard- but might be worth a shot.

Alternatively:
Calin wrote a Spritefont module-
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=44359.0

pcj

That's a bit over-compensating for what sounds like a simple problem.  Try a different font and see if that works?
Space Quest: Vohaul Strikes Back is now available to download!

aussie

Quote from: Ghost on Sat 01/10/2011 23:46:39
You could, of course, write a custom display function that uses non-outlines text and draws the same string NINE times, with offsets and a colour you set:

BLACK:
x-1, y0
x+1,y0
x-1,y-1
x+1,y-1
x+1,y+1
y-1,y-1
x0,y-1
x0,y+1

WHITE
x0,y0

That would give you an outline (due to the offsets), and then the string on top of it. I think AGS already DOES outlining that way internally.

[edit]
As I re-read this, it really sounds very much overboard- but might be worth a shot.

Alternatively:
Calin wrote a Spritefont module-
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=44359.0

I guess that could work. As you say, however, it's simply too much trouble. I'd rather look into other alternatives. Thanks anyway. :)

Quote from: pcj on Sat 01/10/2011 23:47:37
That's a bit over-compensating for what sounds like a simple problem.  Try a different font and see if that works?

I just tried to no avail. All SCI fonts seem to do this.  :-[

It's not the size of the dog in the fight. It's the size of the fight in the dog.

http://www.freewebs.com/aussiesoft/

Ghost

Is there a reason for not using TTF, then? I got several that support "odd" characters, and would happily share.

aussie

Quote from: Ghost on Sun 02/10/2011 00:02:25
Is there a reason for not using TTF, then? I got several that support "odd" characters, and would happily share.

I hadn't really thought about ttf fonts until I say pcj's post, really.

I guess I could use one of those. Trouble is, I already have like ten rooms already where I've implemented tonnes of messages with Spanish characters (I use @ to represent á, < for é, etc). Changing the font would imply going through all that again.

Look, don't worry too much about it. The normal font (not outlined) doesn't look that bad. I guess it'll have to do.

Thanks anyway. 



It's not the size of the dog in the fight. It's the size of the fight in the dog.

http://www.freewebs.com/aussiesoft/

Khris

I tested this using the three default fonts that come with AGS.
I created a new TextWindow GUI and left the background dark gray. I set the TextColor to 15 (white).
When I want to replicate what you get, I specifically have to set Game.Normalfont to eFontSpeechOutline, as soon as I set it to eFontSpeech, I get what I expect: white characters surrounded by a black outline on a dark gray background.

monkey0506

If you want to change both the outline color and the font color just use a normal font instead of changing it to an outline font, and set game.text_shadow_color to the outline color you want.

SMF spam blocked by CleanTalk