Can't seem to change image font color -- 0.72

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
chute
Prole
Posts: 18
Joined: Sat Sep 17, 2011 6:49 pm

Can't seem to change image font color -- 0.72

Post by chute »

Hi guys. I am having a problem with image fonts. the font works just fine, but it only shows up in one color (the color that's in the image).

Here's the code:

Code: Select all

love.graphics.setFont(font.cards) -- this is an image font
love.graphics.setColor(255,255,255,255) -- white
love.graphics.print("234", 200, 208)
love.graphics.setColor(255,0,0,255) -- red
love.graphics.print("567", 200, 240)
love.graphics.setFont(font.medium) -- this is a plain ttf
love.graphics.print("normal text", 200,275)
I've tried both colormodes...
here is default
default.png
default.png (4.42 KiB) Viewed 3324 times
here is replace
replace.png
replace.png (4.42 KiB) Viewed 3324 times
I'm not sure what I'm doing wrong.
User avatar
benloran
Prole
Posts: 19
Joined: Tue Jul 05, 2011 4:52 pm

Re: Can't seem to change image font color -- 0.72

Post by benloran »

Is your image font black? Black + any color = black...
User avatar
kraftman
Party member
Posts: 277
Joined: Sat May 14, 2011 10:18 am

Re: Can't seem to change image font color -- 0.72

Post by kraftman »

benloran wrote:Is your image font black? Black + any color = black...
black * any color = black makes more sense, since multiplying by 0 = 0.
User avatar
benloran
Prole
Posts: 19
Joined: Tue Jul 05, 2011 4:52 pm

Re: Can't seem to change image font color -- 0.72

Post by benloran »

Well yeah. Right.

I was being lazy, using mathematics symbols to avoid typing english words, but this was a bad context to be lazy in that way. :o:
chute
Prole
Posts: 18
Joined: Sat Sep 17, 2011 6:49 pm

Re: Can't seem to change image font color -- 0.72

Post by chute »

That worked. thanks! :)
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 6 guests