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

Use new on_transition()

This commit is contained in:
Björn Ritzl
2023-08-02 07:47:47 +02:00
parent 0191a4e540
commit 4e13660d63
9 changed files with 24 additions and 52 deletions

View File

@@ -8,7 +8,8 @@ function init(self)
gui.animate(gui.get_node("spinner"), gui.PROP_ROTATION, vmath.vector3(0, 0, -360), gui.EASING_INOUTQUAD, 2, 0, nil, gui.PLAYBACK_LOOP_FORWARD)
self.transition = transitions.fade_in_out(gui.get_node("root"), 0.6, 0)
local transition = transitions.fade_in_out(gui.get_node("root"), 0.6, 0)
monarch.on_transition("menu", transition)
end
function on_input(self, action_id, action)
@@ -28,7 +29,7 @@ function on_input(self, action_id, action)
end
function on_message(self, message_id, message, sender)
self.transition.handle(message_id, message, sender)
monarch.on_message(message_id, message, sender)
if message_id == monarch.FOCUS.GAINED then
gui.set_text(gui.get_node("timestamp"), os.date())
end