Closed FormularSumo closed 2 years ago
love.mouse.isCursorSupported returns true on my phone despite wiki page saying "Mobile devices do not support cursors.". love.mouse.setCursor also works on my phone. Not that this changes love.mouse.setVisibility or love.mouse.setPosition not working on it.
Alternatively could add deck editing cards as GUI elements (double reference), meaning game could be operated with joystick without needing mouse to be shown. This would probably be the better solution as controller being used as mouse was also a kinda hacky solution (if neat and easy to implement). Then I could bind joystick to snap between buttons same way d-pad does, as that's what happens in most games.
I've decided on the snappable deck editor approach. I may bind joystick to snap between buttons and reserve d-pad for other left/right arrow key commands, such as switching inventory page or gamespeed without hovering on sliders. At any rate moving mouse with joystick should be disabled on Android as it'll only cause confusion
Unfortunatately on Android mouse position can't be set by love2d. Nor can it's visibility be toggled. On Windows likewise the mouse can't be made visible when touch mode is activated. The best workaround for this (other than seeing if love2d could fix the issue) would be to create a custom mouse cursor for these situations.