client.tscn 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. [gd_scene load_steps=4 format=3 uid="uid://ph5ghsflqegf"]
  2. [ext_resource type="PackedScene" uid="uid://cyvrywci15kev" path="res://chat.tscn" id="1_cfcun"]
  3. [ext_resource type="Script" path="res://websocket/WebSocketClient.gd" id="2_m4g4y"]
  4. [ext_resource type="Script" path="res://client.gd" id="2_opbid"]
  5. [node name="Client" instance=ExtResource("1_cfcun")]
  6. script = ExtResource("2_opbid")
  7. [node name="WebSocketClient" type="Node" parent="." index="0"]
  8. script = ExtResource("2_m4g4y")
  9. supported_protocols = PackedStringArray("demo-chat")
  10. [node name="Panel" parent="." index="1"]
  11. layout_mode = 1
  12. anchors_preset = 15
  13. [node name="VBoxContainer" parent="Panel" index="0"]
  14. layout_mode = 1
  15. anchors_preset = 15
  16. [node name="Port" parent="Panel/VBoxContainer/Connect" index="2"]
  17. visible = false
  18. [node name="Listen" parent="Panel/VBoxContainer/Connect" index="3"]
  19. visible = false
  20. [connection signal="connected_to_server" from="WebSocketClient" to="." method="_on_web_socket_client_connected_to_server"]
  21. [connection signal="connection_closed" from="WebSocketClient" to="." method="_on_web_socket_client_connection_closed"]
  22. [connection signal="message_received" from="WebSocketClient" to="." method="_on_web_socket_client_message_received"]
  23. [connection signal="toggled" from="Panel/VBoxContainer/Connect/Connect" to="." method="_on_connect_toggled"]
  24. [connection signal="pressed" from="Panel/VBoxContainer/Send/Send" to="." method="_on_send_pressed"]