tibia-client/data/modules/mainmenu/menustate.lua

21 lines
394 B
Lua
Raw Normal View History

-- menu state
function onEnterMenuState()
2011-05-01 20:47:35 +02:00
mainMenu = UI.load("modules/mainmenu/mainmenu.yml")
end
function onLeaveMenuState()
2011-04-23 02:12:28 +02:00
mainMenu:destroy()
end
function onApplicationClose()
onLeaveMenuState()
exitGame()
end
-- here is where everything starts
if not initialStateLoaded then
onEnterMenuState()
2011-05-01 20:47:35 +02:00
App.setOnClose(onApplicationClose)
initialStateLoaded = true
2011-05-01 20:47:35 +02:00
end