added commands for requesting and receiving bets and starting rounds

This commit is contained in:
2025-07-09 16:48:45 +02:00
parent cf7a53f111
commit 59ff9a429a
4 changed files with 108 additions and 12 deletions
+18 -1
View File
@@ -142,7 +142,7 @@ size_flags_horizontal = 3
layout_mode = 2
text = "Send"
[node name="GameUI" type="Control" parent="HBoxContainer" node_paths=PackedStringArray("web_client", "start_game_button", "play_card_button")]
[node name="GameUI" type="Control" parent="HBoxContainer" node_paths=PackedStringArray("web_client", "start_game_button", "play_card_button", "bet_container", "bet_input")]
layout_mode = 2
size_flags_horizontal = 3
mouse_filter = 2
@@ -150,6 +150,8 @@ script = ExtResource("3_feb5d")
web_client = NodePath("../../WebClientTCP")
start_game_button = NodePath("StartGameButton")
play_card_button = NodePath("PlayCardButton")
bet_container = NodePath("BetContainer")
bet_input = NodePath("BetContainer/BetInput")
[node name="StartGameButton" type="Button" parent="HBoxContainer/GameUI"]
visible = false
@@ -182,6 +184,20 @@ grow_vertical = 0
disabled = true
text = "Play Card"
[node name="BetContainer" type="VBoxContainer" parent="HBoxContainer/GameUI"]
layout_mode = 0
offset_left = 218.0
offset_top = 833.0
offset_right = 445.0
offset_bottom = 899.0
[node name="BetInput" type="LineEdit" parent="HBoxContainer/GameUI/BetContainer"]
layout_mode = 2
[node name="SubmitBetButton" type="Button" parent="HBoxContainer/GameUI/BetContainer"]
layout_mode = 2
text = "submit bet"
[node name="EnvironmentManager" type="Node3D" parent="." node_paths=PackedStringArray("own_player_hand")]
script = ExtResource("4_7jktm")
own_player_hand = NodePath("PlayerHand")
@@ -229,4 +245,5 @@ mesh = SubResource("BoxMesh_fc0e3")
[connection signal="pressed" from="HBoxContainer/ClientInterface/MarginContainer/VBoxContainer/ChatContainer/SendMessageButton" to="HBoxContainer/ClientInterface" 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/PlayerHand" method="_on_play_card_button_pressed"]
[connection signal="pressed" from="HBoxContainer/GameUI/BetContainer/SubmitBetButton" to="HBoxContainer/GameUI" method="_on_submit_bet_button_pressed"]
[connection signal="card_selected" from="EnvironmentManager/PlayerHand" to="HBoxContainer/GameUI" method="_on_player_hand_card_selected"]