fix: initial ports of the basic scenes

This commit is contained in:
Kazhnuz 2021-01-30 09:18:07 +01:00
parent 8f1c326e6a
commit baa5a24ce6

View file

@ -37,39 +37,39 @@ function TestScene:new()
MenuType(self.menusystem, "testMenu1", 32, 32, 100, 24*8, 4)
MenuWidget(self, "testMenu1", "text_menu1")
Widget.Base(self.menusystem.menus["testMenu1"])
Widget.Base(self.menusystem.menus["testMenu1"])
Widget.Base(self.menusystem.menus["testMenu1"])
Widget.Base(self.menusystem.menus["testMenu1"])
Widget.Base(self.menusystem.menus["testMenu1"])
Widget.Base("testMenu1")
Widget.Base("testMenu1")
Widget.Base("testMenu1")
Widget.Base("testMenu1")
Widget.Base("testMenu1")
MenuType2(self.menusystem, "testMenu2", 164, 32, 24*8, 24*2, 8, 2)
Widget.Base(self.menusystem.menus["testMenu2"])
Widget.Base(self.menusystem.menus["testMenu2"])
Widget.Base(self.menusystem.menus["testMenu2"])
Widget.Base(self.menusystem.menus["testMenu2"])
Widget.Base(self.menusystem.menus["testMenu2"])
Widget.Base(self.menusystem.menus["testMenu2"])
Widget.Base(self.menusystem.menus["testMenu2"])
Widget.Base(self.menusystem.menus["testMenu2"])
Widget.Base(self.menusystem.menus["testMenu2"])
Widget.Base(self.menusystem.menus["testMenu2"])
Widget.Base(self.menusystem.menus["testMenu2"])
Widget.Base(self.menusystem.menus["testMenu2"])
Widget.Base(self.menusystem.menus["testMenu2"])
Widget.Base(self.menusystem.menus["testMenu2"])
Widget.Base(self.menusystem.menus["testMenu2"])
Widget.Base(self.menusystem.menus["testMenu2"])
Widget.Base(self.menusystem.menus["testMenu2"])
Widget.Base(self.menusystem.menus["testMenu2"])
Widget.Base(self.menusystem.menus["testMenu2"])
Widget.Base(self.menusystem.menus["testMenu2"])
Widget.Base("testMenu2")
Widget.Base("testMenu2")
Widget.Base("testMenu2")
Widget.Base("testMenu2")
Widget.Base("testMenu2")
Widget.Base("testMenu2")
Widget.Base("testMenu2")
Widget.Base("testMenu2")
Widget.Base("testMenu2")
Widget.Base("testMenu2")
Widget.Base("testMenu2")
Widget.Base("testMenu2")
Widget.Base("testMenu2")
Widget.Base("testMenu2")
Widget.Base("testMenu2")
Widget.Base("testMenu2")
Widget.Base("testMenu2")
Widget.Base("testMenu2")
Widget.Base("testMenu2")
Widget.Base("testMenu2")
MenuType3(self.menusystem, "testMenu3", 164, 32 + 72, 24*8, 24*5, 8, 5)
Widget.Base(self.menusystem.menus["testMenu3"])
Widget.Base(self.menusystem.menus["testMenu3"])
Widget.Base(self.menusystem.menus["testMenu3"])
Widget.Base(self.menusystem.menus["testMenu3"])
Widget.Base("testMenu3")
Widget.Base("testMenu3")
Widget.Base("testMenu3")
Widget.Base("testMenu3")
self.menusystem.menus["testMenu3"]:addSlot(1, 0, 0, 4, 3)
self.menusystem.menus["testMenu3"]:addSlot(2, 0, 3, 5, 2)
self.menusystem.menus["testMenu3"]:addSlot(3, 5, 0, 3, 1)
@ -120,7 +120,7 @@ end
function TestScene:addTextWidget(menu, number)
for i=1, number do
Widget.Text(self.menusystem.menus[menu], self.assets.fonts["medium"], "lorem ipsum " .. i)
Widget.Text(menu, "medium", "lorem ipsum " .. i)
end
end
@ -131,10 +131,8 @@ end
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)
MenuWidget.super.new(self, menu, "menu", newmenu)
end
function MenuWidget:action()