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
Complication with love.graphics.setColor
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Complication with love.graphics.setColor
- Attachments
-
- context.love
- (2.45 MiB) Downloaded 136 times
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Complication with love.graphics.setColor
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.)
(Do that after you draw the thing you wanted colored.)
Re: Complication with love.graphics.setColor
Oh... Thanks
Who is online
Users browsing this forum: Bing [Bot], Semrush [Bot] and 10 guests