examples/menus: test switchMenu

This commit is contained in:
Kazhnuz 2019-03-22 17:45:22 +01:00
parent 19aa49327c
commit 9519130613

View file

@ -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