From 0619577b369f3370f1810bf6423da8eedb796bff Mon Sep 17 00:00:00 2001 From: Face <69168154+face-hh@users.noreply.github.com> Date: Sun, 20 Jul 2025 14:49:41 +0300 Subject: [PATCH] tabs, search bar --- Icons/arrow-left.svg | 1 + Icons/arrow-left.svg.import | 37 +++++++++++++++++++ Icons/arrow-right.svg | 1 + Icons/arrow-right.svg.import | 37 +++++++++++++++++++ Icons/rotate-cw.svg | 1 + Icons/rotate-cw.svg.import | 37 +++++++++++++++++++ Icons/search.svg | 1 + Icons/search.svg.import | 37 +++++++++++++++++++ Scenes/main.tscn | 69 +++++++++++++++++++++++++++++++++-- Scripts/youtube.png | Bin 0 -> 2202 bytes Scripts/youtube.png.import | 34 +++++++++++++++++ 11 files changed, 252 insertions(+), 3 deletions(-) create mode 100644 Icons/arrow-left.svg create mode 100644 Icons/arrow-left.svg.import create mode 100644 Icons/arrow-right.svg create mode 100644 Icons/arrow-right.svg.import create mode 100644 Icons/rotate-cw.svg create mode 100644 Icons/rotate-cw.svg.import create mode 100644 Icons/search.svg create mode 100644 Icons/search.svg.import create mode 100644 Scripts/youtube.png create mode 100644 Scripts/youtube.png.import diff --git a/Icons/arrow-left.svg b/Icons/arrow-left.svg new file mode 100644 index 0000000..7a7f4c7 --- /dev/null +++ b/Icons/arrow-left.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Icons/arrow-left.svg.import b/Icons/arrow-left.svg.import new file mode 100644 index 0000000..855fcba --- /dev/null +++ b/Icons/arrow-left.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bp42ccs2nmbmw" +path="res://.godot/imported/arrow-left.svg-6665bd65bdc7655f58ffd2c77101e033.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Icons/arrow-left.svg" +dest_files=["res://.godot/imported/arrow-left.svg-6665bd65bdc7655f58ffd2c77101e033.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +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/Icons/arrow-right.svg b/Icons/arrow-right.svg new file mode 100644 index 0000000..dd567e0 --- /dev/null +++ b/Icons/arrow-right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Icons/arrow-right.svg.import b/Icons/arrow-right.svg.import new file mode 100644 index 0000000..9eae9b6 --- /dev/null +++ b/Icons/arrow-right.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dyyylow47qd0k" +path="res://.godot/imported/arrow-right.svg-952a316afcd4823b2076bf76a665b17d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Icons/arrow-right.svg" +dest_files=["res://.godot/imported/arrow-right.svg-952a316afcd4823b2076bf76a665b17d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +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/Icons/rotate-cw.svg b/Icons/rotate-cw.svg new file mode 100644 index 0000000..3ad00f9 --- /dev/null +++ b/Icons/rotate-cw.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Icons/rotate-cw.svg.import b/Icons/rotate-cw.svg.import new file mode 100644 index 0000000..bdc56f8 --- /dev/null +++ b/Icons/rotate-cw.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cu4hjoba6etf" +path="res://.godot/imported/rotate-cw.svg-868e19f6bcf83d62897eb2ac44a0b471.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Icons/rotate-cw.svg" +dest_files=["res://.godot/imported/rotate-cw.svg-868e19f6bcf83d62897eb2ac44a0b471.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +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/Icons/search.svg b/Icons/search.svg new file mode 100644 index 0000000..320a59d --- /dev/null +++ b/Icons/search.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Icons/search.svg.import b/Icons/search.svg.import new file mode 100644 index 0000000..1d4d79a --- /dev/null +++ b/Icons/search.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bf0vx7qwo28k6" +path="res://.godot/imported/search.svg-597dbc74e85ee7dfea046ab610b3d4ad.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Icons/search.svg" +dest_files=["res://.godot/imported/search.svg-597dbc74e85ee7dfea046ab610b3d4ad.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +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/Scenes/main.tscn b/Scenes/main.tscn index bffa6b7..404ae34 100644 --- a/Scenes/main.tscn +++ b/Scenes/main.tscn @@ -1,6 +1,24 @@ -[gd_scene load_steps=2 format=3 uid="uid://bytm7bt2s4ak8"] +[gd_scene load_steps=10 format=3 uid="uid://bytm7bt2s4ak8"] [ext_resource type="Script" uid="uid://bg5iqnwic1rio" path="res://Scripts/main.gd" id="1_8q3xr"] +[ext_resource type="Texture2D" uid="uid://dioe63fr47oq7" path="res://Scripts/youtube.png" id="2_bo1nx"] +[ext_resource type="Texture2D" uid="uid://bf0vx7qwo28k6" path="res://Icons/search.svg" id="3_8gbba"] +[ext_resource type="Texture2D" uid="uid://bp42ccs2nmbmw" path="res://Icons/arrow-left.svg" id="3_21xkr"] +[ext_resource type="Texture2D" uid="uid://dyyylow47qd0k" path="res://Icons/arrow-right.svg" id="4_6bp64"] +[ext_resource type="Texture2D" uid="uid://cu4hjoba6etf" path="res://Icons/rotate-cw.svg" id="5_344ge"] + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_8gbba"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_8gbba"] +corner_radius_top_left = 9 +corner_radius_top_right = 9 +corner_radius_bottom_right = 9 +corner_radius_bottom_left = 9 +expand_margin_left = 35.0 + +[sub_resource type="Theme" id="Theme_jjvhh"] +LineEdit/styles/focus = SubResource("StyleBoxEmpty_8gbba") +LineEdit/styles/normal = SubResource("StyleBoxFlat_8gbba") [node name="Control" type="Control"] layout_mode = 3 @@ -12,6 +30,7 @@ grow_vertical = 2 script = ExtResource("1_8q3xr") [node name="ColorRect" type="ColorRect" parent="."] +visible = false layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 @@ -35,9 +54,15 @@ grow_vertical = 2 layout_mode = 2 [node name="Button" type="Button" parent="VBoxContainer/HFlowContainer"] -custom_minimum_size = Vector2(50, 40) +custom_minimum_size = Vector2(250, 40) layout_mode = 2 -text = "hello world" +theme_override_colors/font_color = Color(1, 1, 1, 1) +theme_override_constants/h_separation = 8 +text = "(2) YouTube - Home Page testing" +icon = ExtResource("2_bo1nx") +alignment = 0 +text_overrun_behavior = 3 +expand_icon = true [node name="Button2" type="Button" parent="VBoxContainer/HFlowContainer"] custom_minimum_size = Vector2(50, 40) @@ -53,3 +78,41 @@ text = "hello world" custom_minimum_size = Vector2(50, 40) layout_mode = 2 text = "hello world" + +[node name="HSeparator" type="HSeparator" parent="VBoxContainer"] +layout_mode = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"] +layout_mode = 2 + +[node name="BackButton" type="Button" parent="VBoxContainer/HBoxContainer"] +layout_mode = 2 +icon = ExtResource("3_21xkr") + +[node name="ForwardButton" type="Button" parent="VBoxContainer/HBoxContainer"] +layout_mode = 2 +icon = ExtResource("4_6bp64") + +[node name="ReloadButton" type="Button" parent="VBoxContainer/HBoxContainer"] +layout_mode = 2 +icon = ExtResource("5_344ge") + +[node name="Control" type="Control" parent="VBoxContainer/HBoxContainer"] +custom_minimum_size = Vector2(32, 0) +layout_mode = 2 + +[node name="LineEdit" type="LineEdit" parent="VBoxContainer/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +theme = SubResource("Theme_jjvhh") +placeholder_text = "Search or enter web address" +caret_blink = true + +[node name="TextureRect" type="TextureRect" parent="VBoxContainer/HBoxContainer/LineEdit"] +layout_mode = 2 +offset_left = -27.0 +offset_right = -3.0 +offset_bottom = 37.0 +scale = Vector2(0.85, 0.85) +texture = ExtResource("3_8gbba") +stretch_mode = 5 diff --git a/Scripts/youtube.png b/Scripts/youtube.png new file mode 100644 index 0000000000000000000000000000000000000000..abd8e69c6be1f5ee1b017d3e655a9d67a4ef643c GIT binary patch literal 2202 zcmV;L2xa$)P)Px-R7pfZRCr$Pom*^FMHt6_XP1_%l*CYw_^z)A6l+i-Ahv~|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