mirror of
https://github.com/thegatesbrowser/thegates.git
synced 2025-08-30 02:16:59 -04:00
move files, onboarding (wip)
This commit is contained in:
parent
fcb2e5523e
commit
550f89bcf6
10 changed files with 235 additions and 67 deletions
67
app/scenes/components/search/prompt.tscn
Normal file
67
app/scenes/components/search/prompt.tscn
Normal file
|
@ -0,0 +1,67 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://b57n6cvtqn5b7"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/ui/search/prompt.gd" id="1_7xv44"]
|
||||
[ext_resource type="StyleBox" uid="uid://c6dqs0nhh726" path="res://assets/styles/prompt.stylebox" id="1_cbfrs"]
|
||||
[ext_resource type="Resource" uid="uid://b1xvdym0qh6td" path="res://resources/gate_events.res" id="2_33m26"]
|
||||
[ext_resource type="LabelSettings" uid="uid://bo2334w4lf3ug" path="res://assets/styles/text.tres" id="3_rbghg"]
|
||||
[ext_resource type="Texture2D" uid="uid://d05w6jtfy01w2" path="res://assets/textures/clock.svg" id="4_lekwb"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_l81vq"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_6fg0o"]
|
||||
content_margin_left = 30.0
|
||||
|
||||
[node name="prompt" type="Button" node_paths=PackedStringArray("prompt_text")]
|
||||
custom_minimum_size = Vector2(0, 32)
|
||||
anchors_preset = 14
|
||||
anchor_top = 0.5
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_default_cursor_shape = 2
|
||||
theme_override_styles/hover = ExtResource("1_cbfrs")
|
||||
theme_override_styles/pressed = ExtResource("1_cbfrs")
|
||||
theme_override_styles/normal = SubResource("StyleBoxEmpty_l81vq")
|
||||
script = ExtResource("1_7xv44")
|
||||
gate_events = ExtResource("2_33m26")
|
||||
prompt_text = NodePath("Label")
|
||||
focus_style = ExtResource("1_cbfrs")
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_styles/normal = SubResource("StyleBoxEmpty_6fg0o")
|
||||
text = "prompt"
|
||||
label_settings = ExtResource("3_rbghg")
|
||||
vertical_alignment = 1
|
||||
text_overrun_behavior = 3
|
||||
|
||||
[node name="SearchStatus" type="Control" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 4
|
||||
anchor_top = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = 10.0
|
||||
offset_top = -7.0
|
||||
offset_right = 24.0
|
||||
offset_bottom = 7.0
|
||||
grow_vertical = 2
|
||||
mouse_filter = 1
|
||||
|
||||
[node name="Search" type="TextureRect" parent="SearchStatus"]
|
||||
self_modulate = Color(0.831373, 0.831373, 0.831373, 1)
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("4_lekwb")
|
||||
expand_mode = 1
|
||||
|
||||
[connection signal="pressed" from="." to="." method="_on_button_pressed"]
|
121
app/scenes/components/search/result.tscn
Normal file
121
app/scenes/components/search/result.tscn
Normal file
|
@ -0,0 +1,121 @@
|
|||
[gd_scene load_steps=15 format=3 uid="uid://i3lgu2dyypcq"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/ui/search/result.gd" id="1_b6nfm"]
|
||||
[ext_resource type="StyleBox" uid="uid://bmxiecm3vkddl" path="res://assets/styles/panel_hover.stylebox" id="1_bqxb5"]
|
||||
[ext_resource type="StyleBox" uid="uid://bllkg32sc4iam" path="res://assets/styles/panel.stylebox" id="2_agglm"]
|
||||
[ext_resource type="Script" path="res://scripts/ui/search/one_line_text.gd" id="2_nxics"]
|
||||
[ext_resource type="Resource" uid="uid://b1xvdym0qh6td" path="res://resources/gate_events.res" id="2_wgd6i"]
|
||||
[ext_resource type="FontFile" uid="uid://do40418waa8w3" path="res://assets/fonts/Inter-Regular.otf" id="4_tevcf"]
|
||||
[ext_resource type="Texture2D" uid="uid://6k1ia4pidwrq" path="res://assets/textures/empty_icon.svg" id="5_a6pb2"]
|
||||
[ext_resource type="FontFile" uid="uid://c14w1y1r54wgi" path="res://assets/fonts/Inter-Bold.otf" id="5_vkte5"]
|
||||
[ext_resource type="FontFile" uid="uid://b3xb1fpllhnf4" path="res://assets/fonts/Inter-Italic.otf" id="6_10owe"]
|
||||
[ext_resource type="FontFile" uid="uid://tfj3o1e1wytn" path="res://assets/fonts/Inter-BoldItalic.otf" id="7_gyppg"]
|
||||
[ext_resource type="FontFile" uid="uid://bjeupg0ikc2kv" path="res://assets/fonts/Monospace.ttf" id="8_qjqxs"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6os7t"]
|
||||
corner_radius_top_left = 16
|
||||
corner_radius_top_right = 16
|
||||
corner_radius_bottom_right = 16
|
||||
corner_radius_bottom_left = 16
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_wqpwi"]
|
||||
font = ExtResource("4_tevcf")
|
||||
font_size = 20
|
||||
font_color = Color(0.32549, 0.14902, 0.8, 1)
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_j1fbr"]
|
||||
font = ExtResource("4_tevcf")
|
||||
font_size = 15
|
||||
font_color = Color(0.431373, 0.435294, 0.494118, 1)
|
||||
|
||||
[node name="Result" type="Button" node_paths=PackedStringArray("url", "title", "description", "icon")]
|
||||
custom_minimum_size = Vector2(850, 100)
|
||||
offset_bottom = 100.0
|
||||
mouse_default_cursor_shape = 2
|
||||
theme_override_styles/focus = ExtResource("1_bqxb5")
|
||||
theme_override_styles/hover = ExtResource("1_bqxb5")
|
||||
theme_override_styles/pressed = ExtResource("1_bqxb5")
|
||||
theme_override_styles/normal = ExtResource("2_agglm")
|
||||
icon = Object(TextureRect,"_import_path":NodePath(""),"unique_name_in_owner":false,"process_mode":0,"process_priority":0,"process_physics_priority":0,"process_thread_group":0,"physics_interpolation_mode":2,"auto_translate_mode":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(87, 87),"layout_direction":0,"layout_mode":1,"anchors_preset":15,"anchor_left":0.0,"anchor_top":0.0,"anchor_right":1.0,"anchor_bottom":1.0,"offset_left":0.0,"offset_top":0.0,"offset_right":0.0,"offset_bottom":0.0,"grow_horizontal":2,"grow_vertical":2,"rotation":0.0,"scale":Vector2(1, 1),"pivot_offset":Vector2(0, 0),"size_flags_horizontal":4,"size_flags_vertical":4,"size_flags_stretch_ratio":1.0,"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":0,"mouse_filter":1,"mouse_force_pass_scroll_events":true,"mouse_default_cursor_shape":0,"shortcut_context":null,"theme":null,"theme_type_variation":&"","texture":ExtResource("5_a6pb2"),"expand_mode":1,"stretch_mode":5,"flip_h":false,"flip_v":false,"script":null)
|
||||
|
||||
script = ExtResource("1_b6nfm")
|
||||
gate_events = ExtResource("2_wgd6i")
|
||||
url = NodePath("VBoxContainer/Url")
|
||||
title = NodePath("VBoxContainer/Title")
|
||||
description = NodePath("VBoxContainer/Description")
|
||||
icon = NodePath("Mask/Icon")
|
||||
|
||||
[node name="Mask" type="Panel" parent="."]
|
||||
clip_children = 1
|
||||
custom_minimum_size = Vector2(32, 32)
|
||||
layout_mode = 2
|
||||
offset_left = 16.0
|
||||
offset_top = 16.0
|
||||
offset_right = 48.0
|
||||
offset_bottom = 48.0
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
mouse_filter = 1
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_6os7t")
|
||||
|
||||
[node name="Icon" type="TextureRect" parent="Mask"]
|
||||
custom_minimum_size = Vector2(87, 87)
|
||||
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("5_a6pb2")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
offset_left = 60.0
|
||||
offset_top = 14.0
|
||||
offset_right = 834.0
|
||||
offset_bottom = 84.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 4
|
||||
|
||||
[node name="Title" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 24
|
||||
text = "Title"
|
||||
label_settings = SubResource("LabelSettings_wqpwi")
|
||||
text_overrun_behavior = 1
|
||||
|
||||
[node name="Url" type="Label" parent="VBoxContainer"]
|
||||
self_modulate = Color(1, 1, 1, 0.8)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_font_sizes/font_size = 20
|
||||
text = "http://localhost:8000"
|
||||
label_settings = SubResource("LabelSettings_j1fbr")
|
||||
text_overrun_behavior = 1
|
||||
|
||||
[node name="Description" type="RichTextLabel" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
mouse_filter = 1
|
||||
theme_override_colors/default_color = Color(0.831373, 0.831373, 0.831373, 1)
|
||||
theme_override_fonts/normal_font = ExtResource("4_tevcf")
|
||||
theme_override_fonts/mono_font = ExtResource("8_qjqxs")
|
||||
theme_override_fonts/italics_font = ExtResource("6_10owe")
|
||||
theme_override_fonts/bold_italics_font = ExtResource("7_gyppg")
|
||||
theme_override_fonts/bold_font = ExtResource("5_vkte5")
|
||||
theme_override_font_sizes/bold_italics_font_size = 15
|
||||
theme_override_font_sizes/italics_font_size = 15
|
||||
theme_override_font_sizes/mono_font_size = 15
|
||||
theme_override_font_sizes/normal_font_size = 15
|
||||
theme_override_font_sizes/bold_font_size = 15
|
||||
bbcode_enabled = true
|
||||
text = "Description"
|
||||
scroll_active = false
|
||||
autowrap_mode = 1
|
||||
script = ExtResource("2_nxics")
|
||||
|
||||
[connection signal="pressed" from="." to="." method="_on_button_pressed"]
|
376
app/scenes/components/search/search.tscn
Normal file
376
app/scenes/components/search/search.tscn
Normal file
|
@ -0,0 +1,376 @@
|
|||
[gd_scene load_steps=20 format=3 uid="uid://ctam0fxigbefk"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://do40418waa8w3" path="res://assets/fonts/Inter-Regular.otf" id="1_ruyeb"]
|
||||
[ext_resource type="Script" path="res://scripts/ui/search.gd" id="2_7qvyv"]
|
||||
[ext_resource type="Resource" uid="uid://b1xvdym0qh6td" path="res://resources/gate_events.res" id="3_685a6"]
|
||||
[ext_resource type="Script" path="res://scripts/ui/search/search_status.gd" id="4_cx4ue"]
|
||||
[ext_resource type="Texture2D" uid="uid://byrcelmfy6r3l" path="res://assets/textures/search.svg" id="5_c6ql8"]
|
||||
[ext_resource type="Texture2D" uid="uid://cx3xxaqo3s3eq" path="res://assets/textures/gate.svg" id="6_p0kxs"]
|
||||
[ext_resource type="Script" path="res://scripts/ui/search/download_animation.gd" id="7_x8glc"]
|
||||
[ext_resource type="Texture2D" uid="uid://cli88m5w3op6l" path="res://assets/textures/close_tab.svg" id="8_c6y7s"]
|
||||
[ext_resource type="Script" path="res://scripts/ui/menu/star.gd" id="9_ddnf2"]
|
||||
[ext_resource type="Resource" uid="uid://bewhdj6jugt6q" path="res://resources/bookmarks.tres" id="10_ih0xb"]
|
||||
[ext_resource type="Texture2D" uid="uid://c7ljriip50hte" path="res://assets/textures/star.svg" id="11_36jkj"]
|
||||
[ext_resource type="Texture2D" uid="uid://itloduvrh00o" path="res://assets/textures/star_color.svg" id="12_fj18v"]
|
||||
[ext_resource type="Script" path="res://scripts/ui/search/prompt_navigation.gd" id="13_2wt6m"]
|
||||
[ext_resource type="Script" path="res://scripts/ui/search/fix_promt_position.gd" id="14_t74qb"]
|
||||
[ext_resource type="Script" path="res://scripts/ui/search/prompt_results.gd" id="15_oxssj"]
|
||||
[ext_resource type="Resource" uid="uid://cjcdum6fm4ta0" path="res://resources/api_settings.tres" id="16_rk35h"]
|
||||
[ext_resource type="PackedScene" uid="uid://b57n6cvtqn5b7" path="res://scenes/components/search/prompt.tscn" id="17_xggpn"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_hyysn"]
|
||||
content_margin_left = 30.0
|
||||
content_margin_top = 3.0
|
||||
content_margin_right = 30.0
|
||||
bg_color = Color(0.0862745, 0.0901961, 0.117647, 1)
|
||||
border_width_left = 1
|
||||
border_width_top = 1
|
||||
border_width_right = 1
|
||||
border_width_bottom = 1
|
||||
border_color = Color(0.0823529, 0.0823529, 0.105882, 1)
|
||||
border_blend = true
|
||||
corner_radius_top_left = 15
|
||||
corner_radius_top_right = 15
|
||||
corner_radius_bottom_right = 15
|
||||
corner_radius_bottom_left = 15
|
||||
corner_detail = 10
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_mh73y"]
|
||||
bg_color = Color(0.0862745, 0.0901961, 0.117647, 1)
|
||||
border_width_left = 1
|
||||
border_width_top = 1
|
||||
border_width_right = 1
|
||||
border_width_bottom = 1
|
||||
border_color = Color(0.0823529, 0.0823529, 0.105882, 1)
|
||||
border_blend = true
|
||||
corner_radius_top_left = 15
|
||||
corner_radius_top_right = 15
|
||||
corner_radius_bottom_right = 15
|
||||
corner_radius_bottom_left = 15
|
||||
corner_detail = 10
|
||||
|
||||
[node name="Search" type="LineEdit" node_paths=PackedStringArray("prompt_panel")]
|
||||
auto_translate_mode = 2
|
||||
anchors_preset = 14
|
||||
anchor_top = 0.5
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.5
|
||||
offset_top = -16.5
|
||||
offset_bottom = 15.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 3
|
||||
localize_numeral_system = false
|
||||
focus_next = NodePath("Prompt")
|
||||
focus_mode = 1
|
||||
theme_override_colors/selection_color = Color(0.419608, 0.231373, 0.929412, 0.588235)
|
||||
theme_override_colors/font_placeholder_color = Color(0.431373, 0.435294, 0.494118, 1)
|
||||
theme_override_colors/font_color = Color(0.831373, 0.831373, 0.831373, 1)
|
||||
theme_override_fonts/font = ExtResource("1_ruyeb")
|
||||
theme_override_font_sizes/font_size = 15
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_hyysn")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_hyysn")
|
||||
placeholder_text = "Search or type URL"
|
||||
select_all_on_focus = true
|
||||
script = ExtResource("2_7qvyv")
|
||||
gate_events = ExtResource("3_685a6")
|
||||
prompt_panel = NodePath("Prompt/Panel")
|
||||
|
||||
[node name="SearchStatus" type="Control" parent="." node_paths=PackedStringArray("search_line_edit", "search", "downloading", "success", "error")]
|
||||
modulate = Color(0.431373, 0.435294, 0.494118, 1)
|
||||
layout_mode = 1
|
||||
anchors_preset = 4
|
||||
anchor_top = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = 10.0
|
||||
offset_top = -7.0
|
||||
offset_right = 24.0
|
||||
offset_bottom = 7.0
|
||||
grow_vertical = 2
|
||||
mouse_filter = 1
|
||||
script = ExtResource("4_cx4ue")
|
||||
gate_events = ExtResource("3_685a6")
|
||||
search_line_edit = NodePath("..")
|
||||
search = NodePath("Search")
|
||||
downloading = NodePath("Downloading")
|
||||
success = NodePath("Success")
|
||||
error = NodePath("Error")
|
||||
white = Color(0.831373, 0.831373, 0.831373, 1)
|
||||
gray = Color(0.431373, 0.435294, 0.494118, 1)
|
||||
|
||||
[node name="Search" type="TextureRect" parent="SearchStatus"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("5_c6ql8")
|
||||
expand_mode = 1
|
||||
|
||||
[node name="Downloading" type="TextureRect" parent="SearchStatus"]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
pivot_offset = Vector2(8, 8)
|
||||
texture = ExtResource("6_p0kxs")
|
||||
expand_mode = 1
|
||||
script = ExtResource("7_x8glc")
|
||||
start_scale = 1.0
|
||||
end_scale = 0.5
|
||||
duration = 0.5
|
||||
|
||||
[node name="Success" type="TextureRect" parent="SearchStatus"]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("6_p0kxs")
|
||||
expand_mode = 1
|
||||
|
||||
[node name="Error" type="TextureRect" parent="SearchStatus"]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("8_c6y7s")
|
||||
expand_mode = 1
|
||||
|
||||
[node name="Bookmark" type="Control" parent="." node_paths=PackedStringArray("star", "unstar")]
|
||||
layout_mode = 1
|
||||
anchors_preset = 6
|
||||
anchor_left = 1.0
|
||||
anchor_top = 0.5
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -28.0
|
||||
offset_top = -10.0
|
||||
offset_right = -8.0
|
||||
offset_bottom = 10.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 2
|
||||
script = ExtResource("9_ddnf2")
|
||||
gate_events = ExtResource("3_685a6")
|
||||
bookmarks = ExtResource("10_ih0xb")
|
||||
star = NodePath("Star")
|
||||
unstar = NodePath("Unstar")
|
||||
|
||||
[node name="Star" type="BaseButton" parent="Bookmark"]
|
||||
_import_path = NodePath("")
|
||||
unique_name_in_owner = false
|
||||
process_mode = 0
|
||||
process_priority = 0
|
||||
process_physics_priority = 0
|
||||
process_thread_group = 0
|
||||
physics_interpolation_mode = 2
|
||||
auto_translate_mode = 1
|
||||
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 = 15
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 0.0
|
||||
offset_top = 0.0
|
||||
offset_right = 0.0
|
||||
offset_bottom = 0.0
|
||||
grow_horizontal = 2
|
||||
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
|
||||
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="TextureRect" type="TextureRect" parent="Bookmark/Star"]
|
||||
self_modulate = Color(0.831373, 0.831373, 0.831373, 1)
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("11_36jkj")
|
||||
expand_mode = 1
|
||||
|
||||
[node name="Unstar" type="BaseButton" parent="Bookmark"]
|
||||
_import_path = NodePath("")
|
||||
unique_name_in_owner = false
|
||||
process_mode = 0
|
||||
process_priority = 0
|
||||
process_physics_priority = 0
|
||||
process_thread_group = 0
|
||||
physics_interpolation_mode = 2
|
||||
auto_translate_mode = 1
|
||||
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 = 15
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 0.0
|
||||
offset_top = 0.0
|
||||
offset_right = 0.0
|
||||
offset_bottom = 0.0
|
||||
grow_horizontal = 2
|
||||
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
|
||||
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="TextureRect" type="TextureRect" parent="Bookmark/Unstar"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("12_fj18v")
|
||||
expand_mode = 1
|
||||
|
||||
[node name="Prompt" type="Control" parent="." node_paths=PackedStringArray("search", "prompt_results")]
|
||||
layout_mode = 1
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_vertical = 0
|
||||
script = ExtResource("13_2wt6m")
|
||||
search = NodePath("..")
|
||||
prompt_results = NodePath("Panel/VBoxContainer")
|
||||
|
||||
[node name="Panel" type="Panel" parent="Prompt" node_paths=PackedStringArray("search")]
|
||||
visible = false
|
||||
top_level = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 5
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
offset_left = -500.0
|
||||
offset_top = 560.0
|
||||
offset_right = 500.0
|
||||
offset_bottom = 860.0
|
||||
grow_horizontal = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_mh73y")
|
||||
script = ExtResource("14_t74qb")
|
||||
search = NodePath("../..")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Prompt/Panel" node_paths=PackedStringArray("panel")]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/separation = 0
|
||||
script = ExtResource("15_oxssj")
|
||||
gate_events = ExtResource("3_685a6")
|
||||
api = ExtResource("16_rk35h")
|
||||
result_scene = ExtResource("17_xggpn")
|
||||
panel = NodePath("..")
|
||||
|
||||
[connection signal="text_changed" from="." to="Prompt/Panel/VBoxContainer" method="_on_search_text_changed"]
|
||||
[connection signal="text_submitted" from="." to="." method="_on_text_submitted"]
|
||||
[connection signal="pressed" from="Bookmark/Star" to="Bookmark" method="_on_star_pressed"]
|
||||
[connection signal="pressed" from="Bookmark/Unstar" to="Bookmark" method="_on_unstar_pressed"]
|
192
app/scenes/components/search/search_home.tscn
Normal file
192
app/scenes/components/search/search_home.tscn
Normal file
|
@ -0,0 +1,192 @@
|
|||
[gd_scene load_steps=16 format=3 uid="uid://bs2cwop0ei1r1"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://do40418waa8w3" path="res://assets/fonts/Inter-Regular.otf" id="1_767gv"]
|
||||
[ext_resource type="Script" path="res://scripts/ui/search.gd" id="2_h4fn7"]
|
||||
[ext_resource type="Resource" uid="uid://b1xvdym0qh6td" path="res://resources/gate_events.res" id="3_xrtl6"]
|
||||
[ext_resource type="Texture2D" uid="uid://ckkmluvnrorek" path="res://assets/textures/search_96.svg" id="4_m7aa2"]
|
||||
[ext_resource type="Script" path="res://scripts/ui/search/prompt_navigation.gd" id="5_iptg2"]
|
||||
[ext_resource type="Script" path="res://scripts/ui/search/fix_promt_position.gd" id="6_c6kyf"]
|
||||
[ext_resource type="Script" path="res://scripts/ui/search/prompt_results.gd" id="7_ijfkq"]
|
||||
[ext_resource type="Resource" uid="uid://cjcdum6fm4ta0" path="res://resources/api_settings.tres" id="8_8atq2"]
|
||||
[ext_resource type="PackedScene" uid="uid://b57n6cvtqn5b7" path="res://scenes/components/search/prompt.tscn" id="9_aknf3"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_w0n18"]
|
||||
content_margin_left = 45.0
|
||||
content_margin_right = 30.0
|
||||
bg_color = Color(0.0862745, 0.0901961, 0.117647, 1)
|
||||
border_width_left = 1
|
||||
border_width_top = 1
|
||||
border_width_right = 1
|
||||
border_width_bottom = 1
|
||||
border_color = Color(0.12549, 0.133333, 0.172549, 1)
|
||||
corner_radius_top_left = 22
|
||||
corner_radius_top_right = 22
|
||||
corner_radius_bottom_right = 22
|
||||
corner_radius_bottom_left = 22
|
||||
corner_detail = 10
|
||||
shadow_color = Color(0.0876, 0.09138, 0.12, 0.784314)
|
||||
shadow_size = 4
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_mh73y"]
|
||||
bg_color = Color(0.0862745, 0.0901961, 0.117647, 1)
|
||||
border_width_left = 1
|
||||
border_width_top = 1
|
||||
border_width_right = 1
|
||||
border_width_bottom = 1
|
||||
border_color = Color(0.0823529, 0.0823529, 0.105882, 1)
|
||||
border_blend = true
|
||||
corner_radius_top_left = 15
|
||||
corner_radius_top_right = 15
|
||||
corner_radius_bottom_right = 15
|
||||
corner_radius_bottom_left = 15
|
||||
corner_detail = 10
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ym5t0"]
|
||||
bg_color = Color(0.32549, 0.14902, 0.8, 1)
|
||||
corner_radius_top_left = 22
|
||||
corner_radius_top_right = 22
|
||||
corner_radius_bottom_right = 22
|
||||
corner_radius_bottom_left = 22
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_yso1e"]
|
||||
bg_color = Color(0.423529, 0.235294, 0.933333, 1)
|
||||
corner_radius_top_left = 22
|
||||
corner_radius_top_right = 22
|
||||
corner_radius_bottom_right = 22
|
||||
corner_radius_bottom_left = 22
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_t00so"]
|
||||
bg_color = Color(0.32549, 0.14902, 0.8, 1)
|
||||
corner_radius_top_left = 22
|
||||
corner_radius_top_right = 22
|
||||
corner_radius_bottom_right = 22
|
||||
corner_radius_bottom_left = 22
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1hgyb"]
|
||||
bg_color = Color(0.32549, 0.14902, 0.8, 1)
|
||||
corner_radius_top_left = 22
|
||||
corner_radius_top_right = 22
|
||||
corner_radius_bottom_right = 22
|
||||
corner_radius_bottom_left = 22
|
||||
|
||||
[node name="SearchHome" type="LineEdit" node_paths=PackedStringArray("prompt_panel")]
|
||||
auto_translate_mode = 2
|
||||
anchors_preset = 14
|
||||
anchor_top = 0.5
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.5
|
||||
offset_top = -16.5
|
||||
offset_bottom = 27.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 3
|
||||
localize_numeral_system = false
|
||||
focus_next = NodePath("Prompt")
|
||||
focus_mode = 1
|
||||
theme_override_colors/selection_color = Color(0.4185, 0.2325, 0.93, 0.588235)
|
||||
theme_override_colors/font_placeholder_color = Color(0.431373, 0.435294, 0.494118, 1)
|
||||
theme_override_colors/font_color = Color(0.831373, 0.831373, 0.831373, 1)
|
||||
theme_override_fonts/font = ExtResource("1_767gv")
|
||||
theme_override_font_sizes/font_size = 20
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_w0n18")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_w0n18")
|
||||
placeholder_text = "What are you looking for today?"
|
||||
select_all_on_focus = true
|
||||
script = ExtResource("2_h4fn7")
|
||||
gate_events = ExtResource("3_xrtl6")
|
||||
prompt_panel = NodePath("Prompt/Panel")
|
||||
focus_on_ready = true
|
||||
|
||||
[node name="SearchStatus" type="Control" parent="."]
|
||||
modulate = Color(0.831373, 0.831373, 0.831373, 1)
|
||||
layout_mode = 1
|
||||
anchors_preset = 4
|
||||
anchor_top = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = 15.0
|
||||
offset_top = -10.0
|
||||
offset_right = 35.0
|
||||
offset_bottom = 10.0
|
||||
grow_vertical = 2
|
||||
mouse_filter = 1
|
||||
|
||||
[node name="Search" type="TextureRect" parent="SearchStatus"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("4_m7aa2")
|
||||
expand_mode = 1
|
||||
|
||||
[node name="Prompt" type="Control" parent="." node_paths=PackedStringArray("search", "prompt_results")]
|
||||
layout_mode = 1
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_vertical = 0
|
||||
script = ExtResource("5_iptg2")
|
||||
search = NodePath("..")
|
||||
prompt_results = NodePath("Panel/VBoxContainer")
|
||||
|
||||
[node name="Panel" type="Panel" parent="Prompt" node_paths=PackedStringArray("search")]
|
||||
visible = false
|
||||
top_level = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 5
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
offset_left = -500.0
|
||||
offset_top = 560.0
|
||||
offset_right = 500.0
|
||||
offset_bottom = 860.0
|
||||
grow_horizontal = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_mh73y")
|
||||
script = ExtResource("6_c6kyf")
|
||||
search = NodePath("../..")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Prompt/Panel" node_paths=PackedStringArray("panel")]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/separation = 0
|
||||
script = ExtResource("7_ijfkq")
|
||||
gate_events = ExtResource("3_xrtl6")
|
||||
api = ExtResource("8_8atq2")
|
||||
result_scene = ExtResource("9_aknf3")
|
||||
panel = NodePath("..")
|
||||
|
||||
[node name="Button" type="Button" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 6
|
||||
anchor_left = 1.0
|
||||
anchor_top = 0.5
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -104.0
|
||||
offset_top = -19.0
|
||||
offset_right = -4.0
|
||||
offset_bottom = 19.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 2
|
||||
focus_mode = 0
|
||||
mouse_default_cursor_shape = 2
|
||||
theme_override_colors/font_hover_color = Color(0.831373, 0.831373, 0.831373, 1)
|
||||
theme_override_colors/font_pressed_color = Color(0.831373, 0.831373, 0.831373, 1)
|
||||
theme_override_colors/font_focus_color = Color(0.831373, 0.831373, 0.831373, 1)
|
||||
theme_override_colors/font_color = Color(0.831373, 0.831373, 0.831373, 1)
|
||||
theme_override_fonts/font = ExtResource("1_767gv")
|
||||
theme_override_font_sizes/font_size = 20
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_ym5t0")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_yso1e")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_t00so")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_1hgyb")
|
||||
text = "Search"
|
||||
|
||||
[connection signal="text_changed" from="." to="Prompt/Panel/VBoxContainer" method="_on_search_text_changed"]
|
||||
[connection signal="text_submitted" from="." to="." method="_on_text_submitted"]
|
||||
[connection signal="pressed" from="Button" to="." method="_on_text_submitted" binds= [""]]
|
48
app/scenes/components/search/suggestion.tscn
Normal file
48
app/scenes/components/search/suggestion.tscn
Normal file
|
@ -0,0 +1,48 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://dntnp0igpccdt"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://do40418waa8w3" path="res://assets/fonts/Inter-Regular.otf" id="1_ljf2m"]
|
||||
[ext_resource type="Script" path="res://scripts/ui/search/suggestion.gd" id="2_rofb8"]
|
||||
[ext_resource type="Resource" uid="uid://b1xvdym0qh6td" path="res://resources/gate_events.res" id="3_l3ahe"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ix3db"]
|
||||
content_margin_left = 13.0
|
||||
content_margin_top = 6.0
|
||||
content_margin_right = 13.0
|
||||
content_margin_bottom = 6.0
|
||||
bg_color = Color(0.12549, 0.133333, 0.172549, 1)
|
||||
corner_radius_top_left = 15
|
||||
corner_radius_top_right = 15
|
||||
corner_radius_bottom_right = 15
|
||||
corner_radius_bottom_left = 15
|
||||
shadow_color = Color(0.0862745, 0.0901961, 0.117647, 0.784314)
|
||||
shadow_size = 4
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_y60js"]
|
||||
content_margin_left = 13.0
|
||||
content_margin_top = 6.0
|
||||
content_margin_right = 13.0
|
||||
content_margin_bottom = 6.0
|
||||
bg_color = Color(0.32549, 0.14902, 0.8, 1)
|
||||
corner_radius_top_left = 15
|
||||
corner_radius_top_right = 15
|
||||
corner_radius_bottom_right = 15
|
||||
corner_radius_bottom_left = 15
|
||||
shadow_color = Color(0.0862745, 0.0901961, 0.117647, 0.784314)
|
||||
shadow_size = 4
|
||||
|
||||
[node name="Suggestion" type="Button"]
|
||||
custom_minimum_size = Vector2(0, 26)
|
||||
focus_mode = 0
|
||||
mouse_default_cursor_shape = 2
|
||||
theme_override_colors/font_color = Color(0.831373, 0.831373, 0.831373, 1)
|
||||
theme_override_fonts/font = ExtResource("1_ljf2m")
|
||||
theme_override_font_sizes/font_size = 15
|
||||
theme_override_styles/disabled = SubResource("StyleBoxFlat_ix3db")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_y60js")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_ix3db")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_ix3db")
|
||||
text = "suggestion"
|
||||
script = ExtResource("2_rofb8")
|
||||
gate_events = ExtResource("3_l3ahe")
|
||||
|
||||
[connection signal="pressed" from="." to="." method="_on_button_pressed"]
|
Loading…
Add table
Add a link
Reference in a new issue