restructured folders
This commit is contained in:
parent
e3aec75404
commit
0f5045dc22
22 changed files with 32 additions and 21 deletions
33
ui/main_menu.gd
Normal file
33
ui/main_menu.gd
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
extends Control
|
||||
|
||||
signal on_new_game_started
|
||||
signal on_game_continued
|
||||
|
||||
# On ready, check which buttons to show
|
||||
func _ready() -> void:
|
||||
if SaveGame.savegame_exists():
|
||||
%ContinueGameButton.visible = true
|
||||
%NewGameButton.visible = false
|
||||
|
||||
func _on_new_game_button_pressed() -> void:
|
||||
# Hide the main menu
|
||||
self.visible = false
|
||||
|
||||
# emit the new game signal
|
||||
on_new_game_started.emit()
|
||||
|
||||
func _on_continue_game_button_pressed() -> void:
|
||||
# Hide the main menu
|
||||
self.visible = false
|
||||
|
||||
# emit the continue game signal
|
||||
on_game_continued.emit()
|
||||
|
||||
func _on_options_button_pressed() -> void:
|
||||
print("TODO")
|
||||
|
||||
func _on_licenses_button_pressed() -> void:
|
||||
print("TODO")
|
||||
|
||||
func _on_exit_button_pressed() -> void:
|
||||
get_tree().quit()
|
||||
Loading…
Add table
Add a link
Reference in a new issue