I want to make a custom mouse but The Image is black!
please help!
I want to make a custom mouse
Re: I want to make a custom mouse
We need a little more information than that.
Can you provide us with a .love or at least a code snippet?
Can you provide us with a .love or at least a code snippet?
Your screen is very zoomed in...
Re: I want to make a custom mouse
I know how to fix it I think.
I assume you have the image that you want, correct? And you've hidden your mouse cursor, correct? Here are the steps:
1) Get your image.
2) Do the following code:
This should fix it. Hope it helped!!
EDIT: Maybe consider putting these types of questions in the "Support and Development" section.
I assume you have the image that you want, correct? And you've hidden your mouse cursor, correct? Here are the steps:
1) Get your image.
2) Do the following code:
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
EDIT: Maybe consider putting these types of questions in the "Support and Development" section.
"In those quiet moments, you come into my mind" - Liam Reilly
Re: I want to make a custom mouse
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
Your screen is very zoomed in...
Re: I want to make a custom mouse
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
"In those quiet moments, you come into my mind" - Liam Reilly
Who is online
Users browsing this forum: aikusuuta and 8 guests