Devlogs
Mobile stuffs
Ok, mobile support wasn’t bad at all.
- On the itch.io upload page check Mobile Friendly. I picked orientation “Portrait”.
- Fix scaling with Project Settings -> Stretch mode -> 2D. I chose to ignore the aspect ratio since my vector graphics won’t look too bad a little stretched.
- In Godot Project Settings -> Input Devices -> Pointing -> Emulate touch from mouse. That allows me to test touch support on my desktop, using the mouse.
- Add TouchScreenButton nodes (there’s a node for everything) and child nodes for shapes. In my case I use some polygons and lines with transparency set to 50% to draw the buttons.
- Link up the pressed/released signals to some script.
- In each of those handlers call the appropriate Input.action_press([action]) or Input.action_release([action]) functions.
And that was it. The rest of my code is already checking for those actions so that it can respond to the keyboard.