Our game uses Monarch to occasionally show news messages in a popup whenever Monarch is idle (nothing on the stack, and not busy)
Separately, the player is able to take part in a seasonal event, which involves unloading the game world collection proxy (which contains the Monarch screens collection) and reloading it with different data.
If these situations coincide, Monarch starts to load the message popup as it’s being unloaded, and no progress is made. This has the consequence of blocking further UI interaction, as active_transition_count = 1, so Monarch.is_busy() returns true.
It’s not surprising that this doesn’t work and a refactor may be necessary but is there any way to cancel queued screen loads?
Logs below, notably preload() preloading done is not printed.
NOTE: I have also merged a breaking change in the way transition and focus changes are set up. Previously you had to set a transition or focus url to get notified when a transition was supposed to start or when a focus change happened. I have scrapped this system in favour of monarch.on_transition(id, cb) and monarch.on_focus_changed(id, cb).
[quote=]
NOTE: I have also merged a breaking change in the way transition and focus changes are set up. Previously you had to set a transition or focus url to get notified when a transition was supposed to start or when a focus change happened. I have scrapped this system in favour of monarch.on_transition(id, cb) and monarch.on_focus_changed(id, cb).
[/quote]
In previous versions, transition_done was one of the messages received by a gui_script. How should developers meet this new requirement from the release notes? Do the ‘default’ transition types (transitions.slide_out_left etc) already do this? And then, how can a gui script detect when a transition is done?
When a transition is completed it is up to the developer to send a transition_done (constant monarch.TRANSITION.DONE ) message back to the sender to indicate that the transition is completed and that Monarch can continue the navigation sequence.
Message monarch_screen_transition_in_finished seems to be sent as soon as the transition starts. Is that deliberate? Parameter wait_for_transition is false inside show_in() , which seems to control that.