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
|
||||
core.scenemanager:setStoredScene("afterBattle")
|
||||
else
|
||||
scenes.debug.menu()
|
||||
scenes.menus.main()
|
||||
end
|
||||
end, self.lastx, self.lasty)
|
||||
self.lastx, self.lasty = DEFAULTX, DEFAULTY
|
||||
|
|
|
@ -86,7 +86,7 @@ function PlayStyle:restartLevel()
|
|||
end
|
||||
|
||||
function PlayStyle:exitLevel()
|
||||
scenes.title()
|
||||
scenes.menus.title()
|
||||
end
|
||||
|
||||
return PlayStyle
|
||||
|
|
|
@ -28,5 +28,5 @@ scenes = require "scenes"
|
|||
function love.load(args)
|
||||
print(utils.table.toString(args))
|
||||
birb.start("game", args)
|
||||
scenes.title()
|
||||
scenes.menus.title()
|
||||
end
|
|
@ -66,7 +66,7 @@ function VictoryScreen:update(dt)
|
|||
end
|
||||
if (keys["A"].isPressed) then
|
||||
--placeholder, pour l'instant on retourne juste au menu
|
||||
scenes.debug.menu()
|
||||
scenes.menus.main()
|
||||
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 {
|
||||
test = require "scenes.subgames.testBattle",
|
||||
test2 = require "scenes.subgames.testShoot",
|
||||
title = require "scenes.menus.titlescreen",
|
||||
cbs = require "scenes.battlesystem",
|
||||
debug = require "scenes.debug",
|
||||
options = require "scenes.menus.options",
|
||||
menus = require "scenes.menus",
|
||||
overworld = require "scenes.overworld"
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
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 Background = require "game.modules.drawing.parallaxBackground"
|
||||
|
@ -21,7 +21,7 @@ function CharAnimViewer:new()
|
|||
menu.AnimationWidget(self, charName, animName)
|
||||
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: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 menu = {}
|
||||
menu.commons = commons
|
|
@ -1,5 +1,5 @@
|
|||
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 Background = require "game.modules.drawing.parallaxBackground"
|
||||
|
@ -17,7 +17,7 @@ function BackgroundViewer:new()
|
|||
for backId, backgroundData in pairs(backgroundList) do
|
||||
menu.ShowBackgroundWidget(self, "MainMenu", backgroundData.name, backId)
|
||||
end
|
||||
menu.commons.SceneWidget(self, "MainMenu", scenes.debug.menu, "Back")
|
||||
menu.commons.SceneWidget(self, "MainMenu", scenes.menus.main, "Back")
|
||||
|
||||
self.menusystem:activate()
|
||||
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 menu = {}
|
||||
menu.commons = commons
|
|
@ -1,10 +1,10 @@
|
|||
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 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()
|
||||
ChoregraphyViewer.super.new(self)
|
||||
|
@ -25,7 +25,7 @@ function ChoregraphyViewer:buildMenu()
|
|||
self.menusystem.menus["MainMenu"]:finalize()
|
||||
self.menusystem:activate()
|
||||
self.menusystem:switchMenu("MainMenu")
|
||||
menu.commons.SceneWidget(self, "MainMenu", scenes.debug.menu, "Back")
|
||||
menu.commons.SceneWidget(self, "MainMenu", scenes.menus.main, "Back")
|
||||
end
|
||||
|
||||
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 menu = {}
|
||||
menu.commons = commons
|
|
@ -1,8 +1,8 @@
|
|||
local FighterMock = Object:extend()
|
||||
|
||||
local ActionMock = require "scenes.debug.viewers.choregraphy.mocks.action"
|
||||
local TargetMock = require "scenes.debug.viewers.choregraphy.mocks.target"
|
||||
local TurnSystemMock = require "scenes.debug.viewers.choregraphy.mocks.turnSystem"
|
||||
local ActionMock = require "scenes.menus.debugmenus.choregraphy.mocks.action"
|
||||
local TargetMock = require "scenes.menus.debugmenus.choregraphy.mocks.target"
|
||||
local TurnSystemMock = require "scenes.menus.debugmenus.choregraphy.mocks.turnSystem"
|
||||
|
||||
function FighterMock:new(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()
|
||||
|
||||
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()
|
||||
|
||||
function GamePanel:new()
|
|
@ -1,4 +1,4 @@
|
|||
local folder = "scenes.debug.menu.infopanel."
|
||||
local folder = "scenes.menus.mainmenu.infopanel."
|
||||
|
||||
return {
|
||||
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()
|
||||
|
||||
function TeamPanel:new()
|
|
@ -1,8 +1,8 @@
|
|||
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 panels = require "scenes.debug.menu.infopanel"
|
||||
local panels = require "scenes.menus.mainmenu.infopanel"
|
||||
|
||||
local gui = require "game.modules.gui"
|
||||
local MenuBack = require "game.modules.gui.menuback"
|
||||
|
@ -14,7 +14,7 @@ function DebugMenu:new()
|
|||
self.assets:batchImport("assets.commons")
|
||||
menu.commons.MainMenu(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()
|
||||
menu.TitleWidget(self, "BaseMenu")
|
||||
self.menusystem.menus["BaseMenu"]:setCancelWidget()
|
||||
|
@ -59,9 +59,9 @@ function DebugMenu:buildBattleMenu()
|
|||
self:addBattles(battleCat)
|
||||
end
|
||||
|
||||
menu.commons.SceneWidget(self, "combat", scenes.debug.viewers.battleBack, "Background Viewer")
|
||||
menu.commons.SceneWidget(self, "combat", scenes.debug.viewers.animation, "Animation Viewer")
|
||||
menu.commons.SceneWidget(self, "combat", scenes.debug.viewers.choregraphy, "Ennemies' Action Viewer")
|
||||
menu.commons.SceneWidget(self, "combat", scenes.menus.debug.battleBack, "Background Viewer")
|
||||
menu.commons.SceneWidget(self, "combat", scenes.menus.debug.animation, "Animation Viewer")
|
||||
menu.commons.SceneWidget(self, "combat", scenes.menus.debug.choregraphy, "Ennemies' Action Viewer")
|
||||
end
|
||||
|
||||
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 defTransitions = require "birb.modules.transitions"
|
||||
|
@ -39,7 +39,7 @@ end
|
|||
|
||||
function menu.TitleWidget:action()
|
||||
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
|
||||
|
||||
-- ExitWidget
|
|
@ -85,7 +85,7 @@ function widgets.Delete:deleteSave()
|
|||
core.scenemanager:setStoredScene("mainmenu")
|
||||
game:deleteCurrentSave()
|
||||
core.screen:startTransition(defTransitions.default, defTransitions.circle,
|
||||
function() scenes.title(true) end,
|
||||
function() scenes.menus.title(true) end,
|
||||
424/2, 240/2)
|
||||
end
|
||||
|
||||
|
@ -99,7 +99,7 @@ function widgets.Exit:action()
|
|||
self.scene.assets:playSFX("mSelect")
|
||||
core.scenemanager:setStoredScene("mainmenu")
|
||||
core.screen:startTransition(defTransitions.default, defTransitions.default,
|
||||
function() scenes.debug.menu() end,
|
||||
function() scenes.menus.main() end,
|
||||
0, 0)
|
||||
end
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ end
|
|||
function SaveWidget:action()
|
||||
self.scene.assets:playSFX("mSelect")
|
||||
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
|
||||
|
||||
return SaveMenu
|
||||
|
|
|
@ -94,7 +94,7 @@ function GameOver:drawContinueBox(x, y, continueValue, size, opacity)
|
|||
end
|
||||
|
||||
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
|
||||
function GameOver:loadLastSave()
|
||||
self.scene.tweens:newTween(0, 0.3, {borderPosition=0}, "inOutQuad")
|
||||
|
|
|
@ -129,7 +129,7 @@ function SaveExitWidget:action()
|
|||
end
|
||||
|
||||
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, {timeBorder=-20}, "inOutQuad")
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue