From 2974d94df460cfaa49cd9060149748fdfd1a06e3 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 4 Dec 2021 14:12:17 +0100 Subject: [PATCH] fix: load right menus from gui package --- .vscode/settings.json | 3 +++ examples/scenes/basic/test_menus/init.lua | 8 ++++---- examples/scenes/gameplay/plateform/pause.lua | 4 ++-- examples/scenes/mainmenu/init.lua | 5 +---- examples/scenes/menus/inventory/init.lua | 6 +++--- examples/scenes/menus/options/menu.lua | 4 ++-- examples/scenes/menus/options/widgets.lua | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 53fd123..c8988a9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,5 +8,8 @@ "core", "scenes", "game" + ], + "Lua.diagnostics.disable": [ + "redundant-parameter" ] } diff --git a/examples/scenes/basic/test_menus/init.lua b/examples/scenes/basic/test_menus/init.lua index 7a22f76..d317ef1 100644 --- a/examples/scenes/basic/test_menus/init.lua +++ b/examples/scenes/basic/test_menus/init.lua @@ -24,10 +24,10 @@ local Scene = require "birb.modules.scenes" local TestScene = Scene:extend() -local MenuType = require "birb.modules.menusystem.menus.listbox" -local MenuType2 = require "birb.modules.menusystem.menus.flowbox" -local MenuType3 = require "birb.modules.menusystem.menus.grid" -local Widget = require "birb.modules.menusystem.menus.widgets" +local MenuType = require "birb.modules.gui.menus.listbox" +local MenuType2 = require "birb.modules.gui.menus.flowbox" +local MenuType3 = require "birb.modules.gui.menus.grid" +local Widget = require "birb.modules.gui.menus.widgets" local MenuWidget = Widget.Text:extend() diff --git a/examples/scenes/gameplay/plateform/pause.lua b/examples/scenes/gameplay/plateform/pause.lua index ba5ea49..771b200 100644 --- a/examples/scenes/gameplay/plateform/pause.lua +++ b/examples/scenes/gameplay/plateform/pause.lua @@ -1,5 +1,5 @@ -local ListMenu = require "birb.modules.menusystem.menus.listbox" -local Widget = require "birb.modules.menusystem.menus.widgets" +local ListMenu = require "birb.modules.gui.menus.listbox" +local Widget = require "birb.modules.gui.menus.widgets" local PauseMenu = ListMenu:extend() diff --git a/examples/scenes/mainmenu/init.lua b/examples/scenes/mainmenu/init.lua index 19ef439..22a1ca3 100644 --- a/examples/scenes/mainmenu/init.lua +++ b/examples/scenes/mainmenu/init.lua @@ -24,10 +24,7 @@ local Scene = require "birb.modules.scenes" local MainMenu = Scene:extend() -local ListBox = require "birb.modules.menusystem.menus.listbox" -local Widget = require "birb.modules.menusystem.menus.widgets" - -local TextMenu = require "birb.modules.menusystem.textmenu" +local TextMenu = require "birb.modules.gui.textmenu" local SceneWidget = TextMenu.baseWidgets.Base:extend() local ExitWidget = TextMenu.baseWidgets.Base:extend() diff --git a/examples/scenes/menus/inventory/init.lua b/examples/scenes/menus/inventory/init.lua index e2566c4..6bdf0b6 100644 --- a/examples/scenes/menus/inventory/init.lua +++ b/examples/scenes/menus/inventory/init.lua @@ -24,9 +24,9 @@ local Scene = require "birb.modules.scenes" local Inventory = Scene:extend() -local HListBox = require "birb.modules.menusystem.menus.hlistbox" -local FloxBox = require "birb.modules.menusystem.menus.flowbox" -local Widget = require "birb.modules.menusystem.menus.widgets" +local HListBox = require "birb.modules.gui.menus.hlistbox" +local FloxBox = require "birb.modules.gui.menus.flowbox" +local Widget = require "birb.modules.gui.menus.widgets" local InventoryWidget = Widget.Text:extend() local ItemWidget = Widget.Text:extend() diff --git a/examples/scenes/menus/options/menu.lua b/examples/scenes/menus/options/menu.lua index 43e43aa..0a56960 100644 --- a/examples/scenes/menus/options/menu.lua +++ b/examples/scenes/menus/options/menu.lua @@ -1,7 +1,7 @@ -local TextMenu = require "birb.modules.menusystem.textmenu" +local TextMenu = require "birb.modules.gui.textmenu" local OptionMenu = TextMenu:extend() -local consts = require "examples.scenes.menus.options.consts" +local consts = require "scenes.menus.options.consts" function OptionMenu:new(font) local screenWidth, _ = core.screen:getDimensions() diff --git a/examples/scenes/menus/options/widgets.lua b/examples/scenes/menus/options/widgets.lua index f5044d9..8860bc2 100644 --- a/examples/scenes/menus/options/widgets.lua +++ b/examples/scenes/menus/options/widgets.lua @@ -23,7 +23,7 @@ local widgets = {} -local Widget = require "birb.modules.menusystem.textmenu.widgets.basic" +local Widget = require "birb.modules.gui.textmenu.widgets.basic" local DoubleTextWidget = Widget:extend() widgets.SubMenu = DoubleTextWidget:extend()