bet input now only permits numbers

This commit is contained in:
2025-07-18 11:28:03 +02:00
parent f7127b94d5
commit 47ec5b5ac0
3 changed files with 31 additions and 2 deletions
+13 -2
View File
@@ -1,10 +1,11 @@
[gd_scene load_steps=11 format=3 uid="uid://gqrdpjslr4np"]
[gd_scene load_steps=12 format=3 uid="uid://gqrdpjslr4np"]
[ext_resource type="Script" uid="uid://p5gvnyhjqe6o" path="res://components/web_client_tcp.gd" id="1_feb5d"]
[ext_resource type="Script" uid="uid://c0cqkatyo4uj1" path="res://components/client_interface.gd" id="2_e2o6t"]
[ext_resource type="Script" uid="uid://utt8atbh7b2a" path="res://game_client.gd" id="3_feb5d"]
[ext_resource type="Script" uid="uid://bipfa366flrfa" path="res://environment_manager.gd" id="4_7jktm"]
[ext_resource type="PackedScene" uid="uid://jlovgr2iojrg" path="res://elements/player_hand.tscn" id="4_fc0e3"]
[ext_resource type="Script" uid="uid://bokp83oigikj2" path="res://number_input.gd" id="4_vef74"]
[ext_resource type="PackedScene" uid="uid://b55xpcxk7g5ph" path="res://cards/playing_card.tscn" id="6_eow3j"]
[ext_resource type="PackedScene" uid="uid://dj1wye7o27vil" path="res://assets/table.glb" id="7_eow3j"]
[ext_resource type="Script" uid="uid://c5bk4gjeyh7vy" path="res://card_stack.gd" id="8_j5wjh"]
@@ -196,8 +197,17 @@ offset_right = 327.0
offset_bottom = -114.0
grow_vertical = 0
[node name="BetInput" type="LineEdit" parent="HBoxContainer/GameUI/BetContainer"]
[node name="BetInput" type="LineEdit" parent="HBoxContainer/GameUI/BetContainer" node_paths=PackedStringArray("submit_button")]
layout_mode = 2
max_length = 2
context_menu_enabled = false
emoji_menu_enabled = false
virtual_keyboard_type = 2
shortcut_keys_enabled = false
middle_mouse_paste_enabled = false
drag_and_drop_selection_enabled = false
script = ExtResource("4_vef74")
submit_button = NodePath("../SubmitBetButton")
[node name="SubmitBetButton" type="Button" parent="HBoxContainer/GameUI/BetContainer"]
layout_mode = 2
@@ -314,6 +324,7 @@ playing_card_scene = ExtResource("6_eow3j")
[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/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"]
[connection signal="pressed" from="HBoxContainer/GameUI/BetContainer/SubmitBetButton" to="HBoxContainer/GameUI" method="_on_submit_bet_button_pressed"]
[connection signal="card_played" from="EnvironmentManager/PlayerHand0" to="HBoxContainer/GameUI" method="_on_player_hand_0_card_played"]
[connection signal="card_selected" from="EnvironmentManager/PlayerHand0" to="HBoxContainer/GameUI" method="_on_player_hand_card_selected"]