FormularSumo / Star-Wars-Galaxy-Collection

A remake of the discontinued Star Wars Force Collection game https://formularsumo.github.io/Star-Wars-Galaxy-Collection-Web/ https://play.google.com/store/apps/details?id=com.formularsumo.starwarsforcecollectionremake.embed
GNU Affero General Public License v3.0
6 stars 0 forks source link

Make deck editor state be usable via controller/keyboard #47

Closed FormularSumo closed 2 years ago

FormularSumo commented 2 years ago

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.

FormularSumo commented 2 years ago

23

FormularSumo commented 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.

FormularSumo commented 2 years ago

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.

FormularSumo commented 2 years ago

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

FormularSumo commented 2 years ago