browser history and navigation

This commit is contained in:
Face
2025-09-06 16:58:24 +03:00
parent 6f70032aab
commit 47c7b4bfaa
16 changed files with 592 additions and 137 deletions

View File

@@ -1,11 +1,43 @@
[gd_scene load_steps=15 format=3 uid="uid://cn24pafwdpb1q"]
[ext_resource type="Texture2D" uid="uid://ctpe0lbehepen" path="res://Assets/gurted.svg" id="1_occ3h"]
[ext_resource type="Script" uid="uid://ektopbvnhfga" path="res://Scripts/history.gd" id="1_yn8i4"]
[ext_resource type="PackedScene" uid="uid://3smiker6ni50" path="res://Scenes/BrowserMenus/history_entry.tscn" id="2_a5287"]
[ext_resource type="Texture2D" uid="uid://gq8g7t4s3ryg" path="res://Assets/Icons/x.svg" id="2_ijpe2"]
[ext_resource type="Theme" uid="uid://bn6rbmdy60lhr" path="res://Scenes/Styles/BrowserText.tres" id="3_yoadi"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_yoadi"]
content_margin_left = 15.0
content_margin_top = 15.0
content_margin_right = 15.0
content_margin_bottom = 15.0
bg_color = Color(0.105882, 0.105882, 0.105882, 1)
corner_radius_top_left = 30
corner_radius_top_right = 30
corner_radius_bottom_right = 30
corner_radius_bottom_left = 30
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_8gbba"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_8gbba"]
bg_color = Color(0.168627, 0.168627, 0.168627, 1)
corner_radius_top_left = 15
corner_radius_top_right = 15
corner_radius_bottom_right = 15
corner_radius_bottom_left = 15
expand_margin_left = 40.0
[sub_resource type="Theme" id="Theme_ijpe2"]
LineEdit/styles/focus = SubResource("StyleBoxEmpty_8gbba")
LineEdit/styles/normal = SubResource("StyleBoxFlat_8gbba")
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_a5287"]
content_margin_left = 10.0
bg_color = Color(0.219501, 0.219501, 0.219501, 1)
corner_radius_top_left = 15
corner_radius_top_right = 15
corner_radius_bottom_right = 15
corner_radius_bottom_left = 15
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ijpe2"]
content_margin_left = 15.0
content_margin_top = 5.0
@@ -43,78 +75,42 @@ corner_radius_top_right = 25
corner_radius_bottom_right = 25
corner_radius_bottom_left = 25
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_8gbba"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_8gbba"]
bg_color = Color(0.168627, 0.168627, 0.168627, 1)
corner_radius_top_left = 15
corner_radius_top_right = 15
corner_radius_bottom_right = 15
corner_radius_bottom_left = 15
expand_margin_left = 40.0
[sub_resource type="Theme" id="Theme_ijpe2"]
LineEdit/styles/focus = SubResource("StyleBoxEmpty_8gbba")
LineEdit/styles/normal = SubResource("StyleBoxFlat_8gbba")
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_a5287"]
content_margin_left = 10.0
bg_color = Color(0.219501, 0.219501, 0.219501, 1)
corner_radius_top_left = 15
corner_radius_top_right = 15
corner_radius_bottom_right = 15
corner_radius_bottom_left = 15
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_yn8i4"]
content_margin_left = 15.0
content_margin_top = 15.0
content_margin_right = 15.0
content_margin_bottom = 5.0
bg_color = Color(0.105882, 0.105882, 0.105882, 1)
bg_color = Color(0.154876, 0.154876, 0.154876, 1)
corner_radius_top_left = 15
corner_radius_top_right = 15
corner_radius_bottom_right = 15
corner_radius_bottom_left = 15
[node name="History" type="MarginContainer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 20
theme_override_constants/margin_top = 20
theme_override_constants/margin_right = 20
[node name="PopupPanel" type="PopupPanel"]
initial_position = 1
size = Vector2i(760, 710)
visible = true
theme_override_styles/panel = SubResource("StyleBoxFlat_yoadi")
script = ExtResource("1_yn8i4")
[node name="Control" type="Control" parent="."]
custom_minimum_size = Vector2(400, 100)
layout_mode = 2
[node name="TextureRect" type="TextureRect" parent="Control"]
layout_mode = 1
offset_right = 417.0
offset_bottom = 417.0
scale = Vector2(0.105, 0.105)
texture = ExtResource("1_occ3h")
stretch_mode = 2
[node name="RichTextLabel" type="RichTextLabel" parent="Control"]
layout_mode = 0
offset_left = 50.0
offset_top = 9.0
offset_right = 339.0
offset_bottom = 85.0
theme_override_font_sizes/bold_font_size = 26
bbcode_enabled = true
text = "[b]History[/b]"
[node name="Main" type="VBoxContainer" parent="."]
custom_minimum_size = Vector2(600, 0)
layout_mode = 2
offset_left = 15.0
offset_top = 15.0
offset_right = 745.0
offset_bottom = 695.0
size_flags_horizontal = 4
theme_override_constants/separation = 15
[node name="LineEdit" type="LineEdit" parent="Main"]
custom_minimum_size = Vector2(0, 45)
layout_mode = 2
size_flags_horizontal = 3
theme = SubResource("Theme_ijpe2")
theme_override_styles/normal = SubResource("StyleBoxFlat_a5287")
placeholder_text = "Search history..."
caret_blink = true
[node name="DeleteMenu" type="PanelContainer" parent="Main"]
visible = false
layout_mode = 2
@@ -149,24 +145,13 @@ theme_override_styles/hover = SubResource("StyleBoxFlat_a8gu8")
theme_override_styles/normal = SubResource("StyleBoxFlat_31fx5")
text = "Delete"
[node name="LineEdit" type="LineEdit" parent="Main"]
custom_minimum_size = Vector2(0, 45)
layout_mode = 2
size_flags_horizontal = 3
theme = SubResource("Theme_ijpe2")
theme_override_styles/normal = SubResource("StyleBoxFlat_a5287")
placeholder_text = "Search history..."
caret_blink = true
[node name="HSeparator" type="HSeparator" parent="Main"]
layout_mode = 2
[node name="PanelContainer2" type="PanelContainer" parent="Main"]
layout_mode = 2
size_flags_vertical = 3
theme_override_styles/panel = SubResource("StyleBoxFlat_yn8i4")
[node name="ScrollContainer" type="ScrollContainer" parent="Main/PanelContainer2"]
custom_minimum_size = Vector2(700, 500)
layout_mode = 2
size_flags_vertical = 3
@@ -174,7 +159,6 @@ size_flags_vertical = 3
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
alignment = 1
[node name="HistoryEntry" parent="Main/PanelContainer2/ScrollContainer/HistoryEntryContainer" instance=ExtResource("2_a5287")]
layout_mode = 2
@@ -322,5 +306,3 @@ layout_mode = 2
[node name="HistoryEntry49" parent="Main/PanelContainer2/ScrollContainer/HistoryEntryContainer" instance=ExtResource("2_a5287")]
layout_mode = 2
[connection signal="pressed" from="Main/DeleteMenu/HBoxContainer/CancelButton" to="." method="_on_cancel_button_pressed"]