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
|
self.scene = scene
|
||||||
local widgetmenu = self.scene.menusystem.menus[menu]
|
local widgetmenu = self.scene.menusystem.menus[menu]
|
||||||
local font = self.scene.assets.fonts["medium"]
|
local font = self.scene.assets.fonts["medium"]
|
||||||
|
self.newmenu = newmenu
|
||||||
MenuWidget.super.new(self, widgetmenu, font, newmenu)
|
MenuWidget.super.new(self, widgetmenu, font, newmenu)
|
||||||
end
|
end
|
||||||
|
|
||||||
function MenuWidget:action()
|
function MenuWidget:action()
|
||||||
|
self.scene.menusystem:switchMenu(self.newmenu)
|
||||||
end
|
end
|
||||||
|
|
||||||
return TestScene
|
return TestScene
|
||||||
|
|
Loading…
Reference in a new issue