aboutsummaryrefslogtreecommitdiff
path: root/game/src/LobbyMenu/LobbyMenu.gd
blob: 873e2a29d460f313ab4c1705a9ce4f1b52c02fb0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
extends HBoxContainer

# REQUIREMENTS:
# * 1.4 Game Lobby Menu
# * SS-12

signal back_button_pressed
signal save_game_selected

@export
var start_button : BaseButton

# REQUIREMENTS:
# * SS-16
# * UIFUN-40
func _on_back_button_button_down():
   print("Returning to Main Menu.")
   back_button_pressed.emit()


# REQUIREMENTS:
# * SS-21
func _on_start_button_button_down():
   print("Starting new game.")
   get_tree().change_scene_to_file("res://src/SampleGame.tscn")


# REQUIREMENTS:
# * SS-19
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