Open megagrump opened 2 years ago
I'd probably leave this one for you as I don't have any idea how to solve this as i haven't yet experienced this issue in love 🤔
You can test this by adding love.timer.sleep(.2)
at the bottom of love.draw
in main.lua
. It's gonna be pretty difficult to click anything.
The same problem was apparently occuring in Keyboard.lua
. The same solution would work for the mouse.
This is now fixed for clicks, but still an issue when resizing a window at low framerates. Possibly other places too.
Using
love.mouse.isDown
is not sufficient for reliable click detection. Clicks may occur between mouse sampling points and go unnoticed by the game/application. The lower the framerate, the higher the probability that this happens.Solution: use
love.mousepressed
andlove.mousereleased
instead, and make sure the click event has an effect even whenmousereleased
gets called in the same frame asmousepressed
.