2011-04-22 15:49:46 +02:00
|
|
|
-- menu state
|
|
|
|
function onEnterMenuState()
|
2011-05-19 19:11:05 +02:00
|
|
|
mainMenu = UI.load("mainmenu.yml")
|
2011-04-22 15:49:46 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
function onLeaveMenuState()
|
2011-05-09 22:38:01 +02:00
|
|
|
|
2011-04-22 15:49:46 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
function onApplicationClose()
|
|
|
|
onLeaveMenuState()
|
2011-05-02 06:13:57 +02:00
|
|
|
App.exit()
|
2011-04-22 15:49:46 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
-- here is where everything starts
|
|
|
|
if not initialStateLoaded then
|
|
|
|
onEnterMenuState()
|
2011-05-03 00:48:41 +02:00
|
|
|
App.onClose = onApplicationClose
|
2011-04-22 15:49:46 +02:00
|
|
|
initialStateLoaded = true
|
2011-05-01 20:47:35 +02:00
|
|
|
end
|