I want to make a custom mouse
Posted: Sat Jul 06, 2013 2:46 am
I want to make a custom mouse but The Image is black!
please help!
please help!
Code: Select all
function love.load()
love.mouse.setVisible(false)
mouseImage = love.graphics.newImage("imageName")
end
function love.update(dt)
mouseX, mouseY = love.mouse.getPosition() -- If it doesn't work here move it to the bottom after you update everything.
-- Other game generating stuff
end
function love.draw()
-- Other code stuff. THIS NEEDS TO BE AT THE BOTTOM!!
love.graphics.setColor(255,255,255,0) -- The extra 0 makes sure it's fully visible, but it's not needed
love.graphics.draw( mouseImage, mouseX, mouseY )
end
Setting the alpha to 0 will actuallt make the image fully invisible. You should just remove that argument as it will default to 255 which is full opacity.Eamonn wrote:Code: Select all
love.graphics.setColor(255,255,255,0) -- The extra 0 makes sure it's fully visible, but it's not needed
Oh, thanks! I thought it was the other way around. I never work with Alpha(except in MBG2, that was a heck of a time with the fade in's and outs.) I did that incase he changes it later it's still visible.mickeyjm wrote:Setting the alpha to 0 will actuallt make the image fully invisible. You should just remove that argument as it will default to 255 which is full opacity.Eamonn wrote:Code: Select all
love.graphics.setColor(255,255,255,0) -- The extra 0 makes sure it's fully visible, but it's not needed