added PlayCardButton; influences card selection

This commit is contained in:
2025-07-08 17:07:32 +02:00
parent 167b455160
commit e0693725ea
4 changed files with 44 additions and 6 deletions
+20 -3
View File
@@ -26,7 +26,6 @@ script = ExtResource("1_feb5d")
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_right = -1591.0
grow_horizontal = 2
grow_vertical = 2
@@ -142,13 +141,14 @@ size_flags_horizontal = 3
layout_mode = 2
text = "Send"
[node name="GameUI" type="Control" parent="HBoxContainer" node_paths=PackedStringArray("web_client", "start_game_button")]
visible = false
[node name="GameUI" type="Control" parent="HBoxContainer" node_paths=PackedStringArray("web_client", "start_game_button", "play_card_button")]
layout_mode = 2
size_flags_horizontal = 3
mouse_filter = 2
script = ExtResource("3_feb5d")
web_client = NodePath("../../WebClientTCP")
start_game_button = NodePath("StartGameButton")
play_card_button = NodePath("PlayCardButton")
[node name="StartGameButton" type="Button" parent="HBoxContainer/GameUI"]
visible = false
@@ -166,6 +166,21 @@ grow_horizontal = 2
grow_vertical = 2
text = "Start Game!"
[node name="PlayCardButton" type="Button" parent="HBoxContainer/GameUI"]
layout_mode = 1
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -4.0
offset_top = -8.0
offset_right = 4.0
grow_horizontal = 2
grow_vertical = 0
disabled = true
text = "Play Card"
[node name="Node3D" type="Node3D" parent="."]
[node name="Camera3D" type="Camera3D" parent="Node3D"]
@@ -207,3 +222,5 @@ mesh = SubResource("BoxMesh_fc0e3")
[connection signal="pressed" from="HBoxContainer/ClientInterface/MarginContainer/VBoxContainer/ServerInputs/LeaveLobbyButton" to="HBoxContainer/ClientInterface" method="_on_disconnect_lobby_button_pressed"]
[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="Node3D/PlayerHand" method="_on_play_card_button_pressed"]
[connection signal="card_selected" from="Node3D/PlayerHand" to="HBoxContainer/GameUI" method="_on_player_hand_card_selected"]