diff options
| author | iamcheeseman <[email protected]> | 2026-03-12 16:41:55 -0400 |
|---|---|---|
| committer | iamcheeseman <[email protected]> | 2026-03-12 16:41:55 -0400 |
| commit | e3634a80ad29221b9fc0cc60a543027074096dd1 (patch) | |
| tree | 485cb8f15523d21be36cc9c33283ba296a6337bd /src/input.lua | |
| parent | 756a3446b66d86c7ee785b69e7103c79a12bdf13 (diff) | |
Move the UI rendering outside of the canvas
Diffstat (limited to 'src/input.lua')
| -rw-r--r-- | src/input.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/input.lua b/src/input.lua index c5c9012..b2951b2 100644 --- a/src/input.lua +++ b/src/input.lua @@ -57,20 +57,20 @@ end function love.mousepressed(_, _, btn) mouseEvents[btn] = true - local sx, sy = get_mouse_pos() + local sx, sy = love.mouse.getPosition() --get_mouse_pos() im.mousepressed(sx, sy, btn) end function love.mousereleased(_, _, btn) - local sx, sy = get_mouse_pos() + local sx, sy = love.mouse.getPosition() --get_mouse_pos() im.mousereleased(sx, sy, btn) end function love.mousemoved(_, _, dx, dy) - local sx, sy = get_mouse_pos() - local scrw, scrh = love.graphics.getDimensions() - local rdx, rdy = dx / scrw * SCR_WIDTH, dy / scrh * SCR_HEIGHT - im.mousemoved(sx, sy, rdx, rdy) + local sx, sy = love.mouse.getPosition() --get_mouse_pos() + -- local scrw, scrh = love.graphics.getDimensions() + -- local rdx, rdy = dx / scrw * SCR_WIDTH, dy / scrh * SCR_HEIGHT + im.mousemoved(sx, sy, dx, dy) end function love.wheelmoved(...) |
