Iris homepage | Documentation table of contents
There are four methods almost all screens will implement:
-
create()
is where you initialize your screen. Most importantly, here you will usually calliris.tmpl()
with a template resource defining your UI, and usingself.get()
to retrieve the components in that UI that you need to interact with programmatically. -
awake()
is where you can add event listeners, execute intervals or initialize heavyweight tasks as play sound or video. -
sleep()
is where you deal with the user leaving your screen. Most importantly, remove event listeners or stop heavyweight tasks. -
destroy()
is where you will perform operations after screen dying.