diff options
author | Spartan322 <Megacake1234@gmail.com> | 2023-04-23 22:01:49 +0200 |
---|---|---|
committer | Spartan322 <Megacake1234@gmail.com> | 2023-05-12 13:32:21 +0200 |
commit | 8ab166ae0bd784145c3706aba0c3f3326cbbaac1 (patch) | |
tree | e4511c51eb4ceaefd92a7ad8a00f42910eb83811 /game/src/GameSession/GameSessionMenu.gd | |
parent | 398ba6f05ae1bb13e59790436bf0da299e5a399d (diff) |
Add SaveManager autoload singleton
Globally handles save finding, creation, removal, changes, naming, and flushing
Globally handles the session tags for the active save
Add SaveLoadMenu to GameSession
Add Start Date Panel and Save Panel loading to LobbyMenu
Includes session tag filter
Add LobbyPanelButton and SavePanelButton scene and scripts
Add SaveResource to handle saving and loading individual save files
Add localization for SaveLoadMenu
Expand localization for additions to LobbyMenu
Add ButtonContainer variation type to default theme
Fulfill:
UI-82, UI-83, UI-84, UI-85, UI-87, UI-89, UI-90, UI-91, UI-92, UI-94
UIFUN-82, UIFUN-83, UIFUN-84, UIFUN-86, UIFUN-87, UIFUN-89
FS-28
Diffstat (limited to 'game/src/GameSession/GameSessionMenu.gd')
-rw-r--r-- | game/src/GameSession/GameSessionMenu.gd | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/game/src/GameSession/GameSessionMenu.gd b/game/src/GameSession/GameSessionMenu.gd index 6f373d7..23ef2ef 100644 --- a/game/src/GameSession/GameSessionMenu.gd +++ b/game/src/GameSession/GameSessionMenu.gd @@ -10,6 +10,8 @@ var _main_menu_save_separator : Control var _quit_save_button : Button var _quit_save_separator : Control +signal save_button_pressed +signal load_button_pressed signal options_button_pressed func _ready() -> void: @@ -45,6 +47,8 @@ func show_save_dialog_button() -> void: # * SS-47 # * UIFUN-69 func _on_main_menu_confirmed() -> void: + SaveManager.current_session_tag = "" + SaveManager.current_save = null get_tree().change_scene_to_packed(_main_menu_scene) # REQUIREMENTS: @@ -68,3 +72,9 @@ func _on_quit_dialog_custom_action(action : StringName) -> void: match action: &"save_and_quit": _on_quit_confirmed() + +func _on_save_button_pressed(): + save_button_pressed.emit() + +func _on_load_button_pressed(): + load_button_pressed.emit() |