Hi there
it would be cool to have a love.mouse.doubleclick funtion, like the other love.mouse.(mousemoved / mousepressed / mousereleased) callback functions.
I have made the funciton myself, but it would be cool to have it build in love directly
Suggestion: Doubleclick callback
Re: Suggestion: Doubleclick callback
Hello!
In the next version of LÖVE love.mousepressed and love.mousereleased have a click count argument, which I believe is the number of clicks in quick succession based on the system's double-click speed setting.
(You can see the current changelog of the next version of LÖVE here, and you can try the nightly build of the next version for Window or Linux.)
In the next version of LÖVE love.mousepressed and love.mousereleased have a click count argument, which I believe is the number of clicks in quick succession based on the system's double-click speed setting.
Code: Select all
function love.mousepressed(x, y, button, isTouch, clickCount)
if clickCount == 2 then
print('Double click!')
end
end
Re: Suggestion: Doubleclick callback
Question when i double click will i get two events or one event?
Either one is bad.
First will fire single click events although only double click was desired
Second slows down none double clicks
Either one is bad.
First will fire single click events although only double click was desired
Second slows down none double clicks
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Suggestion: Doubleclick callback
I'd also like this feature to be toggle-able, like the key repeat feature; or at least have it behave in a way that i don't need to bend backwards to work around it.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Who is online
Users browsing this forum: Ahrefs [Bot] and 12 guests