Prepping for other scenes.

This commit is contained in:
2026-01-08 23:12:02 -06:00
parent cd2dd3fe0e
commit ba61ab90a5
25 changed files with 159 additions and 10 deletions

45
ui/debugmenu/DebugMenu.gd Normal file
View File

@@ -0,0 +1,45 @@
class_name DebugMenu extends Control
@export var btnInitial: Button = null
@export var btnOverworld: Button = null
@export var btnBattle: Button = null
@export var btnCooking: Button = null
var isClosed:bool = false:
get():
return !self.visible;
set(value):
self.visible = !value;
func _enter_tree() -> void:
if btnInitial:
btnInitial.pressed.connect(onInitialPressed)
if btnOverworld:
btnOverworld.pressed.connect(onOverworldPressed)
if btnBattle:
btnBattle.pressed.connect(onBattlePressed)
if btnCooking:
btnCooking.pressed.connect(onCookingPressed)
isClosed = false
func _exit_tree() -> void:
if btnInitial:
btnInitial.pressed.disconnect(onInitialPressed)
if btnOverworld:
btnOverworld.pressed.disconnect(onOverworldPressed)
if btnBattle:
btnBattle.pressed.disconnect(onBattlePressed)
if btnCooking:
btnCooking.pressed.disconnect(onCookingPressed)
func onInitialPressed() -> void:
SCENE.setScene(SCENE.SceneType.INITIAL)
func onOverworldPressed() -> void:
SCENE.setScene(SCENE.SceneType.OVERWORLD)
func onBattlePressed() -> void:
SCENE.setScene(SCENE.SceneType.BATTLE)
func onCookingPressed() -> void:
SCENE.setScene(SCENE.SceneType.COOKING)