Monarch Versions Save

Monarch is a Defold screen manager with transition support and a straight forward API

4.2.0

9 months ago

FIX: Screen url detection was not working when nesting collections CHANGE: Calling monarch.post(screen, message_id, message) will only post a message if monarch.on_post(screen, fn) has been called for the screen, regardless if the screen is created through a proxy or factory

4.1.0

9 months ago

FIX: Clarified documentation

4.0.1

10 months ago

FIX: The flag to wait for proxy loaded was not cleared when the proxy was loaded

4.0.0

10 months ago

BREAKING CHANGE: Transitions are now configured through the monarch.on_transition(screen_id, fn) function. The function defines for which screen to configure transitions and sets a function to be called when a transition should be started. This function must accept (message_id, message, sender) as arguments, with message_id defining which type of transition to start:

  • transition_show_in (constant defined as monarch.TRANSITION.SHOW_IN)
  • transition_show_out (constant defined as monarch.TRANSITION.SHOW_OUT)
  • transition_back_in (constant defined as monarch.TRANSITION.BACK_IN)
  • transition_back_out (constant defined as monarch.TRANSITION.BACK_OUT)

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.

BREAKING CHANGE: Focus change listeners are now configured through monarch.on_focus_changed(screen_id, fn).

NEW: Added on_post(screen_id, fn) message listener function which will be called when a screen is sent a message using monarch.post().

IMPORTANT! You must call monarch.on_message(message_id, message, sender) from the same script as the above listener setup functions are called.

3.7.0

1 year ago

CHANGE: monarch.unload() will now unload a preloaded screen regardless if it was preloaded using the editor checkbox or using monarch.preload(), even with the keep_loaded option.

3.6.1

1 year ago

FIX: Do not try to unload a preloaded screen which was not shown.

3.6.0

1 year ago

NEW: Added keep_loaded option to monarch.preload(). The keep_loaded option will keep the screen loaded even after a navigation event that would otherwise unload it.

monarch.preload(screen, { keep_loaded = true }, cb)

3.5.0

2 years ago

CHANGE: When a screen is unregistered it will also remove any presence of the screen in the stack

3.4.6

2 years ago

FIX: The time step of a screen below a popup was reset already during the popup transition. The time step should not reset until after the popup has been completely hidden.

3.4.5

2 years ago

FIX: Fixed warnings about two missing variables (had no actual impact on the behaviour of the code)