Ajout des derniers développement #1

Merged
kazhnuz merged 68 commits from chronicles-cbs into master 2020-08-02 11:14:18 +02:00
3 changed files with 14 additions and 14 deletions
Showing only changes of commit 0984ce370e - Show all commits

View file

@ -6,6 +6,7 @@ local Widget = require "core.modules.menusystem.widgets"
menu.DebugMenu = ListBox:extend()
menu.DebugWidget = Widget.Text:extend()
menu.SubMenuWidget = menu.DebugWidget:extend()
menu.SceneWidget = menu.DebugWidget:extend()
local CONST = {}
CONST.MENU = {}
@ -56,5 +57,15 @@ function menu.SubMenuWidget:action()
self.scene.menusystem:switchMenu(self.newmenu)
end
-- SceneWidget
function menu.SceneWidget:new(scene, menuName, newScene, newSceneName)
menu.SceneWidget.super.new(self, scene, menuName, newSceneName)
self.newScene = newScene
end
function menu.SceneWidget:action()
self.newScene()
end
return menu

View file

@ -7,7 +7,7 @@ function DebugMenu:new()
DebugMenu.super.new(self)
self.assets:batchImport("scenes.debug.commons.assets")
menu.commons.DebugMenu(self, "BaseMenu")
menu.SceneWidget(self, "BaseMenu", scenes.title, "Launch Game")
menu.commons.SceneWidget(self, "BaseMenu", scenes.title, "Launch Game")
self:buildBattleMenu()
self:buildOverworldMenu()
self:buildSaveMenu()
@ -35,7 +35,7 @@ end
function DebugMenu:buildBattleMenu()
self:addSubMenu("combat", "BaseMenu", "Battle System")
menu.SceneWidget(self, "combat", scenes.cbs, "Launch Battle")
menu.commons.SceneWidget(self, "combat", scenes.cbs, "Launch Battle")
menu.commons.SubMenuWidget(self, "combat", "BaseMenu", "Back")
end
@ -47,7 +47,7 @@ end
function DebugMenu:buildOtherMenu()
self:addSubMenu("other", "BaseMenu", "Other gameplay")
menu.SceneWidget(self, "other", scenes.test, "Minigame Engine")
menu.commons.SceneWidget(self, "other", scenes.test, "Minigame Engine")
menu.commons.SubMenuWidget(self, "other", "BaseMenu", "Back")
end

View file

@ -3,7 +3,6 @@ local menu = {}
menu.commons = commons
menu.ExitWidget = commons.DebugWidget:extend()
menu.ShowBackgroundWidget = commons.DebugWidget:extend()
menu.SceneWidget = commons.DebugWidget:extend()
-- ExitWidget
function menu.ExitWidget:new(scene, menuName)
@ -23,14 +22,4 @@ function menu.ShowBackgroundWidget:action()
self.scene.menusystem:deactivate()
end
-- SceneWidget
function menu.SceneWidget:new(scene, menuName, newScene, newSceneName)
menu.SceneWidget.super.new(self, scene, menuName, newSceneName)
self.newScene = newScene
end
function menu.SceneWidget:action()
self.newScene()
end
return menu