bet input now responds to inputs with (error) messages

This commit is contained in:
2025-07-18 11:38:23 +02:00
parent 47ec5b5ac0
commit d778539e3d
2 changed files with 33 additions and 3 deletions
+11 -2
View File
@@ -186,7 +186,6 @@ disabled = true
text = "Play Card"
[node name="BetContainer" type="VBoxContainer" parent="HBoxContainer/GameUI"]
visible = false
layout_mode = 1
anchors_preset = 2
anchor_top = 1.0
@@ -197,7 +196,10 @@ offset_right = 327.0
offset_bottom = -114.0
grow_vertical = 0
[node name="BetInput" type="LineEdit" parent="HBoxContainer/GameUI/BetContainer" node_paths=PackedStringArray("submit_button")]
[node name="DisallowedBetLabel" type="Label" parent="HBoxContainer/GameUI/BetContainer"]
layout_mode = 2
[node name="BetInput" type="LineEdit" parent="HBoxContainer/GameUI/BetContainer" node_paths=PackedStringArray("error_label", "disallowed_bet_label", "submit_button")]
layout_mode = 2
max_length = 2
context_menu_enabled = false
@@ -207,12 +209,18 @@ shortcut_keys_enabled = false
middle_mouse_paste_enabled = false
drag_and_drop_selection_enabled = false
script = ExtResource("4_vef74")
error_label = NodePath("../ErrorLabel")
disallowed_bet_label = NodePath("../DisallowedBetLabel")
submit_button = NodePath("../SubmitBetButton")
[node name="SubmitBetButton" type="Button" parent="HBoxContainer/GameUI/BetContainer"]
layout_mode = 2
text = "submit bet"
[node name="ErrorLabel" type="Label" parent="HBoxContainer/GameUI/BetContainer"]
layout_mode = 2
theme_override_colors/font_color = Color(1, 0.21, 0.21, 1)
[node name="Label" type="Label" parent="HBoxContainer/GameUI"]
visible = false
layout_mode = 1
@@ -303,6 +311,7 @@ playing_card_scene = ExtResource("6_eow3j")
[connection signal="new_round_started" from="WebClientTCP" to="EnvironmentManager" method="_on_web_client_tcp_new_round_started"]
[connection signal="notify_play_card_request" from="WebClientTCP" to="HBoxContainer/GameUI" method="_on_web_client_tcp_notify_play_card_request"]
[connection signal="received_bet_request" from="WebClientTCP" to="HBoxContainer/GameUI" method="_on_web_client_tcp_received_bet_request"]
[connection signal="received_bet_request" from="WebClientTCP" to="HBoxContainer/GameUI/BetContainer/BetInput" method="_on_web_client_tcp_received_bet_request"]
[connection signal="received_chat_message" from="WebClientTCP" to="HBoxContainer/ClientInterface" method="_on_web_client_tcp_received_chat_message"]
[connection signal="received_client_id" from="WebClientTCP" to="EnvironmentManager" method="_on_web_client_tcp_received_client_id"]
[connection signal="received_connection_message" from="WebClientTCP" to="HBoxContainer/ClientInterface" method="_on_web_client_tcp_received_connection_message"]