From 3d9556b1e9d59b5c1083a0ef74520e7bae69fd4f Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Sun, 8 Sep 2024 13:14:13 +0100 Subject: [PATCH] Mockup texture browser --- project/assets/icons/ActionCopy.svg | 1 + project/assets/icons/ActionCopy.svg.import | 37 +++ project/assets/icons/Folder.svg | 1 + project/assets/icons/Folder.svg.import | 37 +++ project/assets/icons/GuiTabMenuHl.svg | 1 + project/assets/icons/GuiTabMenuHl.svg.import | 37 +++ project/assets/icons/Search.svg | 1 + project/assets/icons/Search.svg.import | 37 +++ project/assets/icons/Sort.svg | 1 + project/assets/icons/Sort.svg.import | 37 +++ .../scenes/asset_browser/asset_browser.tscn | 272 ++++++++++++++++++ 11 files changed, 462 insertions(+) create mode 100644 project/assets/icons/ActionCopy.svg create mode 100644 project/assets/icons/ActionCopy.svg.import create mode 100644 project/assets/icons/Folder.svg create mode 100644 project/assets/icons/Folder.svg.import create mode 100644 project/assets/icons/GuiTabMenuHl.svg create mode 100644 project/assets/icons/GuiTabMenuHl.svg.import create mode 100644 project/assets/icons/Search.svg create mode 100644 project/assets/icons/Search.svg.import create mode 100644 project/assets/icons/Sort.svg create mode 100644 project/assets/icons/Sort.svg.import create mode 100644 project/scenes/asset_browser/asset_browser.tscn diff --git a/project/assets/icons/ActionCopy.svg b/project/assets/icons/ActionCopy.svg new file mode 100644 index 0000000..909c6c1 --- /dev/null +++ b/project/assets/icons/ActionCopy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/project/assets/icons/ActionCopy.svg.import b/project/assets/icons/ActionCopy.svg.import new file mode 100644 index 0000000..07bddff --- /dev/null +++ b/project/assets/icons/ActionCopy.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bfswg75r148mr" +path="res://.godot/imported/ActionCopy.svg-fe32bd9a658250ff5e4542f0ef742cc6.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://project/assets/icons/ActionCopy.svg" +dest_files=["res://.godot/imported/ActionCopy.svg-fe32bd9a658250ff5e4542f0ef742cc6.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/project/assets/icons/Folder.svg b/project/assets/icons/Folder.svg new file mode 100644 index 0000000..168e26b --- /dev/null +++ b/project/assets/icons/Folder.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/project/assets/icons/Folder.svg.import b/project/assets/icons/Folder.svg.import new file mode 100644 index 0000000..c937e53 --- /dev/null +++ b/project/assets/icons/Folder.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dqefy830o4foj" +path="res://.godot/imported/Folder.svg-c5366e065eac9f3b42512c5da39f138e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://project/assets/icons/Folder.svg" +dest_files=["res://.godot/imported/Folder.svg-c5366e065eac9f3b42512c5da39f138e.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/project/assets/icons/GuiTabMenuHl.svg b/project/assets/icons/GuiTabMenuHl.svg new file mode 100644 index 0000000..7d45e7e --- /dev/null +++ b/project/assets/icons/GuiTabMenuHl.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/project/assets/icons/GuiTabMenuHl.svg.import b/project/assets/icons/GuiTabMenuHl.svg.import new file mode 100644 index 0000000..3b3dcff --- /dev/null +++ b/project/assets/icons/GuiTabMenuHl.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dm2jiwrvkjnaa" +path="res://.godot/imported/GuiTabMenuHl.svg-7d46ea78c1798f92cb9529645b049264.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://project/assets/icons/GuiTabMenuHl.svg" +dest_files=["res://.godot/imported/GuiTabMenuHl.svg-7d46ea78c1798f92cb9529645b049264.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/project/assets/icons/Search.svg b/project/assets/icons/Search.svg new file mode 100644 index 0000000..f556cd9 --- /dev/null +++ b/project/assets/icons/Search.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/project/assets/icons/Search.svg.import b/project/assets/icons/Search.svg.import new file mode 100644 index 0000000..930c044 --- /dev/null +++ b/project/assets/icons/Search.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://beb4tj06ivjae" +path="res://.godot/imported/Search.svg-000822acacc83acc029332775ac6bf48.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://project/assets/icons/Search.svg" +dest_files=["res://.godot/imported/Search.svg-000822acacc83acc029332775ac6bf48.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/project/assets/icons/Sort.svg b/project/assets/icons/Sort.svg new file mode 100644 index 0000000..88232f7 --- /dev/null +++ b/project/assets/icons/Sort.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/project/assets/icons/Sort.svg.import b/project/assets/icons/Sort.svg.import new file mode 100644 index 0000000..236a64a --- /dev/null +++ b/project/assets/icons/Sort.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dx8paqeom7dtb" +path="res://.godot/imported/Sort.svg-25c42cee888ae0bd8bbed8b3683eb96a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://project/assets/icons/Sort.svg" +dest_files=["res://.godot/imported/Sort.svg-25c42cee888ae0bd8bbed8b3683eb96a.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/project/scenes/asset_browser/asset_browser.tscn b/project/scenes/asset_browser/asset_browser.tscn new file mode 100644 index 0000000..c03b790 --- /dev/null +++ b/project/scenes/asset_browser/asset_browser.tscn @@ -0,0 +1,272 @@ +[gd_scene load_steps=8 format=3 uid="uid://byknmqac1a5vn"] + +[ext_resource type="Texture2D" uid="uid://b208ufsau5jhb" path="res://project/jorge.png" id="1_1vlw2"] +[ext_resource type="Texture2D" uid="uid://beb4tj06ivjae" path="res://project/assets/icons/Search.svg" id="1_ityvd"] +[ext_resource type="Texture2D" uid="uid://d1rqwnr7u0rq7" path="res://project/sky.png" id="2_dggh8"] +[ext_resource type="Texture2D" uid="uid://dx8paqeom7dtb" path="res://project/assets/icons/Sort.svg" id="3_0k1fm"] +[ext_resource type="Texture2D" uid="uid://dqefy830o4foj" path="res://project/assets/icons/Folder.svg" id="3_xdjfn"] +[ext_resource type="Texture2D" uid="uid://dm2jiwrvkjnaa" path="res://project/assets/icons/GuiTabMenuHl.svg" id="4_s4jwc"] +[ext_resource type="Texture2D" uid="uid://bfswg75r148mr" path="res://project/assets/icons/ActionCopy.svg" id="7_2pq2g"] + +[node name="AssetBrowser" 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="TabContainer" type="TabContainer" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +current_tab = 0 + +[node name="Textures" type="MarginContainer" parent="TabContainer"] +layout_mode = 2 +theme_override_constants/margin_left = 8 +theme_override_constants/margin_top = 8 +theme_override_constants/margin_right = 8 +theme_override_constants/margin_bottom = 8 +metadata/_tab_index = 0 + +[node name="VBoxContainer" type="VBoxContainer" parent="TabContainer/Textures"] +layout_mode = 2 + +[node name="HSplitContainer" type="HSplitContainer" parent="TabContainer/Textures/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 + +[node name="FolderTree" type="Tree" parent="TabContainer/Textures/VBoxContainer/HSplitContainer"] +custom_minimum_size = Vector2(256, 0) +layout_mode = 2 + +[node name="HSplitContainer" type="HSplitContainer" parent="TabContainer/Textures/VBoxContainer/HSplitContainer"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="Browser" type="VBoxContainer" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="Options" type="HBoxContainer" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Browser"] +layout_mode = 2 + +[node name="Search" type="LineEdit" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Browser/Options"] +layout_mode = 2 +size_flags_horizontal = 3 +placeholder_text = "Search..." +clear_button_enabled = true +right_icon = ExtResource("1_ityvd") + +[node name="Sort" type="MenuButton" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Browser/Options"] +layout_mode = 2 +tooltip_text = "Sort Mode" +icon = ExtResource("3_0k1fm") +icon_alignment = 1 +item_count = 4 +popup/item_0/text = "Family" +popup/item_0/checkable = 2 +popup/item_0/id = 1 +popup/item_1/text = "Name" +popup/item_1/checkable = 2 +popup/item_1/id = 2 +popup/item_2/text = "Index" +popup/item_2/checkable = 2 +popup/item_2/disabled = true +popup/item_3/text = "Count" +popup/item_3/checkable = 2 +popup/item_3/id = 3 +popup/item_3/disabled = true + +[node name="Button" type="Button" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Browser/Options"] +layout_mode = 2 +tooltip_text = "Open folder in File Explorer" +icon = ExtResource("3_xdjfn") +flat = true +icon_alignment = 1 + +[node name="MenuButton" type="MenuButton" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Browser/Options"] +layout_mode = 2 +icon = ExtResource("4_s4jwc") +item_count = 9 +popup/item_0/text = "Keep Aspect Ratio" +popup/item_0/checkable = 1 +popup/item_0/checked = true +popup/item_0/id = 1 +popup/item_1/text = "Show Custom" +popup/item_1/checkable = 1 +popup/item_1/checked = true +popup/item_2/text = "Show Family Name" +popup/item_2/checkable = 1 +popup/item_2/id = 2 +popup/item_3/text = "Show File Name" +popup/item_3/checkable = 1 +popup/item_3/checked = true +popup/item_3/id = 3 +popup/item_4/text = "Show File Type" +popup/item_4/checkable = 1 +popup/item_4/checked = true +popup/item_4/id = 4 +popup/item_5/text = "Show Resolution" +popup/item_5/checkable = 1 +popup/item_5/id = 5 +popup/item_6/id = 8 +popup/item_6/separator = true +popup/item_7/text = "Show Usage Count" +popup/item_7/checkable = 1 +popup/item_7/id = 6 +popup/item_7/disabled = true +popup/item_8/text = "Show Texture Index" +popup/item_8/checkable = 1 +popup/item_8/id = 7 +popup/item_8/disabled = true + +[node name="PanelContainer" type="PanelContainer" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Browser"] +layout_mode = 2 +size_flags_vertical = 3 + +[node name="MarginContainer" type="MarginContainer" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Browser/PanelContainer"] +layout_mode = 2 +theme_override_constants/margin_left = 8 +theme_override_constants/margin_top = 8 +theme_override_constants/margin_right = 8 +theme_override_constants/margin_bottom = 8 + +[node name="Scroll" type="ScrollContainer" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Browser/PanelContainer/MarginContainer"] +layout_mode = 2 +size_flags_vertical = 3 + +[node name="List" type="HFlowContainer" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Browser/PanelContainer/MarginContainer/Scroll"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="TextureRect" type="TextureRect" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Browser/PanelContainer/MarginContainer/Scroll/List"] +custom_minimum_size = Vector2(128, 128) +layout_mode = 2 +texture = ExtResource("1_1vlw2") + +[node name="Preview" type="VBoxContainer" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer"] +custom_minimum_size = Vector2(384, 0) +layout_mode = 2 + +[node name="VSplitContainer" type="VSplitContainer" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Preview"] +layout_mode = 2 +size_flags_vertical = 3 + +[node name="TextureRect" type="TextureRect" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Preview/VSplitContainer"] +custom_minimum_size = Vector2(0, 384) +layout_mode = 2 +texture = ExtResource("2_dggh8") +stretch_mode = 5 + +[node name="PanelContainer2" type="PanelContainer" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Preview/VSplitContainer"] +layout_mode = 2 +size_flags_vertical = 3 + +[node name="MarginContainer" type="MarginContainer" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Preview/VSplitContainer/PanelContainer2"] +layout_mode = 2 +theme_override_constants/margin_left = 8 +theme_override_constants/margin_top = 8 +theme_override_constants/margin_right = 8 +theme_override_constants/margin_bottom = 8 + +[node name="Scroll" type="ScrollContainer" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Preview/VSplitContainer/PanelContainer2/MarginContainer"] +layout_mode = 2 +size_flags_vertical = 3 + +[node name="Details" type="GridContainer" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Preview/VSplitContainer/PanelContainer2/MarginContainer/Scroll"] +layout_mode = 2 +size_flags_horizontal = 3 +theme_override_constants/h_separation = 16 +columns = 2 + +[node name="FilterLabel" type="Label" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Preview/VSplitContainer/PanelContainer2/MarginContainer/Scroll/Details"] +layout_mode = 2 +text = "Texture Filter" + +[node name="FilterOptions" type="OptionButton" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Preview/VSplitContainer/PanelContainer2/MarginContainer/Scroll/Details"] +layout_mode = 2 +size_flags_horizontal = 3 +selected = 0 +item_count = 2 +popup/item_0/text = "Linear" +popup/item_1/text = "Nearest" +popup/item_1/id = 1 + +[node name="Position" type="Label" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Preview/VSplitContainer/PanelContainer2/MarginContainer/Scroll/Details"] +layout_mode = 2 +text = "Position" + +[node name="PositionOptions" type="OptionButton" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Preview/VSplitContainer/PanelContainer2/MarginContainer/Scroll/Details"] +layout_mode = 2 +size_flags_horizontal = 3 +selected = 0 +item_count = 2 +popup/item_0/text = "Scaled" +popup/item_1/text = "Tiled" +popup/item_1/id = 1 + +[node name="ZoomLabel" type="Label" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Preview/VSplitContainer/PanelContainer2/MarginContainer/Scroll/Details"] +visible = false +layout_mode = 2 +text = "Zoom" + +[node name="ZoomSlider" type="HSlider" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Preview/VSplitContainer/PanelContainer2/MarginContainer/Scroll/Details"] +visible = false +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 4 +min_value = 0.5 +max_value = 8.0 +value = 0.5 + +[node name="PathLabel" type="Label" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Preview/VSplitContainer/PanelContainer2/MarginContainer/Scroll/Details"] +layout_mode = 2 +text = "Path" + +[node name="HBoxContainer" type="HBoxContainer" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Preview/VSplitContainer/PanelContainer2/MarginContainer/Scroll/Details"] +layout_mode = 2 + +[node name="PathBox" type="LineEdit" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Preview/VSplitContainer/PanelContainer2/MarginContainer/Scroll/Details/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +editable = false + +[node name="PathCopyButton" type="Button" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Preview/VSplitContainer/PanelContainer2/MarginContainer/Scroll/Details/HBoxContainer"] +layout_mode = 2 +icon = ExtResource("7_2pq2g") +flat = true + +[node name="FileTypeLabel" type="Label" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Preview/VSplitContainer/PanelContainer2/MarginContainer/Scroll/Details"] +layout_mode = 2 +text = "File Type" + +[node name="FileTypeBox" type="LineEdit" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Preview/VSplitContainer/PanelContainer2/MarginContainer/Scroll/Details"] +layout_mode = 2 +size_flags_horizontal = 3 +editable = false + +[node name="ResolutionLabel" type="Label" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Preview/VSplitContainer/PanelContainer2/MarginContainer/Scroll/Details"] +layout_mode = 2 +text = "Resolution" + +[node name="ResolutionBox" type="LineEdit" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Preview/VSplitContainer/PanelContainer2/MarginContainer/Scroll/Details"] +layout_mode = 2 +size_flags_horizontal = 3 +editable = false + +[node name="FileSizeLabel" type="Label" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Preview/VSplitContainer/PanelContainer2/MarginContainer/Scroll/Details"] +layout_mode = 2 +text = "File Size" + +[node name="FileSizeBox" type="LineEdit" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Preview/VSplitContainer/PanelContainer2/MarginContainer/Scroll/Details"] +layout_mode = 2 +size_flags_horizontal = 3 +editable = false