aboutsummaryrefslogtreecommitdiff
path: root/game/src/LobbyMenu
diff options
context:
space:
mode:
author ClarkeCode <clarke.john.robert@gmail.com>2023-04-27 22:13:52 +0200
committer ClarkeCode <clarke.john.robert@gmail.com>2023-04-27 22:13:52 +0200
commit0b273743b480874281a8987c72b2f1b666bc289a (patch)
tree3f5d5a6316ac66407e61c8a56fe732cdf06209e5 /game/src/LobbyMenu
parent98dd680a641a2cbe0f1f93202a5beffdfd35c9f7 (diff)
parent10053cf259c55ee45803268a844edf1011d8a16b (diff)
Merge branch 'main' of github.com:OpenVic2Project/OpenVic2 into goods
Diffstat (limited to 'game/src/LobbyMenu')
-rw-r--r--game/src/LobbyMenu/LobbyMenu.gd5
-rw-r--r--game/src/LobbyMenu/LobbyMenu.tscn1
2 files changed, 6 insertions, 0 deletions
diff --git a/game/src/LobbyMenu/LobbyMenu.gd b/game/src/LobbyMenu/LobbyMenu.gd
index 802dac3..4fc06c9 100644
--- a/game/src/LobbyMenu/LobbyMenu.gd
+++ b/game/src/LobbyMenu/LobbyMenu.gd
@@ -34,3 +34,8 @@ func _on_game_select_list_item_selected(index):
func _on_save_game_selected(_index):
start_button.disabled = false
+
+# If the date is double-clicked, start the game!
+func _on_game_select_list_item_activated(index):
+ _on_game_select_list_item_selected(index)
+ _on_start_button_button_down()
diff --git a/game/src/LobbyMenu/LobbyMenu.tscn b/game/src/LobbyMenu/LobbyMenu.tscn
index 528e7ae..174fb72 100644
--- a/game/src/LobbyMenu/LobbyMenu.tscn
+++ b/game/src/LobbyMenu/LobbyMenu.tscn
@@ -78,6 +78,7 @@ custom_minimum_size = Vector2(0, 33)
layout_mode = 2
[connection signal="save_game_selected" from="." to="." method="_on_save_game_selected"]
+[connection signal="item_activated" from="GameSelectPanel/VBoxContainer/GameSelectList" to="." method="_on_game_select_list_item_activated"]
[connection signal="item_selected" from="GameSelectPanel/VBoxContainer/GameSelectList" to="." method="_on_game_select_list_item_selected"]
[connection signal="button_down" from="GameSelectPanel/VBoxContainer/BackButton" to="." method="_on_back_button_button_down"]
[connection signal="button_down" from="GameStartPanel/VBoxContainer/StartButton" to="." method="_on_start_button_button_down"]