diff options
author | George L. Albany <Megacake1234@gmail.com> | 2023-06-04 02:17:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-04 02:17:28 +0200 |
commit | 3236f51d700674aee6ee6572109ffb3d5fa5fed2 (patch) | |
tree | b898150a8a45e7c0d814459e7f12f39429acefeb /game/src/Game/Menu/MainMenu/MainMenu.gd | |
parent | 73e29d02e48739aba5ca5db1b9575c67e795400f (diff) | |
parent | b98166b28c47cccff731d30959b8250fb27ff408 (diff) |
Merge pull request #130 from Spartan322/organize/godot-project
Diffstat (limited to 'game/src/Game/Menu/MainMenu/MainMenu.gd')
-rw-r--r-- | game/src/Game/Menu/MainMenu/MainMenu.gd | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/game/src/Game/Menu/MainMenu/MainMenu.gd b/game/src/Game/Menu/MainMenu/MainMenu.gd new file mode 100644 index 0000000..9d0edc6 --- /dev/null +++ b/game/src/Game/Menu/MainMenu/MainMenu.gd @@ -0,0 +1,50 @@ +extends Control + +signal options_button_pressed +signal new_game_button_pressed +signal credits_button_pressed + +@export +var _new_game_button : BaseButton + +# REQUIREMENTS: +# * SS-3 +func _ready(): + _on_new_game_button_visibility_changed() + +# REQUIREMENTS: +# * SS-14 +# * UIFUN-32 +func _on_new_game_button_pressed(): + print("Start a new game!") + new_game_button_pressed.emit() + + +func _on_continue_button_pressed(): + print("Continue last game!") + + +func _on_multi_player_button_pressed(): + print("Have fun with friends!") + + +func _on_options_button_pressed(): + print("Check out some options!") + options_button_pressed.emit() + +# REQUIREMENTS +# * UI-32 +# * UIFUN-36 +func _on_credits_button_pressed(): + credits_button_pressed.emit() + +# REQUIREMENTS +# * SS-4 +# * UIFUN-3 +func _on_exit_button_pressed(): + print("See you later!") + get_tree().quit() + +func _on_new_game_button_visibility_changed(): + if visible: + _new_game_button.grab_focus.call_deferred() |