scenes/test: test the menu system

This commit is contained in:
Kazhnuz 2019-02-11 22:36:04 +01:00
parent c8c0304849
commit 7bdc31450b
2 changed files with 11 additions and 1 deletions

View file

@ -32,7 +32,7 @@ function love.load()
core = Core() core = Core()
game = Game() game = Game()
scenes.boost() scenes.test()
end end
function love.update(dt) function love.update(dt)

View file

@ -24,12 +24,22 @@
local Scene = require "core.modules.scenes" local Scene = require "core.modules.scenes"
local TestScene = Scene:extend() local TestScene = Scene:extend()
local MenuType = require "core.modules.menusystem.listbox"
local Widget = require "core.modules.menusystem.widgets"
function TestScene:new() function TestScene:new()
TestScene.super.new(self) TestScene.super.new(self)
self.i = 0 self.i = 0
self:register() self:register()
MenuType(self.menusystem, "testMenu1", 32, 32, 100, 200, 4)
Widget.Base(self.menusystem.menus["testMenu1"])
Widget.Base(self.menusystem.menus["testMenu1"])
Widget.Base(self.menusystem.menus["testMenu1"])
Widget.Base(self.menusystem.menus["testMenu1"])
end end
function TestScene:update(dt) function TestScene:update(dt)