diff options
author | tpart <tpart120@proton.me> | 2025-07-08 20:51:07 +0200 |
---|---|---|
committer | tpart <tpart120@proton.me> | 2025-07-08 20:51:07 +0200 |
commit | 652f558245216f71e69e15ade2f77ab2516eb42f (patch) | |
tree | 2ad91b0731700e99d982c882e61a37f6395d6be1 | |
parent | 14dedf30053e380d5e009080e71439a345f0e56a (diff) | |
download | hurrycurry-652f558245216f71e69e15ade2f77ab2516eb42f.tar hurrycurry-652f558245216f71e69e15ade2f77ab2516eb42f.tar.bz2 hurrycurry-652f558245216f71e69e15ade2f77ab2516eb42f.tar.zst |
Add file picker icons
-rw-r--r-- | client/menu/icons/select_directory.svg | 1 | ||||
-rw-r--r-- | client/menu/icons/select_directory.svg.import | 37 | ||||
-rw-r--r-- | client/menu/icons/select_file.svg | 1 | ||||
-rw-r--r-- | client/menu/icons/select_file.svg.import | 37 | ||||
-rw-r--r-- | client/menu/settings/path_setting.gd | 5 |
5 files changed, 81 insertions, 0 deletions
diff --git a/client/menu/icons/select_directory.svg b/client/menu/icons/select_directory.svg new file mode 100644 index 00000000..d3de2ef5 --- /dev/null +++ b/client/menu/icons/select_directory.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 -960 960 960" width="20px" fill="#FFFFFF"><path d="M170.87-183.87q-36.78 0-59.89-24.11t-23.11-58.89v-426.26q0-35.02 23.11-59.01 23.11-23.99 59.89-23.99h209.54L480-676.54h310.13q36.02 0 58.51 24.11 22.49 24.1 24.49 58.89H170.87v327.87l77.04-255.87h694.55l-82.61 272.08q-10.87 31.37-28.06 48.48-17.18 17.11-51.03 17.11H170.87Z"/></svg>
\ No newline at end of file diff --git a/client/menu/icons/select_directory.svg.import b/client/menu/icons/select_directory.svg.import new file mode 100644 index 00000000..d32b1c0d --- /dev/null +++ b/client/menu/icons/select_directory.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://kxer318lo1oj" +path="res://.godot/imported/select_directory.svg-53667a5eba564076594a4ae9632c9f83.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://menu/icons/select_directory.svg" +dest_files=["res://.godot/imported/select_directory.svg-53667a5eba564076594a4ae9632c9f83.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/client/menu/icons/select_file.svg b/client/menu/icons/select_file.svg new file mode 100644 index 00000000..f44866de --- /dev/null +++ b/client/menu/icons/select_file.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 -960 960 960" width="20px" fill="#FFFFFF"><path d="M850-88.11 749.5-188.85v79.37h-83V-330.5h221.02v83h-80.37L907.65-147 850-88.11ZM525.13-634.13h168l-168-168v168ZM266.87-100.87q-34.48 0-58.74-24.26-24.26-24.26-24.26-58.74v-618.26q0-34.48 24.26-58.74 24.26-24.26 58.74-24.26h312.48l196.78 196.78v285.85H594.5v301.63H266.87Z"/></svg>
\ No newline at end of file diff --git a/client/menu/icons/select_file.svg.import b/client/menu/icons/select_file.svg.import new file mode 100644 index 00000000..50661b4d --- /dev/null +++ b/client/menu/icons/select_file.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bsw8vqebvc38c" +path="res://.godot/imported/select_file.svg-9e81fa4a5e1bd26cd59bfc2ac6696ce3.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://menu/icons/select_file.svg" +dest_files=["res://.godot/imported/select_file.svg-9e81fa4a5e1bd26cd59bfc2ac6696ce3.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/client/menu/settings/path_setting.gd b/client/menu/settings/path_setting.gd index 747721e9..2d8f3e9b 100644 --- a/client/menu/settings/path_setting.gd +++ b/client/menu/settings/path_setting.gd @@ -1,5 +1,6 @@ # Hurry Curry! - a game about cooking # Copyright 2025 nokoe +# Copyright 2025 tpart # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -16,6 +17,9 @@ class_name PathSetting extends TextSetting +var select_file_icon: Texture2D = preload("res://menu/icons/select_file.svg") +var select_dir_icon: Texture2D = preload("res://menu/icons/select_directory.svg") + var access: FileDialog.Access var file_mode: FileDialog.FileMode @@ -37,6 +41,7 @@ func create_row(): row.value_node = HBoxContainer.new() row.value_node.add_child(input) var button := Button.new() + button.icon = select_file_icon if file_mode == FileDialog.FileMode.FILE_MODE_OPEN_FILE else select_dir_icon row.value_node.add_child(button) button.pressed.connect(func(): var d := FileDialog.new() |