Complication with love.graphics.setColor

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
User avatar
rbxkools
Prole
Posts: 5
Joined: Thu Mar 28, 2013 9:45 pm

Complication with love.graphics.setColor

Post 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
Attachments
context.love
(2.45 MiB) Downloaded 136 times
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Complication with love.graphics.setColor

Post 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.)
User avatar
rbxkools
Prole
Posts: 5
Joined: Thu Mar 28, 2013 9:45 pm

Re: Complication with love.graphics.setColor

Post by rbxkools »

:rofl: Oh... Thanks
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 10 guests