diff options
author | ClarkeCode <33846391+ClarkeCode@users.noreply.github.com> | 2023-02-08 16:00:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-08 16:00:53 +0100 |
commit | 233d8896093cd1fef145c0b8483c50cf6d068721 (patch) | |
tree | f72ebd20ff1854ff298270ac3707f3465226520c /game/src/MainMenu.gd | |
parent | 2c0ef462ac500d089ea107f2bc00b0905606d070 (diff) | |
parent | f998d1b539f572a87cea81843e8d76ceb6960b8c (diff) |
Merge pull request #5 from ClarkeCode/basic-ui
Exploration of UI and rudimentary scene switching.
Diffstat (limited to 'game/src/MainMenu.gd')
-rw-r--r-- | game/src/MainMenu.gd | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/game/src/MainMenu.gd b/game/src/MainMenu.gd new file mode 100644 index 0000000..a9cdf10 --- /dev/null +++ b/game/src/MainMenu.gd @@ -0,0 +1,36 @@ +extends Control + + +# Called when the node enters the scene tree for the first time. +func _ready(): + print("From GDScript") + TestSingleton.hello_singleton() + $CenterContainer/VBoxContainer/NewGameButton.grab_focus() + pass # Replace with function body. + + +## Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass + + +func _on_new_game_button_pressed(): + print("Start a new game!") + + +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!") + get_tree().change_scene_to_file("res://src/OptionsMenu.tscn") + + +func _on_exit_button_pressed(): + print("See you later!") + get_tree().quit() |