chore: merge menus' folders
This commit is contained in:
parent
e5742fa500
commit
687d187fe3
32 changed files with 45 additions and 45 deletions
|
@ -26,7 +26,7 @@ function CoreCBS:endBattle(isFleeing)
|
||||||
if (core.scenemanager:haveStoredScene("afterBattle")) then
|
if (core.scenemanager:haveStoredScene("afterBattle")) then
|
||||||
core.scenemanager:setStoredScene("afterBattle")
|
core.scenemanager:setStoredScene("afterBattle")
|
||||||
else
|
else
|
||||||
scenes.debug.menu()
|
scenes.menus.main()
|
||||||
end
|
end
|
||||||
end, self.lastx, self.lasty)
|
end, self.lastx, self.lasty)
|
||||||
self.lastx, self.lasty = DEFAULTX, DEFAULTY
|
self.lastx, self.lasty = DEFAULTX, DEFAULTY
|
||||||
|
|
|
@ -86,7 +86,7 @@ function PlayStyle:restartLevel()
|
||||||
end
|
end
|
||||||
|
|
||||||
function PlayStyle:exitLevel()
|
function PlayStyle:exitLevel()
|
||||||
scenes.title()
|
scenes.menus.title()
|
||||||
end
|
end
|
||||||
|
|
||||||
return PlayStyle
|
return PlayStyle
|
||||||
|
|
|
@ -28,5 +28,5 @@ scenes = require "scenes"
|
||||||
function love.load(args)
|
function love.load(args)
|
||||||
print(utils.table.toString(args))
|
print(utils.table.toString(args))
|
||||||
birb.start("game", args)
|
birb.start("game", args)
|
||||||
scenes.title()
|
scenes.menus.title()
|
||||||
end
|
end
|
|
@ -66,7 +66,7 @@ function VictoryScreen:update(dt)
|
||||||
end
|
end
|
||||||
if (keys["A"].isPressed) then
|
if (keys["A"].isPressed) then
|
||||||
--placeholder, pour l'instant on retourne juste au menu
|
--placeholder, pour l'instant on retourne juste au menu
|
||||||
scenes.debug.menu()
|
scenes.menus.main()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
return {
|
|
||||||
menu = require "scenes.debug.menu",
|
|
||||||
viewers = {
|
|
||||||
battleBack = require "scenes.debug.viewers.battleBack",
|
|
||||||
choregraphy = require "scenes.debug.viewers.choregraphy",
|
|
||||||
animation = require "scenes.debug.viewers.animation",
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,9 +1,7 @@
|
||||||
return {
|
return {
|
||||||
test = require "scenes.subgames.testBattle",
|
test = require "scenes.subgames.testBattle",
|
||||||
test2 = require "scenes.subgames.testShoot",
|
test2 = require "scenes.subgames.testShoot",
|
||||||
title = require "scenes.menus.titlescreen",
|
|
||||||
cbs = require "scenes.battlesystem",
|
cbs = require "scenes.battlesystem",
|
||||||
debug = require "scenes.debug",
|
menus = require "scenes.menus",
|
||||||
options = require "scenes.menus.options",
|
|
||||||
overworld = require "scenes.overworld"
|
overworld = require "scenes.overworld"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
local Scene = require "birb.modules.scenes"
|
local Scene = require "birb.modules.scenes"
|
||||||
local menu = require "scenes.debug.viewers.animation.menu"
|
local menu = require "scenes.menus.debugmenus.animation.menu"
|
||||||
|
|
||||||
local CharAnimViewer = Scene:extend()
|
local CharAnimViewer = Scene:extend()
|
||||||
local Background = require "game.modules.drawing.parallaxBackground"
|
local Background = require "game.modules.drawing.parallaxBackground"
|
||||||
|
@ -21,7 +21,7 @@ function CharAnimViewer:new()
|
||||||
menu.AnimationWidget(self, charName, animName)
|
menu.AnimationWidget(self, charName, animName)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
menu.commons.SceneWidget(self, "MainMenu", scenes.debug.menu, "Back")
|
menu.commons.SceneWidget(self, "MainMenu", scenes.menus.main, "Back")
|
||||||
|
|
||||||
self.menusystem:activate()
|
self.menusystem:activate()
|
||||||
self.menusystem:switchMenu("MainMenu")
|
self.menusystem:switchMenu("MainMenu")
|
|
@ -1,4 +1,4 @@
|
||||||
local commons = require "scenes.debug.commons.menu"
|
local commons = require "scenes.menus.commons.menu"
|
||||||
local listMenu = require "game.modules.menus.list"
|
local listMenu = require "game.modules.menus.list"
|
||||||
local menu = {}
|
local menu = {}
|
||||||
menu.commons = commons
|
menu.commons = commons
|
|
@ -1,5 +1,5 @@
|
||||||
local Scene = require "birb.modules.scenes"
|
local Scene = require "birb.modules.scenes"
|
||||||
local menu = require "scenes.debug.viewers.battleBack.menu"
|
local menu = require "scenes.menus.debugmenus.battleBack.menu"
|
||||||
|
|
||||||
local BackgroundViewer = Scene:extend()
|
local BackgroundViewer = Scene:extend()
|
||||||
local Background = require "game.modules.drawing.parallaxBackground"
|
local Background = require "game.modules.drawing.parallaxBackground"
|
||||||
|
@ -17,7 +17,7 @@ function BackgroundViewer:new()
|
||||||
for backId, backgroundData in pairs(backgroundList) do
|
for backId, backgroundData in pairs(backgroundList) do
|
||||||
menu.ShowBackgroundWidget(self, "MainMenu", backgroundData.name, backId)
|
menu.ShowBackgroundWidget(self, "MainMenu", backgroundData.name, backId)
|
||||||
end
|
end
|
||||||
menu.commons.SceneWidget(self, "MainMenu", scenes.debug.menu, "Back")
|
menu.commons.SceneWidget(self, "MainMenu", scenes.menus.main, "Back")
|
||||||
|
|
||||||
self.menusystem:activate()
|
self.menusystem:activate()
|
||||||
self.menusystem:switchMenu("MainMenu")
|
self.menusystem:switchMenu("MainMenu")
|
|
@ -1,4 +1,4 @@
|
||||||
local commons = require "scenes.debug.commons.menu"
|
local commons = require "scenes.menus.commons.menu"
|
||||||
local listMenu = require "game.modules.menus.list"
|
local listMenu = require "game.modules.menus.list"
|
||||||
local menu = {}
|
local menu = {}
|
||||||
menu.commons = commons
|
menu.commons = commons
|
|
@ -1,10 +1,10 @@
|
||||||
local Scene = require "birb.modules.scenes"
|
local Scene = require "birb.modules.scenes"
|
||||||
local menu = require "scenes.debug.viewers.choregraphy.menu"
|
local menu = require "scenes.menus.debugmenus.choregraphy.menu"
|
||||||
|
|
||||||
local ChoregraphyViewer = Scene:extend()
|
local ChoregraphyViewer = Scene:extend()
|
||||||
|
|
||||||
local World = require "scenes.battlesystem.world"
|
local World = require "scenes.battlesystem.world"
|
||||||
local Fighter = require "scenes.debug.viewers.choregraphy.mocks.fighter"
|
local Fighter = require "scenes.menus.debugmenus.choregraphy.mocks.fighter"
|
||||||
|
|
||||||
function ChoregraphyViewer:new()
|
function ChoregraphyViewer:new()
|
||||||
ChoregraphyViewer.super.new(self)
|
ChoregraphyViewer.super.new(self)
|
||||||
|
@ -25,7 +25,7 @@ function ChoregraphyViewer:buildMenu()
|
||||||
self.menusystem.menus["MainMenu"]:finalize()
|
self.menusystem.menus["MainMenu"]:finalize()
|
||||||
self.menusystem:activate()
|
self.menusystem:activate()
|
||||||
self.menusystem:switchMenu("MainMenu")
|
self.menusystem:switchMenu("MainMenu")
|
||||||
menu.commons.SceneWidget(self, "MainMenu", scenes.debug.menu, "Back")
|
menu.commons.SceneWidget(self, "MainMenu", scenes.menus.main, "Back")
|
||||||
end
|
end
|
||||||
|
|
||||||
function ChoregraphyViewer:buildCharacterMenu()
|
function ChoregraphyViewer:buildCharacterMenu()
|
|
@ -1,4 +1,4 @@
|
||||||
local commons = require "scenes.debug.commons.menu"
|
local commons = require "scenes.menus.commons.menu"
|
||||||
local listMenu = require "game.modules.menus.list"
|
local listMenu = require "game.modules.menus.list"
|
||||||
local menu = {}
|
local menu = {}
|
||||||
menu.commons = commons
|
menu.commons = commons
|
|
@ -1,8 +1,8 @@
|
||||||
local FighterMock = Object:extend()
|
local FighterMock = Object:extend()
|
||||||
|
|
||||||
local ActionMock = require "scenes.debug.viewers.choregraphy.mocks.action"
|
local ActionMock = require "scenes.menus.debugmenus.choregraphy.mocks.action"
|
||||||
local TargetMock = require "scenes.debug.viewers.choregraphy.mocks.target"
|
local TargetMock = require "scenes.menus.debugmenus.choregraphy.mocks.target"
|
||||||
local TurnSystemMock = require "scenes.debug.viewers.choregraphy.mocks.turnSystem"
|
local TurnSystemMock = require "scenes.menus.debugmenus.choregraphy.mocks.turnSystem"
|
||||||
|
|
||||||
function FighterMock:new(scene)
|
function FighterMock:new(scene)
|
||||||
self.scene = scene
|
self.scene = scene
|
10
sonic-radiance.love/scenes/menus/init.lua
Normal file
10
sonic-radiance.love/scenes/menus/init.lua
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
return {
|
||||||
|
title = require "scenes.menus.titlescreen",
|
||||||
|
main = require "scenes.menus.mainmenu",
|
||||||
|
debug = {
|
||||||
|
battleBack = require "scenes.menus.debugmenus.battleBack",
|
||||||
|
choregraphy = require "scenes.menus.debugmenus.choregraphy",
|
||||||
|
animation = require "scenes.menus.debugmenus.animation",
|
||||||
|
},
|
||||||
|
options = require "scenes.menus.options"
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
local Parent = require "scenes.debug.menu.infopanel.parent"
|
local Parent = require "scenes.menus.mainmenu.infopanel.parent"
|
||||||
local CharacterPanel = Parent:extend()
|
local CharacterPanel = Parent:extend()
|
||||||
|
|
||||||
function CharacterPanel:new(character)
|
function CharacterPanel:new(character)
|
|
@ -1,4 +1,4 @@
|
||||||
local Parent = require "scenes.debug.menu.infopanel.parent"
|
local Parent = require "scenes.menus.mainmenu.infopanel.parent"
|
||||||
local GamePanel = Parent:extend()
|
local GamePanel = Parent:extend()
|
||||||
|
|
||||||
function GamePanel:new()
|
function GamePanel:new()
|
|
@ -1,4 +1,4 @@
|
||||||
local folder = "scenes.debug.menu.infopanel."
|
local folder = "scenes.menus.mainmenu.infopanel."
|
||||||
|
|
||||||
return {
|
return {
|
||||||
Gamedata = require(folder .. "gamedata"),
|
Gamedata = require(folder .. "gamedata"),
|
|
@ -1,4 +1,4 @@
|
||||||
local Parent = require "scenes.debug.menu.infopanel.parent"
|
local Parent = require "scenes.menus.mainmenu.infopanel.parent"
|
||||||
local TeamPanel = Parent:extend()
|
local TeamPanel = Parent:extend()
|
||||||
|
|
||||||
function TeamPanel:new()
|
function TeamPanel:new()
|
|
@ -1,8 +1,8 @@
|
||||||
local Scene = require "birb.modules.scenes"
|
local Scene = require "birb.modules.scenes"
|
||||||
local menu = require "scenes.debug.menu.menu"
|
local menu = require "scenes.menus.mainmenu.menu"
|
||||||
|
|
||||||
local DebugMenu = Scene:extend()
|
local DebugMenu = Scene:extend()
|
||||||
local panels = require "scenes.debug.menu.infopanel"
|
local panels = require "scenes.menus.mainmenu.infopanel"
|
||||||
|
|
||||||
local gui = require "game.modules.gui"
|
local gui = require "game.modules.gui"
|
||||||
local MenuBack = require "game.modules.gui.menuback"
|
local MenuBack = require "game.modules.gui.menuback"
|
||||||
|
@ -14,7 +14,7 @@ function DebugMenu:new()
|
||||||
self.assets:batchImport("assets.commons")
|
self.assets:batchImport("assets.commons")
|
||||||
menu.commons.MainMenu(self, "BaseMenu")
|
menu.commons.MainMenu(self, "BaseMenu")
|
||||||
menu.StartGameWidget(self, "BaseMenu")
|
menu.StartGameWidget(self, "BaseMenu")
|
||||||
menu.commons.SceneWidget(self, "BaseMenu", scenes.options, "Options")
|
menu.commons.SceneWidget(self, "BaseMenu", scenes.menus.options, "Options")
|
||||||
self:buildDebugMenu()
|
self:buildDebugMenu()
|
||||||
menu.TitleWidget(self, "BaseMenu")
|
menu.TitleWidget(self, "BaseMenu")
|
||||||
self.menusystem.menus["BaseMenu"]:setCancelWidget()
|
self.menusystem.menus["BaseMenu"]:setCancelWidget()
|
||||||
|
@ -59,9 +59,9 @@ function DebugMenu:buildBattleMenu()
|
||||||
self:addBattles(battleCat)
|
self:addBattles(battleCat)
|
||||||
end
|
end
|
||||||
|
|
||||||
menu.commons.SceneWidget(self, "combat", scenes.debug.viewers.battleBack, "Background Viewer")
|
menu.commons.SceneWidget(self, "combat", scenes.menus.debug.battleBack, "Background Viewer")
|
||||||
menu.commons.SceneWidget(self, "combat", scenes.debug.viewers.animation, "Animation Viewer")
|
menu.commons.SceneWidget(self, "combat", scenes.menus.debug.animation, "Animation Viewer")
|
||||||
menu.commons.SceneWidget(self, "combat", scenes.debug.viewers.choregraphy, "Ennemies' Action Viewer")
|
menu.commons.SceneWidget(self, "combat", scenes.menus.debug.choregraphy, "Ennemies' Action Viewer")
|
||||||
end
|
end
|
||||||
|
|
||||||
function DebugMenu:addBattles(battleCat)
|
function DebugMenu:addBattles(battleCat)
|
|
@ -1,4 +1,4 @@
|
||||||
local commons = require "scenes.debug.commons.menu"
|
local commons = require "scenes.menus.commons.menu"
|
||||||
local listMenu = require "game.modules.menus.fancy"
|
local listMenu = require "game.modules.menus.fancy"
|
||||||
|
|
||||||
local defTransitions = require "birb.modules.transitions"
|
local defTransitions = require "birb.modules.transitions"
|
||||||
|
@ -39,7 +39,7 @@ end
|
||||||
|
|
||||||
function menu.TitleWidget:action()
|
function menu.TitleWidget:action()
|
||||||
self.scene.assets:playSFX("mBack")
|
self.scene.assets:playSFX("mBack")
|
||||||
core.screen:startTransition(defTransitions.circle, radTransitions.borders, function() scenes.title(true) end, 424/2, 240/2)
|
core.screen:startTransition(defTransitions.circle, radTransitions.borders, function() scenes.menus.title(true) end, 424/2, 240/2)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- ExitWidget
|
-- ExitWidget
|
|
@ -85,7 +85,7 @@ function widgets.Delete:deleteSave()
|
||||||
core.scenemanager:setStoredScene("mainmenu")
|
core.scenemanager:setStoredScene("mainmenu")
|
||||||
game:deleteCurrentSave()
|
game:deleteCurrentSave()
|
||||||
core.screen:startTransition(defTransitions.default, defTransitions.circle,
|
core.screen:startTransition(defTransitions.default, defTransitions.circle,
|
||||||
function() scenes.title(true) end,
|
function() scenes.menus.title(true) end,
|
||||||
424/2, 240/2)
|
424/2, 240/2)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ function widgets.Exit:action()
|
||||||
self.scene.assets:playSFX("mSelect")
|
self.scene.assets:playSFX("mSelect")
|
||||||
core.scenemanager:setStoredScene("mainmenu")
|
core.scenemanager:setStoredScene("mainmenu")
|
||||||
core.screen:startTransition(defTransitions.default, defTransitions.default,
|
core.screen:startTransition(defTransitions.default, defTransitions.default,
|
||||||
function() scenes.debug.menu() end,
|
function() scenes.menus.main() end,
|
||||||
0, 0)
|
0, 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ end
|
||||||
function SaveWidget:action()
|
function SaveWidget:action()
|
||||||
self.scene.assets:playSFX("mSelect")
|
self.scene.assets:playSFX("mSelect")
|
||||||
game:read(self.saveid)
|
game:read(self.saveid)
|
||||||
core.screen:startTransition(radTransitions.borders, defTransitions.circle, function() scenes.debug.menu() end, 424/2, 240/2)
|
core.screen:startTransition(radTransitions.borders, defTransitions.circle, function() scenes.menus.main() end, 424/2, 240/2)
|
||||||
end
|
end
|
||||||
|
|
||||||
return SaveMenu
|
return SaveMenu
|
||||||
|
|
|
@ -94,7 +94,7 @@ function GameOver:drawContinueBox(x, y, continueValue, size, opacity)
|
||||||
end
|
end
|
||||||
|
|
||||||
function GameOver:returnToTitle()
|
function GameOver:returnToTitle()
|
||||||
core.screen:startTransition(defTransitions.default, defTransitions.circle, function() scenes.title(true) end, 424/2, 240/2)
|
core.screen:startTransition(defTransitions.default, defTransitions.circle, function() scenes.menus.title(true) end, 424/2, 240/2)
|
||||||
end
|
end
|
||||||
function GameOver:loadLastSave()
|
function GameOver:loadLastSave()
|
||||||
self.scene.tweens:newTween(0, 0.3, {borderPosition=0}, "inOutQuad")
|
self.scene.tweens:newTween(0, 0.3, {borderPosition=0}, "inOutQuad")
|
||||||
|
|
|
@ -129,7 +129,7 @@ function SaveExitWidget:action()
|
||||||
end
|
end
|
||||||
|
|
||||||
function SaveExitWidget:exitToMenu()
|
function SaveExitWidget:exitToMenu()
|
||||||
core.screen:startTransition(defTransitions.default, defTransitions.circle, function() game:reload() scenes.debug.menu() end, 424/2, 240/2)
|
core.screen:startTransition(defTransitions.default, defTransitions.circle, function() game:reload() scenes.menus.main() end, 424/2, 240/2)
|
||||||
self.scene.tweens:newTween(0, 0.3, {ringBorder=-16}, "inOutQuad")
|
self.scene.tweens:newTween(0, 0.3, {ringBorder=-16}, "inOutQuad")
|
||||||
self.scene.tweens:newTween(0, 0.3, {timeBorder=-20}, "inOutQuad")
|
self.scene.tweens:newTween(0, 0.3, {timeBorder=-20}, "inOutQuad")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue