Hi, I’m having a problem with Monarch, specifically is the stacking system. I’ve follow the doc, looking at the example, but for some reasons when I try to call the screen for the first time, it did not stack, so am I doing anything wrong, or it’s a bug?
Monarch takes a frame or two to load a new screen. Therefore, your monarch.get_stack() function won’t show anything until at least a frame later. For example, try printing its contents in your script’s update() function. You’ll notice that the stack now shows your screen.
Oh I see it now, but I also find another problem: when I use use monarch.show() to show other screen, it did not stack the second screen and instead, it unload the first screen and in the stack there is only second screen.
Correct. And if you have transitions it can take even longer. The fourth argument to monarch.show() is a callback function which will be called when the screen is fully visible:
That’s strange. I’m not sure what’s going on there to be honest. Do you have any errors in your console? You can get additional information about what Monarch is doing by enabling extra logging using monarch.debug():
If you are unable to figure out what is wrong then please open a ticket on GitHub and attach a small project where this problem happens.
This is the process of me transition from the “level” screen to “in_game” screen. Do you have any idea of what the issue is? Is it because of the version of defold version of I’m using? (It’s 1.3.0) Or is it might be other issues?
Loopformer.zip (2.6 MB)
This is the file contain the game, and I’ve created, and yes, I’ve post the issue that I’ve facing with on github. Can you check it out? And I want to apologize in advance as the code and the structure is kind of messy and spaghetti , but I really want to find the solution to fix this issue. Thank you so much!!!
I took a quick look and you have set your “level” (the level select) screen as a popup. You can’t stack other screens on top of a popup (unless it is another popup and you have the “Popup on Popup” checkbox toggled).
Uncheck the “Popup” checkbox on that screen and you’re good!
OMG I WANT TO SAY THANK YOU SO SOOO MUCH!!!
Welp, it’s kinda dumb of me but only this issue has driven me nut whole day already, and yet the solution to the problem is soooooooo simple. I’ve been smiling and laughing for 30 minutes already
Anw, thank you so much and wish you have a great day