From c109befcb67d2d60f8889c67ac694503d601c6b7 Mon Sep 17 00:00:00 2001 From: tihgs Date: Fri, 27 Jun 2025 14:49:34 +0800 Subject: [PATCH] (Add Play_UI.tscn)Put UI to separate scene --- Play_UI.tscn | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 Play_UI.tscn diff --git a/Play_UI.tscn b/Play_UI.tscn new file mode 100644 index 0000000..356f7b5 --- /dev/null +++ b/Play_UI.tscn @@ -0,0 +1,83 @@ +[gd_scene load_steps=7 format=2] + +[ext_resource path="res://main_menu.gd" type="Script" id=3] +[ext_resource path="res://Fonts/Arimo-Bold.ttf" type="DynamicFontData" id=4] +[ext_resource path="res://touch.tscn" type="PackedScene" id=5] + +[sub_resource type="DynamicFont" id=3] +size = 23 +font_data = ExtResource( 4 ) + +[sub_resource type="DynamicFont" id=4] +size = 23 +font_data = ExtResource( 4 ) + +[sub_resource type="DynamicFont" id=5] +size = 28 +font_data = ExtResource( 4 ) + +[node name="Node2D" type="Node2D"] +script = ExtResource( 3 ) + +[node name="Button" type="Button" parent="."] +margin_left = 53.0 +margin_top = 18.0 +margin_right = 130.0 +margin_bottom = 59.0 +text = "| |" + +[node name="Button2" type="Button" parent="."] +margin_left = 176.0 +margin_top = 18.0 +margin_right = 253.0 +margin_bottom = 59.0 +text = "Touch Mode" + +[node name="Button3" type="Button" parent="."] +margin_left = 293.0 +margin_top = 18.0 +margin_right = 383.0 +margin_bottom = 59.0 +text = "Not touch" + +[node name="WindowDialog" type="WindowDialog" parent="."] +margin_left = 293.0 +margin_top = 190.0 +margin_right = 750.0 +margin_bottom = 369.0 +window_title = "Pause a sec" + +[node name="Button2" type="Button" parent="WindowDialog"] +margin_left = 51.0 +margin_top = 128.0 +margin_right = 128.0 +margin_bottom = 169.0 +custom_fonts/font = SubResource( 3 ) +text = "Yes" + +[node name="Button3" type="Button" parent="WindowDialog"] +margin_left = 309.0 +margin_top = 128.0 +margin_right = 386.0 +margin_bottom = 169.0 +custom_fonts/font = SubResource( 4 ) +text = "No" + +[node name="RichTextLabel" type="RichTextLabel" parent="WindowDialog"] +margin_left = 51.0 +margin_top = 30.0 +margin_right = 418.0 +margin_bottom = 104.0 +custom_fonts/normal_font = SubResource( 5 ) +text = "Are you sure you wanna leave?" + +[node name="touch_juan" parent="." instance=ExtResource( 5 )] +visible = false + +[connection signal="pressed" from="Button" to="." method="_on_Popup_pressed"] +[connection signal="pressed" from="Button2" to="." method="_on_touch_pressed"] +[connection signal="toggled" from="Button2" to="." method="_on_Button2_toggled"] +[connection signal="pressed" from="Button3" to="." method="_on_touchnot_pressed"] +[connection signal="pressed" from="WindowDialog/Button2" to="." method="_on_Back_pressed"] +[connection signal="pressed" from="WindowDialog/Button3" to="." method="_on_Nope_pressed"] +[connection signal="hide" from="touch_juan" to="." method="_on_touch_juan_hide"]