-
Notifications
You must be signed in to change notification settings - Fork 0
events
dragekk edited this page Feb 24, 2023
·
6 revisions
events is variable stored in app variable that you get when creating app app.events
, its a table with all events
open event is called when app is opened
...
are arguments provided by other app that opened this app
close event is called when app is closed
called 20 times per second
render event is executed every frame
called when key is pressed (left, right, down, up arrows and enter, backspace)
called after key is pressed and after all actions by key has been executed
text is text typed in chat, if nil message is being cancelled confirm is boolean, false when message is still typed, true when it is sent
-- create init event and change page to "menu"
function events.open()
app.setPage("menu")
end
-- change text of first element on main page to pressed key
events.KEY_PRESS:register(function(key)
app.pages.main[1].text = key
end