Hi all, new to Love2d
I tried to set a mouse cursor with love.mouse.newCursor('miImage.png', x, y) in the load callback, but that doesn't work.
What is the proper way to set the mouse cursor without having to rely on code to paint an image that follows the mouse (overkill)
Thanks!
Assign mouse cursor from image
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- slime
- Solid Snayke
- Posts: 3160
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Assign mouse cursor from image
That should work - make sure to call love.mouse.setCursor after creating the cursor.
Something like this:
Something like this:
Code: Select all
function love.load()
local hot_x, hot_y = 0, 0
mycursor = love.mouse.newCursor("miImage.png", hot_x, hot_y)
love.mouse.setCursor(mycursor)
end
Re: Assign mouse cursor from image
@slime: Thanks, I was just forgetting to use setCursor
Who is online
Users browsing this forum: Bing [Bot] and 1 guest