You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
411 B
22 lines
411 B
-- menu state
|
|
function onEnterMenuState()
|
|
mainMenu = UI.load("modules/mainmenu/mainmenu.yml")
|
|
end
|
|
|
|
function onLeaveMenuState()
|
|
mainMenu:destroy()
|
|
mainMenu = nil
|
|
end
|
|
|
|
function onApplicationClose()
|
|
onLeaveMenuState()
|
|
App.exit()
|
|
end
|
|
|
|
-- here is where everything starts
|
|
if not initialStateLoaded then
|
|
onEnterMenuState()
|
|
App.onClose = onApplicationClose
|
|
initialStateLoaded = true
|
|
end
|