messages can now be sent by pressing enter

This commit is contained in:
2025-07-20 14:11:46 +02:00
parent 3cf036db42
commit ce820260bd
5 changed files with 39 additions and 9 deletions
+7 -2
View File
@@ -106,7 +106,7 @@ text = "Disconnect"
[node name="ConnectedPlayersLabel" type="Label" parent="Interface/ClientInterface/MarginContainer/VBoxContainer"]
layout_mode = 2
[node name="ChatPanel" type="VBoxContainer" parent="Interface" node_paths=PackedStringArray("message_container", "scroll_container")]
[node name="ChatPanel" type="VBoxContainer" parent="Interface" node_paths=PackedStringArray("message_container", "scroll_container", "message_input", "send_message_button")]
layout_mode = 1
anchors_preset = -1
anchor_top = 0.478704
@@ -117,6 +117,8 @@ script = ExtResource("4_iotsf")
auto_scroll_duration = 0.4
message_container = NodePath("ScrollContainer/MessageContainer")
scroll_container = NodePath("ScrollContainer")
message_input = NodePath("InputContainer/MessageInput")
send_message_button = NodePath("InputContainer/SendMessageButton")
metadata/_edit_use_anchors_ = true
[node name="ScrollContainer" type="ScrollContainer" parent="Interface/ChatPanel"]
@@ -502,7 +504,10 @@ playing_card_scene = ExtResource("6_eow3j")
[connection signal="pressed" from="Interface/ClientInterface/MarginContainer/VBoxContainer/ServerInputs/JoinLobbyButton" to="Interface/ClientInterface" method="_on_join_lobby_button_pressed"]
[connection signal="pressed" from="Interface/ClientInterface/MarginContainer/VBoxContainer/ServerInputs/JoinLobbyButton" to="HBoxContainer/GameUI" method="_on_join_lobby_button_pressed"]
[connection signal="pressed" from="Interface/ClientInterface/MarginContainer/VBoxContainer/ServerInputs/LeaveLobbyButton" to="Interface/ClientInterface" method="_on_disconnect_lobby_button_pressed"]
[connection signal="pressed" from="Interface/ChatPanel/InputContainer/SendMessageButton" to="Interface/ClientInterface" method="_on_send_message_button_pressed"]
[connection signal="message_sent" from="Interface/ChatPanel" to="WebClient" method="_on_chat_panel_message_sent"]
[connection signal="gui_input" from="Interface/ChatPanel/InputContainer/MessageInput" to="Interface/ChatPanel" method="_on_message_input_gui_input"]
[connection signal="text_changed" from="Interface/ChatPanel/InputContainer/MessageInput" to="Interface/ChatPanel" method="_on_message_input_text_changed"]
[connection signal="pressed" from="Interface/ChatPanel/InputContainer/SendMessageButton" to="Interface/ChatPanel" method="_on_send_message_button_pressed"]
[connection signal="pressed" from="HBoxContainer/GameUI/StartGameButton" to="HBoxContainer/GameUI" method="_on_start_game_button_pressed"]
[connection signal="pressed" from="HBoxContainer/GameUI/PlayCardButton" to="EnvironmentManager/PlayerHand0" method="_on_play_card_button_pressed"]
[connection signal="text_changed" from="HBoxContainer/GameUI/BetContainer/BetInput" to="HBoxContainer/GameUI/BetContainer/BetInput" method="_on_text_changed"]