From 7bdc31450b932040e3753fab1401bd67c28c3511 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Mon, 11 Feb 2019 22:36:04 +0100 Subject: [PATCH] scenes/test: test the menu system --- sonic-boost.love/main.lua | 2 +- sonic-boost.love/scenes/test_scene/init.lua | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/sonic-boost.love/main.lua b/sonic-boost.love/main.lua index 0246ed9..85ef90f 100644 --- a/sonic-boost.love/main.lua +++ b/sonic-boost.love/main.lua @@ -32,7 +32,7 @@ function love.load() core = Core() game = Game() - scenes.boost() + scenes.test() end function love.update(dt) diff --git a/sonic-boost.love/scenes/test_scene/init.lua b/sonic-boost.love/scenes/test_scene/init.lua index 8ece219..0cdd961 100644 --- a/sonic-boost.love/scenes/test_scene/init.lua +++ b/sonic-boost.love/scenes/test_scene/init.lua @@ -24,12 +24,22 @@ local Scene = require "core.modules.scenes" local TestScene = Scene:extend() +local MenuType = require "core.modules.menusystem.listbox" +local Widget = require "core.modules.menusystem.widgets" + + function TestScene:new() TestScene.super.new(self) self.i = 0 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 function TestScene:update(dt)