Bithack / principia

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

game:message fails on android #79

Closed rollerozxa closed 1 year ago

rollerozxa commented 1 year ago

From principia-web chat:

In update 1.5.2 beta, the function began to work very strangely "game message"... I have a device that constantly displays data about its state, but after a few seconds of operation, the window where it displays a message disappears, although in the old version everything worked well and there was no such failure ...

Blue-Beaker commented 1 year ago

I've already experienced this in principia 1.5.1 on high android versions and custom ROMs. I suggest to replace them with in-game-toasts like PC version does, so problems of Android toast can be avoided at all.

rollerozxa commented 1 year ago

Sounds like a good idea, the desktop ui::message toasts are cross platform after all so it'd be less platform specific stuff to worry about.

rollerozxa commented 1 year ago

Yep, does indeed work and looks fine I think.

image

Though toast messages that get called from the Java code will use the regular Android toasts... Should be fine though, that's mostly for things like feedback for native dialogs (e.g. registering, logging in or publishing a level)

Also fun fact, there's an unused GTK-based ui::message implementation that gets used if UI_MESSAGE_OVERRIDE isn't defined.

image

rollerozxa commented 1 year ago

Principia on Android now uses the in-game ui::message implementation instead of Android toasts, so this should be fixed.