Static UI question

I’m trying to make a clone of “A Normal Lost Phone” game in Phaser 3 and I have doubts of how it is the right way to handle the ui phone (home button, back button, date and time…) as the picture below show:

lostphone

I understand that the ui scene is an active scene (like the https://labs.phaser.io/edit.html?src=src\scenes\ui%20scene%20es6.js tutorial) but I can’t figure out if that UI will be always of the top of the “scene layers” whenever the player opens an app (I assume it’s another scene that has a different background).

What a mess…

There is a function for this…

phoneUI.scene.bringToTop(‘phoneUI’);
phone.UI.scene.sentToBack(‘phoneUI’);

You can start it with any scene you like and it will remain on top. Then you can use SendToBack, to set it to the very back of any scenes being displayed, it will always be running though if you don’t pause, stop, or remove it completely. There is also a scene.switch() but im unsure about how to use this one.

1 Like