diff options
author | nuruvilu <75346368+nuruvilu@users.noreply.github.com> | 2023-02-27 13:10:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-27 13:10:17 +0100 |
commit | bf2ce936c870f4c8d3aafba1b074eb643bcb536c (patch) | |
tree | c8541f84a3698dcb9102a9c0160e285fa9261c8c /game/src/LobbyMenu/LobbyMenu.gd | |
parent | e637c3afe2854488d1c2e755e0272f431105c404 (diff) |
Add skeleton for Game Lobby Menu (#26)
Diffstat (limited to 'game/src/LobbyMenu/LobbyMenu.gd')
-rw-r--r-- | game/src/LobbyMenu/LobbyMenu.gd | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/game/src/LobbyMenu/LobbyMenu.gd b/game/src/LobbyMenu/LobbyMenu.gd new file mode 100644 index 0000000..bf20ce0 --- /dev/null +++ b/game/src/LobbyMenu/LobbyMenu.gd @@ -0,0 +1,35 @@ +extends Control + +# REQUIREMENTS: +# * 1.4 Game Lobby Menu +# * SS-12 + +signal back_button_pressed +signal save_game_selected + +@export +var start_button : BaseButton + +# REQUIREMENTS: +# * UIFUN-40 +func _on_back_button_button_down(): + print("Returning to Main Menu.") + back_button_pressed.emit() + + +# REQUIREMENTS: +# * UIFUN-65 +func _on_start_button_button_down(): + print("Starting new game.") + get_tree().change_scene_to_file("res://src/SampleGame.tscn") + + +# REQUIREMENTS: +# * UIFUN-61 +func _on_game_select_list_item_selected(index): + print("Selected save game: ", index) + save_game_selected.emit(index) + + +func _on_save_game_selected(_index): + start_button.disabled = false |