Page 1 of 1

Complication with love.graphics.setColor

Posted: Thu Mar 28, 2013 10:23 pm
by rbxkools
I am having some complications with love.graphics.setColor(). In my main.lua I required this other file called menu.lua, a manager of sorts for the menu of my game. Everything worked great until I set the color using love.graphics.setColor() to make rectangles for the menu. It somehow made it so when I drew a sprite, it only used the color I had previously set :( ! To draw the image I of course used love.graphics.draw() using the image data as one of the parameters.

How can I solve this? Can I make it so the sprite isn't colored with the color previously set but rather just drawing the image exactly how it actually is?

The sprite was retro 8bit hand, with tan color in the middle to be the skin color, but if you see in my love2d file now it's just all black.

Thanks,

kools

Re: Complication with love.graphics.setColor

Posted: Thu Mar 28, 2013 10:31 pm
by bartbes
Well, the solution is setting the color back to what it was before you changed it, full white, or 255, 255, 255, 255.
(Do that after you draw the thing you wanted colored.)

Re: Complication with love.graphics.setColor

Posted: Thu Mar 28, 2013 10:53 pm
by rbxkools
:rofl: Oh... Thanks