examples/menus: test switchMenu
This commit is contained in:
parent
19aa49327c
commit
9519130613
1 changed files with 2 additions and 1 deletions
|
@ -126,11 +126,12 @@ function MenuWidget:new(scene, menu, newmenu)
|
|||
self.scene = scene
|
||||
local widgetmenu = self.scene.menusystem.menus[menu]
|
||||
local font = self.scene.assets.fonts["medium"]
|
||||
self.newmenu = newmenu
|
||||
MenuWidget.super.new(self, widgetmenu, font, newmenu)
|
||||
end
|
||||
|
||||
function MenuWidget:action()
|
||||
|
||||
self.scene.menusystem:switchMenu(self.newmenu)
|
||||
end
|
||||
|
||||
return TestScene
|
||||
|
|
Loading…
Reference in a new issue