examples/mainmenu: add navigation sfx
This commit is contained in:
parent
627395c83f
commit
fe740edc13
1 changed files with 5 additions and 0 deletions
|
@ -35,6 +35,8 @@ function MainMenu:new()
|
||||||
MainMenu.super.new(self)
|
MainMenu.super.new(self)
|
||||||
self.assets:addImageFont("medium", "examples/mainmenu/assets/medium")
|
self.assets:addImageFont("medium", "examples/mainmenu/assets/medium")
|
||||||
|
|
||||||
|
self.assets:addSFX("navigate", "examples/mainmenu/assets/menu_move.mp3")
|
||||||
|
|
||||||
self:addMenu("main", true)
|
self:addMenu("main", true)
|
||||||
self:addSubMenu("basic", "basic")
|
self:addSubMenu("basic", "basic")
|
||||||
self:addScene("basic", examples.Test, "test1")
|
self:addScene("basic", examples.Test, "test1")
|
||||||
|
@ -46,6 +48,9 @@ function MainMenu:new()
|
||||||
self:addSubMenu("gameplay", "gameplay")
|
self:addSubMenu("gameplay", "gameplay")
|
||||||
self:addScene("gameplay", examples.MovePlayer, "movable")
|
self:addScene("gameplay", examples.MovePlayer, "movable")
|
||||||
|
|
||||||
|
|
||||||
|
self.menusystem:setSoundFromSceneAssets("navigate")
|
||||||
|
|
||||||
ExitWidget(self, "main")
|
ExitWidget(self, "main")
|
||||||
self.menusystem:switchMenu("main")
|
self.menusystem:switchMenu("main")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue