A tiny library (mostly for documentation/reference) to help move LÖVE windows around with the mouse.
This is particularly useful for borderless, non-fullscreen windows.
Add draggable.lua
to your project, and require it
local Draggable = require('draggable')
Begin dragging. The cursor will disappear until you call Draggable.stop()
.
Be aware that this enables the relative mouse mode behind the scenes, which will change the x
and y
arguments passed to love.mousemove
.
Stop dragging. The cursor will reeappear.
Move the window by a relative amount if Draggable.start()
has been called.
function love.mousemoved(x, y, dx, dy)
Draggable.move(dx, dy)
end
See main.lua for example use.