98 lines
4.6 KiB
Plaintext
98 lines
4.6 KiB
Plaintext
[gd_scene load_steps=4 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"]
|
|
|
|
[sub_resource type="SystemFont" id="SystemFont_80nbo"]
|
|
font_names = PackedStringArray("IBM Plex Mono")
|
|
font_weight = 500
|
|
|
|
[node name="Game" type="Node"]
|
|
|
|
[node name="WebClientTCP" type="Node" parent="."]
|
|
script = ExtResource("1_feb5d")
|
|
|
|
[node name="ClientInterface" type="Control" parent="." node_paths=PackedStringArray("client", "connect_button", "create_lobby_button", "join_lobby_button", "leave_lobby_button", "name_input", "lobby_code_input", "output")]
|
|
layout_mode = 3
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
script = ExtResource("2_e2o6t")
|
|
client = NodePath("../WebClientTCP")
|
|
connect_button = NodePath("HBoxContainer/VBoxContainer/ConnectButton")
|
|
create_lobby_button = NodePath("HBoxContainer/VBoxContainer/CreateLobbyButton")
|
|
join_lobby_button = NodePath("HBoxContainer/VBoxContainer/JoinLobbyButton")
|
|
leave_lobby_button = NodePath("HBoxContainer/VBoxContainer/LeaveLobbyButton")
|
|
name_input = NodePath("HBoxContainer/VBoxContainer/NameInput")
|
|
lobby_code_input = NodePath("HBoxContainer/VBoxContainer/LobbyCodeInput")
|
|
output = NodePath("HBoxContainer/Output")
|
|
|
|
[node name="ColorRect" type="ColorRect" parent="ClientInterface"]
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
color = Color(0.34, 0.33116, 0.2992, 1)
|
|
|
|
[node name="HBoxContainer" type="HBoxContainer" parent="ClientInterface"]
|
|
layout_mode = 0
|
|
offset_right = 800.0
|
|
offset_bottom = 1080.0
|
|
|
|
[node name="VBoxContainer" type="VBoxContainer" parent="ClientInterface/HBoxContainer"]
|
|
custom_minimum_size = Vector2(300, 0)
|
|
layout_mode = 2
|
|
|
|
[node name="ConnectButton" type="Button" parent="ClientInterface/HBoxContainer/VBoxContainer"]
|
|
layout_mode = 2
|
|
text = "Connect to Server"
|
|
|
|
[node name="NameInput" type="LineEdit" parent="ClientInterface/HBoxContainer/VBoxContainer"]
|
|
layout_mode = 2
|
|
placeholder_text = "Your Name"
|
|
editable = false
|
|
|
|
[node name="CreateLobbyButton" type="Button" parent="ClientInterface/HBoxContainer/VBoxContainer"]
|
|
layout_mode = 2
|
|
disabled = true
|
|
text = "Create Lobby"
|
|
|
|
[node name="LobbyCodeInput" type="LineEdit" parent="ClientInterface/HBoxContainer/VBoxContainer"]
|
|
layout_mode = 2
|
|
placeholder_text = "Lobby Code"
|
|
editable = false
|
|
|
|
[node name="JoinLobbyButton" type="Button" parent="ClientInterface/HBoxContainer/VBoxContainer"]
|
|
layout_mode = 2
|
|
disabled = true
|
|
text = "Join Lobby"
|
|
|
|
[node name="LeaveLobbyButton" type="Button" parent="ClientInterface/HBoxContainer/VBoxContainer"]
|
|
layout_mode = 2
|
|
disabled = true
|
|
text = "Disconnect"
|
|
|
|
[node name="Output" type="Label" parent="ClientInterface/HBoxContainer"]
|
|
custom_minimum_size = Vector2(64, 1)
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
size_flags_vertical = 1
|
|
theme_override_fonts/font = SubResource("SystemFont_80nbo")
|
|
autowrap_mode = 2
|
|
|
|
[connection signal="client_joined_lobby" from="WebClientTCP" to="ClientInterface" method="_on_web_client_tcp_client_joined_lobby"]
|
|
[connection signal="connected_to_lobby" from="WebClientTCP" to="ClientInterface" method="_on_web_client_tcp_connected_to_lobby"]
|
|
[connection signal="connected_to_server" from="WebClientTCP" to="ClientInterface" method="_on_web_client_tcp_connected_to_server"]
|
|
[connection signal="connection_error_occurred" from="WebClientTCP" to="ClientInterface" method="_on_web_client_tcp_connection_error_occurred"]
|
|
[connection signal="connection_status_changed" from="WebClientTCP" to="ClientInterface" method="_on_web_client_tcp_connection_status_changed"]
|
|
[connection signal="disconnected_from_lobby" from="WebClientTCP" to="ClientInterface" method="_on_web_client_tcp_disconnected_from_lobby"]
|
|
[connection signal="disconnected_from_server" from="WebClientTCP" to="ClientInterface" method="_on_web_client_tcp_disconnected_from_server"]
|
|
[connection signal="pressed" from="ClientInterface/HBoxContainer/VBoxContainer/ConnectButton" to="ClientInterface" method="_on_connect_button_pressed"]
|
|
[connection signal="pressed" from="ClientInterface/HBoxContainer/VBoxContainer/CreateLobbyButton" to="ClientInterface" method="_on_create_lobby_button_pressed"]
|
|
[connection signal="pressed" from="ClientInterface/HBoxContainer/VBoxContainer/JoinLobbyButton" to="ClientInterface" method="_on_join_lobby_button_pressed"]
|
|
[connection signal="pressed" from="ClientInterface/HBoxContainer/VBoxContainer/LeaveLobbyButton" to="ClientInterface" method="_on_disconnect_lobby_button_pressed"]
|