mirror of
https://github.com/edubart/otclient.git
synced 2025-12-23 00:27:12 +01:00
remove game state classes
scripting improvements
This commit is contained in:
20
data/modules/mainmenu/menustate.lua
Normal file
20
data/modules/mainmenu/menustate.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
-- menu state
|
||||
function onEnterMenuState()
|
||||
MainMenu_create()
|
||||
end
|
||||
|
||||
function onLeaveMenuState()
|
||||
MainMenu_destroy()
|
||||
end
|
||||
|
||||
function onApplicationClose()
|
||||
onLeaveMenuState()
|
||||
exitGame()
|
||||
end
|
||||
|
||||
-- here is where everything starts
|
||||
if not initialStateLoaded then
|
||||
onEnterMenuState()
|
||||
setOnApplicationClose(onApplicationClose)
|
||||
initialStateLoaded = true
|
||||
end
|
||||
Reference in New Issue
Block a user