I’m trying to utilize Gooey and Monarch, and tried to create a main “pause” gui which has the buttons representing the tabs and also an exit button. Then, on the top of that there could be a popup for current tab - like on the image, there is some inventory gui below tabs.
The problem is, when I monarch.show(hash("inventory") the “pause” gui below loses its input focus and I can’t click on other buttons nor exit button.
I can create each gui with the tabs above, and paste a code handling those buttons in each of those gui, but that’s not an elegant solution. I do want to have a one gui with background and tabs buttons and exit button below each gui representing inventory, quest log, etc.
Also, if it comes to Monarch - the “Timestep Below Popup” was always confusing for me, because I would like to have different timesteps below different popups, so I was always thinking that this sets the timestep for a screen below the actual popup - for example: I don’t want the time to be stopped when being in “dialog” popup, but would like to stop time, while being in this “pause menu” popup. So I thought that I would set timestep to 0 below popup called pause and timestep to 1 below popup called dialog, but as you know it works totally different - so, what do you think about my approach?
Actually releasing input focus from “inventory” popup and reacquiring it in “pause” gui is a bad solution, because I cannot then operate with Inventory so probably I will end up with one gui containing all the tabs guis and switching their position to the center of the screen when they’re needed and just enabling them and disabling the rest, but that would be a mess in the Editor
Sometimes it might be desirable to have a screen that contains one or more sub-screens or children, for instance popups that are used only by that screen. Monarch supports nested screens only when the parent screen is created via a collection factory. If the parent screen is loaded via a collection proxy the sub/child-screens won’t be able to receive any input.
What about that option in Monarch? It seems like it could resolve that particular issue
That describes the case where a screen contains other screens and how you can use Monarch to interact with those sub-screens. It doesn’t really solve your case of keeping input active on multiple screens at the same time.
I tried, but my entire project wasn’t working and I didn’t know why. I found out, that the Defold-Input has also changed and my code for handling input wasn’t working anymore
mapper.bind(mapper.KEY_LEFT, "left", 1)
This was not working because there is no more KEY_LEFT in the mapper (in/mapper)
Are you depending upon master.zip? You should never do that. Always depend upon a specific release to prevent problems with library dependencies introducing breaking changes .
As for your specific problem: The constants have been moved to triggers.lua in 2.0.0+.
I’m aware of that, but also, when I’m developing I would like to have a newest version. Thanks for the answer! And thank you very much for the improvement in Monarch - it works as I imagined!