Bad order of gui's drawing (Monarch) (SOLVED)

So, i am using monarch for screen managing, it’s really cool and simple, but i’ve created a new popup screen and strangely whole gui of this popup shows under the gui of the previous screen
I dont know what happen and how to fix that
Also i’ve found a topic about similar problem, but didn’t find any appropriate solution for my case
P.s. white box is a gui of popup
FIRST SCREEN


POPUP SCREEN THAT SHOWN UNDER PREVIOUS

@britzl

1 Like

An easy way to deal with this is to put your popup GUIs on their own render predicate which is drawn after the normal GUI predicate. You’ll have to edit your render script and make copies of the GUI material for a new tag but it is easy.

2 Likes

@Pkeod I am noob in defold :roll_eyes:. Could you give more explanation or may be screen shots about your solution?

1 Like

You’ll need a copy of your render script you can edit. Then add a popup GUI predicate. And draw it after the normal GUI.

Then make a copy of the GUI material and change its tag to the GUI popup predicate tag.

Then apply the popup GUI material to your popup GUI files.

This way your popups will always be drawn above your normal GUI.

2 Likes

@Pkeod Ok, thank you :blush:, i’ll try it

2 Likes

Why not use gui.set_render_order() and assign the popups a higher value than your non-popups?

7 Likes

Honestly forgot about that! Better solution by far.

3 Likes