Bithack / principia

Open source physics-based sandbox game.
https://principia-web.se
Other
258 stars 25 forks source link

Cross-platform dialog UI replacement #95

Closed rollerozxa closed 5 days ago

rollerozxa commented 1 year ago

Currently, Principia uses platform specific dialog toolkits, native platform dialogs on Android/iOS and GTK2 on Windows/Linux. This causes inconsistency between platforms and raises the amount of work and duplication for a new platform if it doesn't support GTK2.

Some replacement dialog UI should be made that can be integrated into the Principia window and that is fully cross-platform. Something like Dear Imgui, but it MUST have decent touch support (it should be able to support standard touch gestures and not be a downgrade on Android and any other potential platforms that use touch). See Minetest's GUI on Android for an example of what I would not want to happen.

griffi-gh commented 1 year ago

ImGui is the perfect option, i think

~~NanoGUI looks pretty cool, although it hasn't been updated in 4 years https://github.com/wjakob/nanogui~~ No GLES support

We could also write our own gui library

griffi-gh commented 1 year ago

Nothing will feel like native widgets on mobile platforms without huge amount of work so I think keeping native gui on android may be a good idea. moreover ImGui does not support multitouch.

griffi-gh commented 1 year ago

maybe we should just extend the built-in TMS widget system to support stuff like text input

rollerozxa commented 5 days ago

Superseded by #173.