What problem does it solve?
This skill provides an API to read and control the user's mouse within LÖVE games, enabling consistent input handling across platforms.
Core Features & Use Cases
- Position tracking: read mouse x/y coordinates and support relative mode for unrestricted movement.
- Cursor management: show, hide, and assign custom cursors; retrieve system cursors.
- Input events: detect button presses and motions for menus, gameplay, and drag-and-drop interactions.
- Cross-platform consistency: works across desktop environments and provides mouse input behavior that works similarly on target devices.
- Use Case: Create a game menu where hover highlights are driven by the current mouse position and a custom cursor is rendered.
Quick Start
Start by querying the mouse position in Love.load and Love.update, then render a custom cursor image at those coordinates. For example: hide the default cursor with love.mouse.setVisible(false), read love.mouse.getPosition(), and draw your own sprite at the returned x, y values.