HELP!!!:Images completely black

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
Sartek
Prole
Posts: 2
Joined: Wed Mar 03, 2010 11:17 am

HELP!!!:Images completely black

Post by Sartek »

I thought i would give love a shot but the images i am drawing are black completely unless i make a part transparent then the transparent part is transparent and the rest is black any ideas?
here is what im using
Attachments
game (3).zip
Images are black wtf?
(3.77 KiB) Downloaded 124 times
User avatar
smartazz
Prole
Posts: 13
Joined: Mon Jan 11, 2010 10:04 am
Contact:

Re: HELP!!!:Images completely black

Post by smartazz »

Try removing setColor from love.load and modifying love.draw like this:

Code: Select all

function love.draw()
	love.graphics.draw( img1, img_x, img_y )
	love.graphics.setColor(0,0,0,255)
   love.graphics.print( "Mouse X: ".. mouse_x .. " Mouse Y: " .. mouse_y, 10, 20 )
	love.graphics.setColor(255,255,255,255)
	if Grab == false then
	love.graphics.draw( img2, mouse_x, mouse_y )
	end
end
User avatar
kalle2990
Party member
Posts: 245
Joined: Sat Sep 12, 2009 1:17 pm
Location: Sweden

Re: HELP!!!:Images completely black

Post by kalle2990 »

Since the colors of images are set by the current set color, you'll have to add love.graphics.setColor(255, 255, 255) before starting to draw the images.

Code: Select all

function love.draw()
   love.graphics.setColor(255, 255, 255)
   love.graphics.draw( img1, img_x, img_y )
   love.graphics.setColor(0, 0, 0) --Change back to black for the text
   love.graphics.print( "Mouse X: ".. mouse_x .. " Mouse Y: " .. mouse_y, 10, 20 )
   if Grab == false then
      love.graphics.setColor(255, 255, 255)
      love.graphics.draw( img2, mouse_x, mouse_y )
   end
end
User avatar
kalle2990
Party member
Posts: 245
Joined: Sat Sep 12, 2009 1:17 pm
Location: Sweden

Re: HELP!!!:Images completely black

Post by kalle2990 »

You were faster than me.. :cry:
Sartek
Prole
Posts: 2
Joined: Wed Mar 03, 2010 11:17 am

Re: HELP!!!:Images completely black

Post by Sartek »

Thanks that worked.
Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests