From 5414c804857d3b48f947f3628f85d9010e55eec2 Mon Sep 17 00:00:00 2001 From: Nordup Date: Sat, 17 Jun 2023 08:47:17 +0400 Subject: [PATCH] world scene in menu --- project/scenes/app.tscn | 20 +- project/scenes/components/search.tscn | 1 + project/scenes/debug.tscn | 8 - project/scenes/menu.tscn | 120 +++++-- project/scenes/menu_body/bookmarks.tscn | 30 ++ project/scenes/{ => menu_body}/world.tscn | 306 +++--------------- project/scripts/app.gd | 11 +- project/scripts/sandbox/render_result.gd | 9 +- project/textures/exit.png | Bin 718 -> 0 bytes project/textures/exit.png.import | 34 -- project/textures/exit.svg.import | 4 +- project/textures/home.svg | 23 ++ .../{slide-up.png.import => home.svg.import} | 11 +- project/textures/search.svg.import | 4 +- project/textures/slide-up.png | Bin 1535 -> 0 bytes 15 files changed, 225 insertions(+), 356 deletions(-) create mode 100644 project/scenes/menu_body/bookmarks.tscn rename project/scenes/{ => menu_body}/world.tscn (59%) delete mode 100644 project/textures/exit.png delete mode 100644 project/textures/exit.png.import create mode 100644 project/textures/home.svg rename project/textures/{slide-up.png.import => home.svg.import} (62%) delete mode 100644 project/textures/slide-up.png diff --git a/project/scenes/app.tscn b/project/scenes/app.tscn index 6ba8c79..83de4cc 100644 --- a/project/scenes/app.tscn +++ b/project/scenes/app.tscn @@ -1,9 +1,10 @@ -[gd_scene load_steps=13 format=3 uid="uid://ct8gsph3wnepl"] +[gd_scene load_steps=14 format=3 uid="uid://ct8gsph3wnepl"] [ext_resource type="Script" path="res://scripts/app.gd" id="1_skc7d"] [ext_resource type="Resource" uid="uid://b1xvdym0qh6td" path="res://resources/gate_events.res" id="2_cdryv"] +[ext_resource type="PackedScene" uid="uid://pgl3w7q5w84m" path="res://scenes/menu_body/bookmarks.tscn" id="3_l8glb"] [ext_resource type="PackedScene" uid="uid://5btb7nvgmfhl" path="res://scenes/menu.tscn" id="3_o1f7b"] -[ext_resource type="PackedScene" uid="uid://kywrsqro3d5i" path="res://scenes/world.tscn" id="4_cmlvo"] +[ext_resource type="PackedScene" uid="uid://kywrsqro3d5i" path="res://scenes/menu_body/world.tscn" id="4_p75rl"] [ext_resource type="Script" path="res://scripts/bookmark_saver.gd" id="5_ev0ch"] [ext_resource type="Script" path="res://scripts/analytics/analytics.gd" id="6_25d48"] [ext_resource type="Resource" uid="uid://bewhdj6jugt6q" path="res://resources/bookmarks.tres" id="6_rupvx"] @@ -13,14 +14,18 @@ [ext_resource type="Script" path="res://scripts/analytics/analytics_sender_error.gd" id="8_ah58q"] [ext_resource type="Script" path="res://scripts/analytics/analytics_sender_gate.gd" id="9_egxpy"] -[node name="App" type="Node"] +[node name="App" type="Node" node_paths=PackedStringArray("scenes_root")] script = ExtResource("1_skc7d") gate_events = ExtResource("2_cdryv") -menu_scene = ExtResource("3_o1f7b") -world_scene = ExtResource("4_cmlvo") +bookmarks = ExtResource("3_l8glb") +world_scene = ExtResource("4_p75rl") +scenes_root = NodePath("Menu/VBoxContainer/Body") [node name="Debug" parent="." instance=ExtResource("7_3xeb8")] +[node name="Window" parent="Debug" index="0"] +visible = false + [node name="BookmarkSaver" type="Node" parent="."] script = ExtResource("5_ev0ch") save_dir = "user://resources" @@ -41,4 +46,7 @@ script = ExtResource("8_ah58q") script = ExtResource("9_egxpy") gate_events = ExtResource("2_cdryv") -[node name="Scenes" type="Node" parent="."] +[node name="Menu" parent="." instance=ExtResource("3_o1f7b")] + +[editable path="Debug"] +[editable path="Menu"] diff --git a/project/scenes/components/search.tscn b/project/scenes/components/search.tscn index aba6015..5bbc131 100644 --- a/project/scenes/components/search.tscn +++ b/project/scenes/components/search.tscn @@ -57,6 +57,7 @@ offset_right = 30.0 offset_bottom = 10.0 grow_vertical = 2 texture = ExtResource("3_1rllf") +expand_mode = 1 [node name="Go" type="BaseButton" parent="."] _import_path = NodePath("") diff --git a/project/scenes/debug.tscn b/project/scenes/debug.tscn index bcf99fe..b8a1af4 100644 --- a/project/scenes/debug.tscn +++ b/project/scenes/debug.tscn @@ -37,14 +37,6 @@ threaded = true selection_enabled = true script = ExtResource("2_lgt6s") -[node name="WindowCopy" type="Control" parent="."] -layout_mode = 3 -anchors_preset = 0 -offset_left = 52.0 -offset_top = 75.0 -offset_right = 852.0 -offset_bottom = 675.0 - [connection signal="close_requested" from="Window" to="." method="_on_window_close_requested"] [connection signal="focus_exited" from="Window" to="." method="_on_window_focus_exited"] [connection signal="window_input" from="Window" to="." method="_on_window_window_input"] diff --git a/project/scenes/menu.tscn b/project/scenes/menu.tscn index 7bc6da0..d37155c 100644 --- a/project/scenes/menu.tscn +++ b/project/scenes/menu.tscn @@ -1,11 +1,11 @@ [gd_scene load_steps=9 format=3 uid="uid://5btb7nvgmfhl"] +[ext_resource type="Script" path="res://scripts/ui/world/home.gd" id="2_l5iu6"] [ext_resource type="Texture2D" uid="uid://dystd8vvbqwo2" path="res://textures/exit.svg" id="3_1a6fk"] +[ext_resource type="Resource" uid="uid://b1xvdym0qh6td" path="res://resources/gate_events.res" id="3_m632k"] +[ext_resource type="Texture2D" uid="uid://bmju020v33vrv" path="res://textures/home.svg" id="4_5npup"] [ext_resource type="Script" path="res://scripts/ui/menu/exit_app.gd" id="4_2065t"] [ext_resource type="PackedScene" uid="uid://ctam0fxigbefk" path="res://scenes/components/search.tscn" id="5_li2do"] -[ext_resource type="Resource" uid="uid://bewhdj6jugt6q" path="res://resources/bookmarks.tres" id="7_ern1s"] -[ext_resource type="Script" path="res://scripts/ui/menu/bookmark_container.gd" id="7_wj13t"] -[ext_resource type="PackedScene" uid="uid://82ca8so31njy" path="res://scenes/components/bookmark.tscn" id="8_h7tks"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pveoh"] bg_color = Color(0.156863, 0.156863, 0.156863, 1) @@ -51,10 +51,91 @@ grow_horizontal = 2 grow_vertical = 2 theme_override_styles/panel = SubResource("StyleBoxFlat_re7ca") -[node name="Search" parent="VBoxContainer/Top" instance=ExtResource("5_li2do")] +[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/Top"] layout_mode = 1 -offset_top = -20.0 -offset_bottom = 20.0 +anchors_preset = 13 +anchor_left = 0.5 +anchor_right = 0.5 +anchor_bottom = 1.0 +offset_left = -502.0 +offset_right = 502.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 20 +alignment = 1 + +[node name="Search" parent="VBoxContainer/Top/HBoxContainer" instance=ExtResource("5_li2do")] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 + +[node name="Home" type="BaseButton" parent="VBoxContainer/Top/HBoxContainer"] +_import_path = NodePath("") +unique_name_in_owner = false +process_mode = 0 +process_priority = 0 +editor_description = "" +visible = true +modulate = Color(1, 1, 1, 1) +self_modulate = Color(1, 1, 1, 1) +show_behind_parent = false +top_level = false +clip_children = 0 +light_mask = 1 +visibility_layer = 1 +z_index = 0 +z_as_relative = true +y_sort_enabled = false +texture_filter = 0 +texture_repeat = 0 +material = null +use_parent_material = false +clip_contents = false +custom_minimum_size = Vector2(25, 25) +layout_direction = 0 +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +size_flags_stretch_ratio = 1.0 +auto_translate = true +localize_numeral_system = true +tooltip_text = "" +focus_neighbor_left = NodePath("") +focus_neighbor_top = NodePath("") +focus_neighbor_right = NodePath("") +focus_neighbor_bottom = NodePath("") +focus_next = NodePath("") +focus_previous = NodePath("") +focus_mode = 2 +mouse_filter = 0 +mouse_force_pass_scroll_events = true +mouse_default_cursor_shape = 2 +theme = null +theme_type_variation = &"" +disabled = false +toggle_mode = false +button_pressed = false +action_mode = 1 +button_mask = 1 +keep_pressed_outside = false +button_group = null +shortcut = null +shortcut_feedback = true +shortcut_in_tooltip = true +script = ExtResource("2_l5iu6") +gate_events = ExtResource("3_m632k") + +[node name="TextureRect" type="TextureRect" parent="VBoxContainer/Top/HBoxContainer/Home"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +texture = ExtResource("4_5npup") +expand_mode = 1 [node name="Exit" type="BaseButton" parent="VBoxContainer/Top"] _import_path = NodePath("") @@ -141,30 +222,5 @@ expand_mode = 1 layout_mode = 2 size_flags_vertical = 3 -[node name="Bookmarks" type="ScrollContainer" parent="VBoxContainer/Body"] -custom_minimum_size = Vector2(1200, 400) -layout_mode = 1 -anchors_preset = 8 -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -offset_top = -100.0 -offset_bottom = 100.0 -grow_horizontal = 2 -grow_vertical = 2 -follow_focus = true -horizontal_scroll_mode = 0 - -[node name="GridContainer" type="GridContainer" parent="VBoxContainer/Body/Bookmarks"] -layout_mode = 2 -size_flags_horizontal = 3 -size_flags_vertical = 3 -theme_override_constants/h_separation = 70 -theme_override_constants/v_separation = 40 -columns = 6 -script = ExtResource("7_wj13t") -bookmarks = ExtResource("7_ern1s") -bookmark_scene = ExtResource("8_h7tks") - +[connection signal="pressed" from="VBoxContainer/Top/HBoxContainer/Home" to="VBoxContainer/Top/HBoxContainer/Home" method="_on_pressed"] [connection signal="pressed" from="VBoxContainer/Top/Exit" to="VBoxContainer/Top/Exit" method="_on_pressed"] diff --git a/project/scenes/menu_body/bookmarks.tscn b/project/scenes/menu_body/bookmarks.tscn new file mode 100644 index 0000000..32209d6 --- /dev/null +++ b/project/scenes/menu_body/bookmarks.tscn @@ -0,0 +1,30 @@ +[gd_scene load_steps=4 format=3 uid="uid://pgl3w7q5w84m"] + +[ext_resource type="Script" path="res://scripts/ui/menu/bookmark_container.gd" id="1_vspm3"] +[ext_resource type="Resource" uid="uid://bewhdj6jugt6q" path="res://resources/bookmarks.tres" id="2_g2k3b"] +[ext_resource type="PackedScene" uid="uid://82ca8so31njy" path="res://scenes/components/bookmark.tscn" id="3_dyxu5"] + +[node name="Bookmarks" type="ScrollContainer"] +custom_minimum_size = Vector2(1200, 400) +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_top = -100.0 +offset_bottom = 100.0 +grow_horizontal = 2 +grow_vertical = 2 +follow_focus = true +horizontal_scroll_mode = 0 + +[node name="GridContainer" type="GridContainer" parent="."] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +theme_override_constants/h_separation = 70 +theme_override_constants/v_separation = 40 +columns = 6 +script = ExtResource("1_vspm3") +bookmarks = ExtResource("2_g2k3b") +bookmark_scene = ExtResource("3_dyxu5") diff --git a/project/scenes/world.tscn b/project/scenes/menu_body/world.tscn similarity index 59% rename from project/scenes/world.tscn rename to project/scenes/menu_body/world.tscn index 33f6c02..f822deb 100644 --- a/project/scenes/world.tscn +++ b/project/scenes/menu_body/world.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=37 format=3 uid="uid://kywrsqro3d5i"] +[gd_scene load_steps=31 format=3 uid="uid://kywrsqro3d5i"] [ext_resource type="Script" path="res://scripts/loading/gate_loader.gd" id="1_uxhy6"] [ext_resource type="Resource" uid="uid://b1xvdym0qh6td" path="res://resources/gate_events.res" id="2_q7cvi"] @@ -19,10 +19,6 @@ [ext_resource type="PackedScene" path="res://scenes/components/hint.tscn" id="17_rve7m"] [ext_resource type="Texture2D" uid="uid://bvvgx8ij2mdna" path="res://textures/star.png" id="18_o2mtq"] [ext_resource type="Texture2D" uid="uid://c5hu6cmvuipg7" path="res://textures/star_filled.png" id="19_y2rfc"] -[ext_resource type="Script" path="res://scripts/ui/world/home.gd" id="20_utvcl"] -[ext_resource type="Texture2D" uid="uid://c26q840lwxw8j" path="res://textures/exit.png" id="21_ocb0r"] -[ext_resource type="PackedScene" uid="uid://ctam0fxigbefk" path="res://scenes/components/search.tscn" id="22_pwygi"] -[ext_resource type="Texture2D" uid="uid://bpj05amcrq1cq" path="res://textures/slide-up.png" id="23_d4xvm"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_shmbc"] bg_color = Color(0.3384, 0.188, 0.47, 1) @@ -65,15 +61,15 @@ draw_center = false [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_a03l7"] draw_center = false -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_sqkiq"] -bg_color = Color(0.160784, 0.160784, 0.160784, 0.670588) -border_width_top = 3 -border_color = Color(0.231373, 0.184314, 0.541176, 1) - -[sub_resource type="LabelSettings" id="LabelSettings_5jdc5"] -font_size = 27 - -[node name="World" type="Node"] +[node name="World" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 [node name="GateLoader" type="Node" parent="."] script = ExtResource("1_uxhy6") @@ -86,13 +82,12 @@ render_result = NodePath("../WorldCanvas/RenderResult") snbx_executable = ExtResource("4_shus3") [node name="WorldCanvas" type="Control" parent="."] -layout_mode = 3 +layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -metadata/_edit_lock_ = true [node name="RenderResult" type="TextureRect" parent="WorldCanvas"] layout_mode = 1 @@ -101,6 +96,8 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +expand_mode = 5 +stretch_mode = 5 script = ExtResource("5_nlg2s") gate_events = ExtResource("2_q7cvi") command_events = ExtResource("6_18mgg") @@ -116,12 +113,9 @@ script = ExtResource("10_cqo55") gate_events = ExtResource("2_q7cvi") command_events = ExtResource("6_18mgg") -[node name="UICanvas" type="CanvasLayer" parent="."] -follow_viewport_enabled = true - -[node name="LoadingBackground" type="Control" parent="UICanvas"] +[node name="LoadingBackground" type="Control" parent="."] visible = false -layout_mode = 3 +layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 @@ -130,7 +124,7 @@ grow_vertical = 2 script = ExtResource("11_7xeus") gate_events = ExtResource("2_q7cvi") -[node name="Panel" type="Panel" parent="UICanvas/LoadingBackground"] +[node name="Panel" type="Panel" parent="LoadingBackground"] layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 @@ -139,7 +133,7 @@ grow_horizontal = 2 grow_vertical = 2 theme_override_styles/panel = SubResource("StyleBoxFlat_shmbc") -[node name="Label" type="Label" parent="UICanvas/LoadingBackground"] +[node name="Label" type="Label" parent="LoadingBackground"] layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 @@ -157,7 +151,7 @@ label_settings = SubResource("LabelSettings_eyt6j") horizontal_alignment = 1 vertical_alignment = 1 -[node name="Label2" type="Label" parent="UICanvas/LoadingBackground"] +[node name="Label2" type="Label" parent="LoadingBackground"] layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 @@ -175,7 +169,7 @@ label_settings = SubResource("LabelSettings_2k6gm") horizontal_alignment = 1 vertical_alignment = 1 -[node name="Label3" type="Label" parent="UICanvas/LoadingBackground"] +[node name="Label3" type="Label" parent="LoadingBackground"] layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 @@ -193,8 +187,8 @@ label_settings = SubResource("LabelSettings_fcbo7") horizontal_alignment = 1 vertical_alignment = 1 -[node name="UI" type="Control" parent="UICanvas"] -layout_mode = 3 +[node name="UI" type="Control" parent="."] +layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 @@ -204,7 +198,7 @@ script = ExtResource("12_jdwjt") ui_events = ExtResource("9_ir58h") command_events = ExtResource("6_18mgg") -[node name="Blur" type="Panel" parent="UICanvas/UI"] +[node name="Blur" type="Panel" parent="UI"] material = SubResource("ShaderMaterial_kc7rv") layout_mode = 1 anchors_preset = 15 @@ -213,7 +207,7 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -[node name="HideOnPress" type="TextureButton" parent="UICanvas/UI/Blur"] +[node name="HideOnPress" type="TextureButton" parent="UI/Blur"] layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 @@ -221,7 +215,7 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -[node name="GateInfo" type="Control" parent="UICanvas/UI" node_paths=PackedStringArray("image", "title", "description", "url", "star", "unstar")] +[node name="GateInfo" type="Control" parent="UI" node_paths=PackedStringArray("image", "title", "description", "url", "star", "unstar")] layout_mode = 1 anchors_preset = 3 anchor_left = 1.0 @@ -244,7 +238,7 @@ star = NodePath("Bookmark/Star") unstar = NodePath("Bookmark/Unstar") metadata/_edit_lock_ = true -[node name="Panel" type="Panel" parent="UICanvas/UI/GateInfo"] +[node name="Panel" type="Panel" parent="UI/GateInfo"] layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 @@ -253,7 +247,7 @@ grow_horizontal = 2 grow_vertical = 2 theme_override_styles/panel = SubResource("StyleBoxFlat_4bcpj") -[node name="ImageMask" type="Panel" parent="UICanvas/UI/GateInfo"] +[node name="ImageMask" type="Panel" parent="UI/GateInfo"] clip_children = 1 layout_mode = 1 anchors_preset = 8 @@ -270,7 +264,7 @@ grow_vertical = 2 mouse_filter = 1 theme_override_styles/panel = SubResource("StyleBoxFlat_bm5nj") -[node name="TextureRect" type="TextureRect" parent="UICanvas/UI/GateInfo/ImageMask"] +[node name="TextureRect" type="TextureRect" parent="UI/GateInfo/ImageMask"] layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 @@ -281,7 +275,7 @@ texture = ExtResource("7_52jgh") expand_mode = 1 stretch_mode = 6 -[node name="Title" type="Label" parent="UICanvas/UI/GateInfo"] +[node name="Title" type="Label" parent="UI/GateInfo"] layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 @@ -299,7 +293,7 @@ label_settings = SubResource("LabelSettings_i1x1e") horizontal_alignment = 1 text_overrun_behavior = 3 -[node name="Description" type="Label" parent="UICanvas/UI/GateInfo"] +[node name="Description" type="Label" parent="UI/GateInfo"] layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 @@ -319,7 +313,7 @@ autowrap_mode = 3 clip_text = true text_overrun_behavior = 3 -[node name="Url" type="LineEdit" parent="UICanvas/UI/GateInfo"] +[node name="Url" type="LineEdit" parent="UI/GateInfo"] layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 @@ -339,9 +333,11 @@ theme_override_styles/read_only = SubResource("StyleBoxFlat_a03l7") text = "url" alignment = 1 editable = false +caret_blink = true +caret_blink_interval = 0.5 script = ExtResource("16_8emm0") -[node name="Bookmark" type="Control" parent="UICanvas/UI/GateInfo"] +[node name="Bookmark" type="Control" parent="UI/GateInfo"] layout_mode = 1 anchors_preset = 1 anchor_left = 1.0 @@ -352,7 +348,7 @@ offset_right = -60.0 offset_bottom = 78.13 grow_horizontal = 0 -[node name="Star" type="BaseButton" parent="UICanvas/UI/GateInfo/Bookmark"] +[node name="Star" type="BaseButton" parent="UI/GateInfo/Bookmark"] _import_path = NodePath("") unique_name_in_owner = false process_mode = 0 @@ -421,26 +417,26 @@ shortcut_feedback = true shortcut_in_tooltip = true script = null -[node name="Hint" parent="UICanvas/UI/GateInfo/Bookmark/Star" node_paths=PackedStringArray("button") instance=ExtResource("17_rve7m")] +[node name="Hint" parent="UI/GateInfo/Bookmark/Star" node_paths=PackedStringArray("button") instance=ExtResource("17_rve7m")] layout_mode = 1 key = "hint_star" button = NodePath("..") -[node name="AnimRoot" parent="UICanvas/UI/GateInfo/Bookmark/Star/Hint" index="0"] +[node name="AnimRoot" parent="UI/GateInfo/Bookmark/Star/Hint" index="0"] layout_mode = 1 -[node name="Background" parent="UICanvas/UI/GateInfo/Bookmark/Star/Hint/AnimRoot" index="0"] +[node name="Background" parent="UI/GateInfo/Bookmark/Star/Hint/AnimRoot" index="0"] layout_mode = 1 -[node name="Label" parent="UICanvas/UI/GateInfo/Bookmark/Star/Hint/AnimRoot" index="1"] +[node name="Label" parent="UI/GateInfo/Bookmark/Star/Hint/AnimRoot" index="1"] layout_mode = 1 text = "Bookmark gate!" -[node name="TextureRect" parent="UICanvas/UI/GateInfo/Bookmark/Star/Hint/AnimRoot" index="2"] +[node name="TextureRect" parent="UI/GateInfo/Bookmark/Star/Hint/AnimRoot" index="2"] layout_mode = 1 expand_mode = 1 -[node name="TextureRect" type="TextureRect" parent="UICanvas/UI/GateInfo/Bookmark/Star"] +[node name="TextureRect" type="TextureRect" parent="UI/GateInfo/Bookmark/Star"] layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 @@ -450,7 +446,7 @@ grow_vertical = 2 texture = ExtResource("18_o2mtq") expand_mode = 1 -[node name="Unstar" type="BaseButton" parent="UICanvas/UI/GateInfo/Bookmark"] +[node name="Unstar" type="BaseButton" parent="UI/GateInfo/Bookmark"] _import_path = NodePath("") unique_name_in_owner = false process_mode = 0 @@ -519,7 +515,7 @@ shortcut_feedback = true shortcut_in_tooltip = true script = null -[node name="TextureRect" type="TextureRect" parent="UICanvas/UI/GateInfo/Bookmark/Unstar"] +[node name="TextureRect" type="TextureRect" parent="UI/GateInfo/Bookmark/Unstar"] layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 @@ -529,218 +525,8 @@ grow_vertical = 2 texture = ExtResource("19_y2rfc") expand_mode = 1 -[node name="Bottom" type="Control" parent="UICanvas/UI"] -layout_mode = 1 -anchors_preset = 12 -anchor_top = 1.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -offset_top = -130.0 -grow_horizontal = 2 -grow_vertical = 0 -pivot_offset = Vector2(960, 250) -metadata/_edit_lock_ = true +[connection signal="pressed" from="UI/Blur/HideOnPress" to="UI" method="hide_ui"] +[connection signal="pressed" from="UI/GateInfo/Bookmark/Star" to="UI/GateInfo" method="_on_star_pressed"] +[connection signal="pressed" from="UI/GateInfo/Bookmark/Unstar" to="UI/GateInfo" method="_on_unstar_pressed"] -[node name="Panel" type="Panel" parent="UICanvas/UI/Bottom"] -layout_mode = 1 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -theme_override_styles/panel = SubResource("StyleBoxFlat_sqkiq") - -[node name="Home" type="BaseButton" parent="UICanvas/UI/Bottom"] -_import_path = NodePath("") -unique_name_in_owner = false -process_mode = 0 -process_priority = 0 -editor_description = "" -visible = true -modulate = Color(1, 1, 1, 1) -self_modulate = Color(1, 1, 1, 1) -show_behind_parent = false -top_level = false -clip_children = 0 -light_mask = 1 -visibility_layer = 1 -z_index = 0 -z_as_relative = true -y_sort_enabled = false -texture_filter = 0 -texture_repeat = 0 -material = null -use_parent_material = false -clip_contents = false -custom_minimum_size = Vector2(0, 0) -layout_direction = 0 -layout_mode = 1 -anchors_preset = 4 -anchor_left = 0.0 -anchor_top = 0.5 -anchor_right = 0.0 -anchor_bottom = 0.5 -offset_left = 40.0 -offset_top = -20.0 -offset_right = 170.0 -offset_bottom = 20.0 -grow_horizontal = 1 -grow_vertical = 2 -rotation = 0.0 -scale = Vector2(1, 1) -pivot_offset = Vector2(0, 0) -size_flags_horizontal = 1 -size_flags_vertical = 1 -size_flags_stretch_ratio = 1.0 -auto_translate = true -localize_numeral_system = true -tooltip_text = "" -focus_neighbor_left = NodePath("") -focus_neighbor_top = NodePath("") -focus_neighbor_right = NodePath("") -focus_neighbor_bottom = NodePath("") -focus_next = NodePath("") -focus_previous = NodePath("") -focus_mode = 2 -mouse_filter = 0 -mouse_force_pass_scroll_events = true -mouse_default_cursor_shape = 2 -theme = null -theme_type_variation = &"" -disabled = false -toggle_mode = false -button_pressed = false -action_mode = 1 -button_mask = 1 -keep_pressed_outside = false -button_group = null -shortcut = null -shortcut_feedback = true -shortcut_in_tooltip = true -script = ExtResource("20_utvcl") -gate_events = ExtResource("2_q7cvi") - -[node name="HBoxContainer" type="HBoxContainer" parent="UICanvas/UI/Bottom/Home"] -layout_mode = 1 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -theme_override_constants/separation = 10 - -[node name="TextureRect" type="TextureRect" parent="UICanvas/UI/Bottom/Home/HBoxContainer"] -custom_minimum_size = Vector2(40, 40) -layout_mode = 2 -size_flags_horizontal = 4 -size_flags_vertical = 4 -texture = ExtResource("21_ocb0r") -expand_mode = 1 - -[node name="Label" type="Label" parent="UICanvas/UI/Bottom/Home/HBoxContainer"] -layout_mode = 2 -size_flags_horizontal = 0 -text = "Home" -label_settings = SubResource("LabelSettings_5jdc5") - -[node name="Search" parent="UICanvas/UI/Bottom" instance=ExtResource("22_pwygi")] -layout_mode = 1 - -[node name="Continue" type="BaseButton" parent="UICanvas/UI/Bottom"] -_import_path = NodePath("") -unique_name_in_owner = false -process_mode = 0 -process_priority = 0 -editor_description = "" -visible = false -modulate = Color(1, 1, 1, 1) -self_modulate = Color(1, 1, 1, 1) -show_behind_parent = false -top_level = false -clip_children = 0 -light_mask = 1 -visibility_layer = 1 -z_index = 0 -z_as_relative = true -y_sort_enabled = false -texture_filter = 0 -texture_repeat = 0 -material = null -use_parent_material = false -clip_contents = false -custom_minimum_size = Vector2(0, 0) -layout_direction = 0 -layout_mode = 1 -anchors_preset = 6 -anchor_left = 1.0 -anchor_top = 0.5 -anchor_right = 1.0 -anchor_bottom = 0.5 -offset_left = -235.0 -offset_top = -30.0 -offset_right = -40.0 -offset_bottom = 30.0 -grow_horizontal = 0 -grow_vertical = 2 -rotation = 0.0 -scale = Vector2(1, 1) -pivot_offset = Vector2(30, 30) -size_flags_horizontal = 1 -size_flags_vertical = 1 -size_flags_stretch_ratio = 1.0 -auto_translate = true -localize_numeral_system = true -tooltip_text = "" -focus_neighbor_left = NodePath("") -focus_neighbor_top = NodePath("") -focus_neighbor_right = NodePath("") -focus_neighbor_bottom = NodePath("") -focus_next = NodePath("") -focus_previous = NodePath("") -focus_mode = 2 -mouse_filter = 0 -mouse_force_pass_scroll_events = true -mouse_default_cursor_shape = 2 -theme = null -theme_type_variation = &"" -disabled = false -toggle_mode = false -button_pressed = false -action_mode = 1 -button_mask = 1 -keep_pressed_outside = false -button_group = null -shortcut = null -shortcut_feedback = true -shortcut_in_tooltip = true -script = null - -[node name="HBoxContainer" type="HBoxContainer" parent="UICanvas/UI/Bottom/Continue"] -layout_mode = 1 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -theme_override_constants/separation = 10 -alignment = 2 - -[node name="Label" type="Label" parent="UICanvas/UI/Bottom/Continue/HBoxContainer"] -layout_mode = 2 -size_flags_horizontal = 0 -text = "Continue" -label_settings = SubResource("LabelSettings_5jdc5") - -[node name="TextureRect" type="TextureRect" parent="UICanvas/UI/Bottom/Continue/HBoxContainer"] -custom_minimum_size = Vector2(60, 60) -layout_mode = 2 -texture = ExtResource("23_d4xvm") -expand_mode = 1 - -[connection signal="pressed" from="UICanvas/UI/Blur/HideOnPress" to="UICanvas/UI" method="hide_ui"] -[connection signal="pressed" from="UICanvas/UI/GateInfo/Bookmark/Star" to="UICanvas/UI/GateInfo" method="_on_star_pressed"] -[connection signal="pressed" from="UICanvas/UI/GateInfo/Bookmark/Unstar" to="UICanvas/UI/GateInfo" method="_on_unstar_pressed"] -[connection signal="pressed" from="UICanvas/UI/Bottom/Home" to="UICanvas/UI/Bottom/Home" method="_on_pressed"] -[connection signal="pressed" from="UICanvas/UI/Bottom/Continue" to="UICanvas/UI" method="hide_ui"] - -[editable path="UICanvas/UI/GateInfo/Bookmark/Star/Hint"] +[editable path="UI/GateInfo/Bookmark/Star/Hint"] diff --git a/project/scripts/app.gd b/project/scripts/app.gd index 7dbd9c5..db31a79 100644 --- a/project/scripts/app.gd +++ b/project/scripts/app.gd @@ -1,19 +1,20 @@ extends Node @export var gate_events: GateEvents -@export var menu_scene: PackedScene +@export var bookmarks: PackedScene @export var world_scene: PackedScene +@export var scenes_root: Node func _ready() -> void: gate_events.open_gate.connect(func(_url): switch_scene(world_scene)) - gate_events.exit_gate.connect(func(): switch_scene(menu_scene)) + gate_events.exit_gate.connect(func(): switch_scene(bookmarks)) - $Scenes.add_child(menu_scene.instantiate()) + scenes_root.add_child(bookmarks.instantiate()) func switch_scene(scene: PackedScene) -> void: - for child in $Scenes.get_children(): child.queue_free() + for child in scenes_root.get_children(): child.queue_free() await get_tree().process_frame - $Scenes.add_child(scene.instantiate()) + scenes_root.add_child(scene.instantiate()) diff --git a/project/scripts/sandbox/render_result.gd b/project/scripts/sandbox/render_result.gd index bb68ea9..e9f9c15 100644 --- a/project/scripts/sandbox/render_result.gd +++ b/project/scripts/sandbox/render_result.gd @@ -5,13 +5,13 @@ class_name RenderResult @export var command_events: CommandEvents @export var splash_screen: Texture2D -@onready var width = get_viewport().size.x -@onready var height = get_viewport().size.y - var rd: RenderingDevice var ext_texure: ExternalTexture var texture_rid: RID +var width +var height + func _ready() -> void: gate_events.gate_entered.connect(create_external_texture) @@ -21,6 +21,8 @@ func _ready() -> void: func initialize() -> void: rd = RenderingServer.get_rendering_device() + width = size.x + height = size.y var image = Image.create(width, height, false, Image.FORMAT_RGB8) self.texture = ImageTexture.create_from_image(image) @@ -39,6 +41,7 @@ func create_external_texture() -> void: var t_view: RDTextureView = RDTextureView.new() var image = splash_screen.get_image() + image.resize(width, height) image.convert(Image.FORMAT_RGBA8) image.clear_mipmaps() diff --git a/project/textures/exit.png b/project/textures/exit.png deleted file mode 100644 index 3b0b8d2a8d67943c003eb15713df6057f14171a5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 718 zcmV;<0x|uGP)qLheD#2>Jc5Zz|wQOwxbY{ty@edjWl^Q-5)=Q+>Jd(N5n zyih0<3S*3N3jnbFHT9g5w!+{T;M8+U62L_2i3g2hKyCrK8G8d-xdn8%5Gn2?a5+-! z!N>L?cj516#y$m#0WpHw-X0@v41yY9TehzNH$ujZNiYL!ZvdVF*FwgPO^{>I_Df|53CI*DJ`{9!1g9!7T6b7PI@Z;0&E`uJ~9G} zhl&Q+J`cPCHpY>Yp1xAR_B!Aea3Zdp^z<~q_BPr_+>ZEi((~UGusscYU_=)WT@0|j z%Jx;@DX>1Rq_nI^fzFlo0dTlM+%>khG#Fo%c}c(O3|wY_?Onhln&0a70x4_#XMnqP z1}>$5?bEYI1T)aFDE^H)dM8G0QLZLapk0^?}CV=Ibc8VCZ3%1RH_I``VJfcZpV?6 zp2{^rNehzB0hfT^;U%S|c3E7~3?r~PHhLJ5^c + + + diff --git a/project/textures/slide-up.png.import b/project/textures/home.svg.import similarity index 62% rename from project/textures/slide-up.png.import rename to project/textures/home.svg.import index de463c0..09f954a 100644 --- a/project/textures/slide-up.png.import +++ b/project/textures/home.svg.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://bpj05amcrq1cq" -path="res://.godot/imported/slide-up.png-9a3ab0f76d82921eb16db9bb2f9d123d.ctex" +uid="uid://bmju020v33vrv" +path="res://.godot/imported/home.svg-d1fd9306efea074bae01c29b4de40bf8.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://textures/slide-up.png" -dest_files=["res://.godot/imported/slide-up.png-9a3ab0f76d82921eb16db9bb2f9d123d.ctex"] +source_file="res://textures/home.svg" +dest_files=["res://.godot/imported/home.svg-d1fd9306efea074bae01c29b4de40bf8.ctex"] [params] @@ -32,3 +32,6 @@ process/hdr_as_srgb=false process/hdr_clamp_exposure=false process/size_limit=0 detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/project/textures/search.svg.import b/project/textures/search.svg.import index 7463020..d1eca35 100644 --- a/project/textures/search.svg.import +++ b/project/textures/search.svg.import @@ -21,7 +21,7 @@ compress/lossy_quality=0.7 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" @@ -32,6 +32,6 @@ process/hdr_as_srgb=false process/hdr_clamp_exposure=false process/size_limit=0 detect_3d/compress_to=1 -svg/scale=0.2 +svg/scale=1.0 editor/scale_with_editor_scale=false editor/convert_colors_with_editor_theme=false diff --git a/project/textures/slide-up.png b/project/textures/slide-up.png deleted file mode 100644 index 9c4366e5679c7da03bab6944d49bbe3cf83bcd93..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1535 zcmV49PHnMi3lSkT9~)$Ybe3VWol) zKocJe6E{wDg8`JSiG~m%h{UxTO;8MA6yGZXs1OmAhk$?(B#{yPT-;mf(=|QaRo(X% zL*!37J()g_|J=IIQ|C(8@&86rrZZryq$!fdOX~0+NxJAiMM2RzNZKW7XObj);xLQ=pa*yf_>pk<0eBG@ADVBl9so?0)Gz5VNh32q zpOv&*(tb$?B>gJsf~2&okCAkfq=}Mlm((liK1rP!JO4;}N7AcFk{k@hy(Iu$z?;C8 z%u_oAtO8~NZB5v11MUG{27b=iz5;9jvJF%&fTh6c47qKg(y2uuRLH_lH3%R)Z!92^p0IdInS*au9A?f4Gh zh;jNYa7$FD_4)KW zRvCUrfr+7vkIIbs)jg!{$~EE;Yu!7!G5;5&WF+ zwc)+ESwme^HaTaAy~G3rFpie(XaMg_3K@Lyk4c`B8?{pXap$q5BN zAAIU#xC~4wqWqR=z3AK9SOEG=9Gmhg^#B82Xemx5gYu!z*D$$ecA|@fkz_vZKtv^ zdas_~NiXz%1QOXNzta4+GImb@KJfN`A4*`X=_YFfJ0JAqYsf_H3BWoN-pjjdpfkf#A!9s(hQ zH#UPbLY^Ve(j-U|6J7z^El-T(m;~=N0);X_KnHL!M)1amZG?-!jRo}^E`wu?z$*of zkHEc}8UR)l(Jkm_rT4KHXfLR1H$tO_5<1}p3U7sR+1Re4dQJH00F_LYDY3M~W>8A3);Qnlzb8qGniMSw^ChJ<3~x7-raCSDaa3w00Qkhm zatY|ptF*c9rr{a^)j5uhMHFwt9YevDpj>lv0j|vMOCQ5!iXQNAB`_(LN8%X`z>|jm z>&+PG#JyU^Zz8T*F;r0i6R6ZPox~MsH)UvvX~nN-VhdU}fE#etYbhRW)!-I8kqqbg zz_0ms0?+qGxPj3Q+(|D*(3E*dP<`UtL%}0+J;URHUySkBhEq>qaGBf@LYMRay;K)Q zZyXMDf*