bugfix, desync, and add UI function

This commit is contained in:
2026-01-14 00:20:20 +08:00
parent 6948a4aed1
commit bee9c30f0e
14 changed files with 362 additions and 112 deletions
+89 -1
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=27 format=3 uid="uid://dxn87yj8qnfpp"]
[gd_scene load_steps=29 format=3 uid="uid://dxn87yj8qnfpp"]
[ext_resource type="MeshLibrary" uid="uid://kcv6ans86ug7" path="res://addons/enhanced_gridmap/meshlibrary/default.tres" id="1_110wo"]
[ext_resource type="Script" uid="uid://co1ads72by6na" path="res://scenes/main.gd" id="1_xcpe3"]
@@ -22,6 +22,8 @@
[ext_resource type="StyleBox" uid="uid://d3ruc8gytoovx" path="res://assets/styles/ribbon_selected_gui.tres" id="18_u5x6e"]
[ext_resource type="StyleBox" uid="uid://cdhnwvcklbyl8" path="res://assets/styles/ribbon_hovered_gui.tres" id="19_w1rqq"]
[ext_resource type="StyleBox" uid="uid://3yog1weaqhxb" path="res://assets/styles/ribbon_unselected_gui.tres" id="20_q6bc1"]
[ext_resource type="Script" uid="uid://b54tfa0n6kogi" path="res://scripts/managers/touch_controls.gd" id="touch_manager"]
[ext_resource type="Script" uid="uid://djiml4sh61dc1" path="res://scripts/ui/virtual_joystick.gd" id="virtual_joystick"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_playerboard"]
content_margin_left = 8.0
@@ -9699,6 +9701,92 @@ custom_minimum_size = Vector2(0, 40)
layout_mode = 2
text = "Back"
[node name="TouchControls" type="CanvasLayer" parent="."]
layer = 10
script = ExtResource("touch_manager")
[node name="TouchControls" type="Control" parent="TouchControls"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = 318.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 1
[node name="VirtualJoystick" type="Control" parent="TouchControls/TouchControls"]
layout_mode = 1
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_left = 120.0
offset_top = -280.0
offset_right = 280.0
offset_bottom = -120.0
grow_vertical = 0
script = ExtResource("virtual_joystick")
[node name="GrabBtn" type="Button" parent="TouchControls/TouchControls"]
layout_mode = 1
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -232.0
offset_top = -286.0
offset_right = -162.0
offset_bottom = -216.0
grow_horizontal = 0
grow_vertical = 0
text = "👋"
[node name="PutBtn" type="Button" parent="TouchControls/TouchControls"]
layout_mode = 1
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -152.0
offset_top = -206.0
offset_right = -82.0
offset_bottom = -136.0
grow_horizontal = 0
grow_vertical = 0
text = "📦"
[node name="SpecialBtn" type="Button" parent="TouchControls/TouchControls"]
layout_mode = 1
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -232.0
offset_top = -126.0
offset_right = -162.0
offset_bottom = -56.0
grow_horizontal = 0
grow_vertical = 0
text = "⚡"
[node name="SettingsBtn" type="Button" parent="TouchControls/TouchControls"]
layout_mode = 1
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -69.0
offset_top = -69.0
offset_right = -19.0
offset_bottom = -19.0
grow_horizontal = 0
grow_vertical = 0
text = "⚙"
[connection signal="pressed" from="Menu/Host" to="." method="_on_host_pressed"]
[connection signal="pressed" from="Menu/Join" to="." method="_on_join_pressed"]
[connection signal="text_submitted" from="MessageInput" to="." method="_on_message_input_text_submitted"]