cambios
This commit is contained in:
42
game/ui/menus/main_menu/main_menu.gd
Normal file
42
game/ui/menus/main_menu/main_menu.gd
Normal file
@@ -0,0 +1,42 @@
|
||||
# A simple main menu
|
||||
extends Control
|
||||
|
||||
|
||||
# Start the game
|
||||
func _on_new_game_pressed():
|
||||
escoria.new_game()
|
||||
|
||||
|
||||
# Show the load slots
|
||||
func _on_load_game_pressed():
|
||||
$main.hide()
|
||||
$load_game.refresh_savegames()
|
||||
$load_game.show()
|
||||
|
||||
|
||||
# Show the options panel
|
||||
func _on_options_pressed():
|
||||
$main.hide()
|
||||
$options.show()
|
||||
|
||||
|
||||
# Quit the game
|
||||
func _on_quit_pressed():
|
||||
escoria.quit()
|
||||
|
||||
|
||||
# Hide the options panel again
|
||||
func _on_options_back_button_pressed():
|
||||
reset()
|
||||
|
||||
|
||||
# Hide the load panel
|
||||
func _on_load_game_back_button_pressed():
|
||||
reset()
|
||||
|
||||
|
||||
# Resets the UI to initial state
|
||||
func reset():
|
||||
$load_game.hide()
|
||||
$options.hide()
|
||||
$main.show()
|
||||
Reference in New Issue
Block a user