diff options
| author | BigBrotherNii <nicochr1004@gmail.com> | 2024-07-24 17:21:24 +0200 | 
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2024-07-25 11:25:41 +0200 | 
| commit | a2c5fa06d3c36ddd71d96beda79605145e061e5e (patch) | |
| tree | 9471a0a583ce1e5f4cb4a7298149b5540191c60a /client/menu | |
| parent | 7e4ad7a70a2636c117879021f61b3a2025a16743 (diff) | |
| download | hurrycurry-a2c5fa06d3c36ddd71d96beda79605145e061e5e.tar hurrycurry-a2c5fa06d3c36ddd71d96beda79605145e061e5e.tar.bz2 hurrycurry-a2c5fa06d3c36ddd71d96beda79605145e061e5e.tar.zst | |
added lobby music
Diffstat (limited to 'client/menu')
| -rw-r--r-- | client/menu/lobby.gd | 9 | ||||
| -rw-r--r-- | client/menu/lobby.tscn | 1 | 
2 files changed, 9 insertions, 1 deletions
| diff --git a/client/menu/lobby.gd b/client/menu/lobby.gd index 5b4616cf..9991fbbf 100644 --- a/client/menu/lobby.gd +++ b/client/menu/lobby.gd @@ -43,7 +43,7 @@ func _ready():  	game.data_updated.connect(initialize)  	game.joined.connect(_on_game_joined)  	game.left.connect(_on_game_left) -	Sound.play_music("stop") # TODO: Input Lobby music +	check_for_music()  func initialize():  	map_count = game.maps.size() @@ -97,6 +97,7 @@ func _on_right_pressed():  func _on_controller_button_pressed():  	if selected_map_name != null:  		game.mp.send_chat("/start %s" % selected_map_name) +		Sound.play_music("stop") # TODO: Game music enter  func _on_join_spectate_pressed():  	if game.is_joined: @@ -105,3 +106,9 @@ func _on_join_spectate_pressed():  	elif not game.join_sent:  		game.join()  		join_spectate.text = tr("Spectate") + +func check_for_music(): +	if visible: +		Sound.play_music("Lobby") +	else: +		Sound.play_music("stop") # TODO: Game music enter diff --git a/client/menu/lobby.tscn b/client/menu/lobby.tscn index e2da5094..d13498d6 100644 --- a/client/menu/lobby.tscn +++ b/client/menu/lobby.tscn @@ -147,6 +147,7 @@ expand_icon = true  controller_texture = ExtResource("11_5uugf")  press_action = "join_spectate" +[connection signal="visibility_changed" from="." to="." method="check_for_music"]  [connection signal="pressed" from="VBoxContainer/Bottom/MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer/Left" to="." method="_on_left_pressed"]  [connection signal="pressed" from="VBoxContainer/Bottom/MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer2/Right" to="." method="_on_right_pressed"]  [connection signal="pressed" from="VBoxContainer/Bottom/MarginContainer/VBoxContainer/CenterContainer/Start" to="." method="_on_controller_button_pressed"] | 
