3
0
mirror of https://github.com/britzl/monarch.git synced 2025-09-27 18:12:22 +02:00

Added optional callback function when transition is done

This commit is contained in:
Björn Ritzl
2017-09-17 18:55:39 +02:00
parent e5b8f6d031
commit 9be4eeb87c
7 changed files with 46 additions and 22 deletions

View File

@@ -24,11 +24,11 @@ end
function on_message(self, message_id, message, sender)
if message_id == hash("show") then
monarch.show(self.screen_id, message.clear)
monarch.show(self.screen_id, { clear = message.clear })
elseif message_id == hash("hide") then
monarch.hide(self.screen_id)
monarch.back()
elseif message_id == hash("back") then
monarch.hide(self.screen_id)
monarch.back()
elseif message_id == hash("transition_show_in")
or message_id == hash("transition_show_out")
or message_id == hash("transition_back_in")