diff --git a/.gdignore b/.gdignore
new file mode 100644
index 0000000..23354bf
--- /dev/null
+++ b/.gdignore
@@ -0,0 +1,4 @@
+.github
+.github/*
+README.md
+LICENSE
\ No newline at end of file
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..e79016e
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,4 @@
+* text=auto eol=lf
+/** export-ignore
+/addons !export-ignore
+/addons/** !export-ignore
diff --git a/.gitignore b/.gitignore
index bb71180..30f3589 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@
.import/
export.cfg
export_credentials.cfg
+export_presets.cfg
# Imported translations (automatically generated from CSV files)
*.translation
diff --git a/README.md b/README.md
index 4008510..65a7454 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,59 @@
# Fancy-Folder-Icons
+
Custom Folder Icons Addon For Godot 4
-Allows you to choose a custom icons for folders. *(also works with files)*
+Allows you to choose a custom icons for folders. _(also works with files)_
[](https://godotengine.org/)  

# How Work
-In the godot file system, press RMB (right click) on any folder/file you want to **iconize** and select **Custom Icon** from the menu.
+
+instead of having to set a custom icon for each folder indevidually, the folders will be set using rules.
+
+### Rules instructions
+
+for match rules you can have the path be matched my string, or \* for wildcard which matches any folder, or \*\* for wildcard that matches any amount of folders in a row.
+
+rules can be changed at project settings plugin/fancy_folder_icons/rules
+
+## eg:
+
+- match rule "res://scenes/blocks/\*\*/images/"
+ - matches "res://scenes/blocks/block1/images/"
+ - matches "res://scenes/blocks/block2/images/"
+ - matches "res://scenes/blocks/block3/nested_folder/images/"
+ - matches "res://scenes/blocks/block3/nested_folder/nested_folder2/images/"
+
+---
+
+- replace rule "res://scenes/blocks/image.png"
+ - loads image from "res://scenes/blocks/image.png"
+
+---
+
+- match rule "res://scenes/blocks/\*\*/images/"
+- replace rule "res://scenes/blocks/$1/images/editorBar.png||res://scenes/blocks/$1/images/1.png||res://scenes/blocks/$1/images/unpressed.png||res://scenes/blocks/$1/images/ghost.png"
+ - when match rule matches "res://scenes/blocks/block1/images/"
+ - tries to load image from "res://scenes/blocks/block1/images/editorBar.png"
+ - if not successful tries to load image from "res://scenes/blocks/block1/images/1.png"
+ - if not successful tries to load image from "res://scenes/blocks/block1/images/unpressed.png"
+ - if not successful tries to load image from "res://scenes/blocks/block1/images/ghost.png"
+ - if not successful logs an error
+
+---
+
+if one replace rule fails, if the file is not found, to match the errors are saved and only shown if no later replace rules match.
+
+## settings
+
+- textureAppliesToNestedFolders
+
+## todo
+
+- add support for more than one \*\* per match rule
+- add support for test\* to mean folder starting with test
### File System Preview
@@ -18,7 +63,8 @@ In the godot file system, press RMB (right click) on any folder/file you want to

-# Special Thanks 📜
+# Special Thanks 📜
+
This section lists users who have contributed to improving the quality of this project.
[@Lerpwave](https://github.com/Lerpwave)
diff --git a/addons/fancy_folder_icons/ZoomMore.svg b/addons/fancy_folder_icons/ZoomMore.svg
index a6dda35..63250ed 100644
--- a/addons/fancy_folder_icons/ZoomMore.svg
+++ b/addons/fancy_folder_icons/ZoomMore.svg
@@ -1 +1 @@
-
+
\ No newline at end of file
diff --git a/addons/fancy_folder_icons/ZoomMore.svg.import b/addons/fancy_folder_icons/ZoomMore.svg.import
index 5ae33a5..9ded751 100644
--- a/addons/fancy_folder_icons/ZoomMore.svg.import
+++ b/addons/fancy_folder_icons/ZoomMore.svg.import
@@ -2,7 +2,7 @@
importer="texture"
type="CompressedTexture2D"
-uid="uid://blssopgxxr688"
+uid="uid://cauvpy3qi5d0r"
path="res://.godot/imported/ZoomMore.svg-9285dc7b7b612cd8cd72dec673436c34.ctex"
metadata={
"vram_texture": false
diff --git a/addons/fancy_folder_icons/menu_fancy.gd b/addons/fancy_folder_icons/menu_fancy.gd
index 8e429b0..4c286a1 100644
--- a/addons/fancy_folder_icons/menu_fancy.gd
+++ b/addons/fancy_folder_icons/menu_fancy.gd
@@ -1,39 +1,39 @@
@tool
extends EditorContextMenuPlugin
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-# Fancy Folder Icons
+# Fancy Folder Icons
#
-# Folder Icons addon for addon godot 4
-# https://github.com/CodeNameTwister/Fancy-Folder-Icons
-# author: "Twister"
+# Folder Icons addon for addon godot 4
+# https://github.com/CodeNameTwister/Fancy-Folder-Icons
+# author: "Twister"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#region godotengine_repository_icons
-const ICON : Texture = preload("res://addons/fancy_folder_icons/ZoomMore.svg")
+const ICON: Texture = preload("res://addons/fancy_folder_icons/ZoomMore.svg")
#endregion
-signal iconize_paths(path : Variant)
+signal iconize_paths(path: Variant)
func _popup_menu(paths: PackedStringArray) -> void:
- var _process : bool = false
- for p : String in paths:
- if FileAccess.file_exists(p) or DirAccess.dir_exists_absolute(p):
- # The translation in tool mode doesn't seem to work at the moment, I'll leave the code anyway.
- var locale : String = OS.get_locale_language()
- var translation: Translation = TranslationServer.get_translation_object(locale)
- add_context_menu_item("{0} {1}".format([_get_tr(translation,&"Custom"), _get_tr(translation,&"Icon")]).capitalize(), _on_pick_cmd.bind(paths), ICON)
- break
+ var _process: bool = false
+ for p: String in paths:
+ if FileAccess.file_exists(p) or DirAccess.dir_exists_absolute(p):
+ # The translation in tool mode doesn't seem to work at the moment, I'll leave the code anyway.
+ var locale: String = OS.get_locale_language()
+ var translation: Translation = TranslationServer.get_translation_object(locale)
+ add_context_menu_item("{0} {1}".format([_get_tr(translation, &"Custom"), _get_tr(translation, &"Icon")]).capitalize(), _on_pick_cmd.bind(paths), ICON)
+ break
# v4.5.beta1.official [46c495ca2] Error, not receive arg0 values.
-func _on_pick_cmd(arg0 : Variant, arg1_fallvar : Variant = null) -> void:
- if arg0 is PackedStringArray and arg0.size() > 0:
- iconize_paths.emit(arg0)
- elif arg1_fallvar is PackedStringArray and arg1_fallvar.size() > 0:
- iconize_paths.emit(arg1_fallvar)
-
-func _get_tr(translation : Translation, msg : StringName) -> StringName:
- if translation == null:
- return msg
- var new_msg : StringName = translation.get_message(msg)
- if new_msg.is_empty():
- return msg
- return new_msg
+func _on_pick_cmd(arg0: Variant, arg1_fallvar: Variant = null) -> void:
+ if arg0 is PackedStringArray and arg0.size() > 0:
+ iconize_paths.emit(arg0)
+ elif arg1_fallvar is PackedStringArray and arg1_fallvar.size() > 0:
+ iconize_paths.emit(arg1_fallvar)
+
+func _get_tr(translation: Translation, msg: StringName) -> StringName:
+ if translation == null:
+ return msg
+ var new_msg: StringName = translation.get_message(msg)
+ if new_msg.is_empty():
+ return msg
+ return new_msg
diff --git a/addons/fancy_folder_icons/plugin.gd b/addons/fancy_folder_icons/plugin.gd
index 4f0d6a4..40926b6 100644
--- a/addons/fancy_folder_icons/plugin.gd
+++ b/addons/fancy_folder_icons/plugin.gd
@@ -1,340 +1,463 @@
@tool
extends EditorPlugin
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-# Fancy Folder Icons
+# Fancy Folder Icons
#
-# Folder Icons addon for addon godot 4
-# https://github.com/CodeNameTwister/Fancy-Folder-Icons
-# author: "Twister"
+# Folder Icons addon for addon godot 4
+# https://github.com/CodeNameTwister/Fancy-Folder-Icons
+# author: "Twister"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-const DOT_USER : String = "user://editor/fancy_folder_icons.dat"
+const DOT_USER: String = "user://editor/fancy_folder_icons.dat"
+const RULES_FILE = "user://fancy_folder_icons_rules.json"
+var largeIconCache := {}
+var smallIconCache := {}
+var rules: Dictionary = {}
-var _buffer : Dictionary = {}
-var _tree : Tree = null
-var _busy : bool = false
+var _buffer: Dictionary = {}
+var _tree: Tree = null
+var _busy: bool = false
-var _menu_service : EditorContextMenuPlugin = null
-var _popup : Window = null
+var _menu_service: EditorContextMenuPlugin = null
+var _popup: Window = null
-var _tchild : TreeItem = null
-var _tdelta : int = 0
+var _tchild: TreeItem = null
+var _tdelta: int = 0
-var _docky : Docky = null
+var _docky: Docky = null
-var size : Vector2 = Vector2(12.0, 12.0)
+var size: Vector2 = Vector2(12.0, 12.0)
-var _is_saving : bool = false
+var _is_saving: bool = false
+var textureAppliesToNestedFolders := true
func get_buffer() -> Dictionary:
- return _buffer
+ var buffer = _buffer
+ for key in rules:
+ buffer[key] = rules[key]
+ return buffer
class Docky extends RefCounted:
- var drawing : bool = false
- var dock : ItemList = null
-
- var plugin : Object = null
-
- func _init(set_plugin : Object) -> void:
- plugin = set_plugin
-
- func update_icons() -> void:
- if !dock:
- return
- var buffer : Dictionary = plugin.get_buffer()
- var mt : Dictionary = {}
-
- for x : int in dock.item_count:
- var data : String = str(dock.get_item_metadata(x))
- mt[data] = [x, 0]
-
- for key : String in buffer.keys():
- for m : String in mt.keys():
- if m == key:
- mt[m][1] = m.length() + 1
- dock.set_item_icon(mt[m][0], buffer[key])
-
- elif m.get_extension().is_empty() and m.begins_with(key):
- var l : int = key.length()
- if mt[m][1] < l:
- mt[m][1] = l
- dock.set_item_icon(mt[m][0], buffer[key])
- _dispose.call_deferred()
- return
-
- func _dispose() -> void:
- var o : Variant = self
- for __ : int in range(2):
- await Engine.get_main_loop().process_frame
- if is_instance_valid(o):
- o.set_deferred(&"drawing", false)
-
- func _on_change() -> void:
- if drawing:
- return
- drawing = true
- update_icons.call_deferred()
-
- func update(new_dock : ItemList) -> void:
- dock = new_dock
-
- if !dock.draw.is_connected(_on_change):
- dock.draw.connect(_on_change)
-
- #if dock.item_count > 0:
- #var icon : Texture2D = dock.get_item_icon(0)
+ var drawing: bool = false
+ var dock: ItemList = null
+
+ var plugin: Object = null
+
+ func _init(set_plugin: Object) -> void:
+ plugin = set_plugin
+
+ func update_icons() -> void:
+ if !dock: return
+ var buffer: Dictionary = plugin.get_buffer()
+ var mt: Dictionary = {}
+
+ for x: int in dock.item_count:
+ var data: String = str(dock.get_item_metadata(x))
+ mt[data] = [x, 0]
+ # log.pp(mt, buffer)
+ for m: String in mt.keys():
+ for key: String in buffer.keys():
+ if plugin.matches(key, m, buffer[key]):
+ # log.pp("matched", key, m, buffer[key])
+ if buffer[key] is ImageTexture:
+ mt[m][1] = m.length() + 1
+ dock.set_item_icon(mt[m][0], buffer[key])
+ break
+ else:
+ var tx: Texture2D
+ var texture_path = plugin.matches(key, m, buffer[key])
+ if texture_path in plugin.largeIconCache:
+ tx = plugin.largeIconCache[texture_path]
+ else:
+ tx = load(texture_path)
+ var img: Image = tx.get_image()
+ mt[m][1] = m.length() + 1
+ img.resize(int(plugin.size.x) * 4, int(plugin.size.y) * 4)
+ tx = ImageTexture.create_from_image(img)
+ dock.set_item_icon(mt[m][0], tx)
+ break
+ _dispose.call_deferred()
+ return
+
+ func _dispose() -> void:
+ var o: Variant = self
+ for __: int in range(2):
+ await Engine.get_main_loop().process_frame
+ if is_instance_valid(o):
+ o.set_deferred(&"drawing", false)
+
+ func _on_change() -> void:
+ if drawing: return
+ drawing = true
+ update_icons.call_deferred()
+
+ func update(new_dock: ItemList) -> void:
+ dock = new_dock
+
+ if !dock.draw.is_connected(_on_change):
+ dock.draw.connect(_on_change)
+
+ #if dock.item_count > 0:
+ #var icon : Texture2D = dock.get_item_icon(0)
func _setup() -> void:
- var dir : String = DOT_USER.get_base_dir()
- if !DirAccess.dir_exists_absolute(dir):
- DirAccess.make_dir_recursive_absolute(dir)
- return
- if FileAccess.file_exists(DOT_USER):
- var cfg : ConfigFile = ConfigFile.new()
- if OK != cfg.load(DOT_USER):return
- _buffer = cfg.get_value("DAT", "PTH", {})
+ var dir: String = DOT_USER.get_base_dir()
+ if !DirAccess.dir_exists_absolute(dir):
+ DirAccess.make_dir_recursive_absolute(dir)
+ return
+ if FileAccess.file_exists(DOT_USER):
+ var cfg: ConfigFile = ConfigFile.new()
+ if OK != cfg.load(DOT_USER): return
+ _buffer = cfg.get_value("DAT", "PTH", {})
func _quick_save() -> void:
- if FileAccess.file_exists(DOT_USER):
- var cfg : ConfigFile = ConfigFile.new()
- if OK != cfg.load(DOT_USER):return
- cfg.set_value("DAT", "PTH", _buffer)
- cfg = null
- set_deferred(&"_is_saving" , false)
+ if FileAccess.file_exists(DOT_USER):
+ var cfg: ConfigFile = ConfigFile.new()
+ if OK != cfg.load(DOT_USER): return
+ cfg.set_value("DAT", "PTH", _buffer)
+ cfg = null
+ set_deferred(&"_is_saving", false)
#region callbacks
-func _moved_callback(a0 : String, b0 : String ) -> void:
- if a0 != b0:
- if _buffer.has(a0):
- _buffer[b0] = _buffer[a0]
- _buffer.erase(a0)
- save_queue()
-
-func _remove_callback(path : String) -> void:
- if _buffer.has(path):
- _buffer.erase(path)
- save_queue()
+func _moved_callback(a0: String, b0: String) -> void:
+ if a0 != b0:
+ if _buffer.has(a0):
+ _buffer[b0] = _buffer[a0]
+ _buffer.erase(a0)
+ save_queue()
+
+func _remove_callback(path: String) -> void:
+ if _buffer.has(path):
+ _buffer.erase(path)
+ save_queue()
#endregion
func _def_update() -> void:
- update.call_deferred()
+ update.call_deferred()
func update() -> void:
- if _buffer.size() == 0:return
- if _busy:return
- _busy = true
- var root : TreeItem = _tree.get_root()
- var item : TreeItem = root.get_first_child()
-
- while null != item and item.get_metadata(0) != "res://":
- item = item.get_next()
-
- if _enable_icons_on_split:
- var dock : ItemList = get_docky()
- if dock:
- if !is_instance_valid(_docky):
- _docky = Docky.new(self)
- _docky.update(dock)
- elif is_instance_valid(_docky):
- _docky = null
- elif is_instance_valid(_docky):
- _docky = null
-
- _explore(item)
-
- if is_instance_valid(_docky):
- _docky.update_icons()
-
- set_deferred(&"_busy", false)
-
-func _explore(item : TreeItem, texture : Texture2D = null, as_root : bool = true) -> void:
- var meta : String = str(item.get_metadata(0))
- if _buffer.has(meta):
- texture = _buffer[meta]
- as_root = true
-
- if texture != null:
- if as_root or !FileAccess.file_exists(meta):
- item.set_icon(0, texture)
-
- for i : TreeItem in item.get_children():
- _explore(i, texture, false)
+ # if _buffer.size() == 0: return
+ if _busy: return
+ _busy = true
+ var root: TreeItem = _tree.get_root()
+ var item: TreeItem = root.get_first_child()
+
+ while null != item and item.get_metadata(0) != "res://":
+ item = item.get_next()
+
+ if _enable_icons_on_split:
+ var dock: ItemList = get_docky()
+ if dock:
+ if !is_instance_valid(_docky):
+ _docky = Docky.new(self )
+ _docky.update(dock)
+ elif is_instance_valid(_docky):
+ _docky = null
+ elif is_instance_valid(_docky):
+ _docky = null
+
+ _explore(item)
+
+ if is_instance_valid(_docky):
+ _docky.update_icons()
+
+ set_deferred(&"_busy", false)
+
+func matches(key, item, retval):
+ if key == item:
+ return retval
+ var splitKey: Array = (key.split("/") as Array).filter(func(e): return e)
+ var splitItem: Array = (item.split("/") as Array).filter(func(e): return e)
+ if len(splitItem) < len(splitKey):
+ return false
+
+ var itemrep: Array[String] = []
+ var splitKeyIdx = -1
+ var splitItemIdx = -1
+ while splitItemIdx + 1 < len(splitItem):
+ splitKeyIdx += 1
+ splitItemIdx += 1
+ if splitItemIdx >= len(splitItem) or splitKeyIdx >= len(splitKey):
+ # log.pp("len ", key, item, retval, "splitItemIdx ", splitItemIdx, "splitKeyIdx", splitKeyIdx)
+ return false
+ if splitKey[splitKeyIdx] == splitItem[splitItemIdx]: continue
+ if splitKey[splitKeyIdx][0] == '$':
+ var num := int(splitKey[splitKeyIdx].substr(1, -1))
+ if num in itemrep: continue
+ if splitKey[splitKeyIdx] == '**':
+ var v = ""
+ var extra = 1 + (len(splitItem) - len(splitKey))
+ for ii in range(splitItemIdx, splitItemIdx + extra):
+ v += '/' + splitItem[ii]
+ itemrep.append(v.substr(1))
+ # log.pp((len(splitItem) - len(splitKey)), splitItem, v, itemrep, key, item, extra, "extra!!")
+ splitItemIdx += extra - 1
+ continue
+
+ if splitKey[splitKeyIdx] == '*':
+ itemrep.append(splitItem[splitItemIdx])
+ continue
+ return false
+ # log.pp("result:", itemrep, splitKey, splitItem, key, item, retval)
+ var newRetVal = []
+ for pospath in (retval.split("||") as Array).map(func(e): return e.split("/")):
+ newRetVal.append([])
+ for part in pospath:
+ var found = false
+ for ii in range(0, len(itemrep)):
+ if part == "$" + str(ii + 1):
+ newRetVal[len(newRetVal) - 1].append(itemrep[ii])
+ found = true
+ break
+ if !found:
+ newRetVal[len(newRetVal) - 1].append(part)
+ newRetVal = newRetVal.map(func(e): return "/".join(e))
+ for path in newRetVal:
+ if FileAccess.file_exists(path):
+ return path
+ errQueue.append([newRetVal, " does not exist, ITEM:", item])
+ return false
+var errQueue = []
+func _explore(item: TreeItem, texture: Texture2D = null, as_root: bool = true) -> void:
+ var buffer = get_buffer()
+ var meta: String = str(item.get_metadata(0))
+ if buffer.has(meta) and buffer[meta] is Texture2D:
+ texture = buffer[meta]
+ as_root = true
+ if !textureAppliesToNestedFolders:
+ texture = null
+ errQueue = []
+ for key in buffer:
+ if matches(key, meta, buffer[key]):
+ if buffer[key] is ImageTexture:
+ texture = buffer[key]
+ continue
+
+ var tx: Texture2D
+ var texture_path = matches(key, meta, buffer[key])
+ if texture_path in smallIconCache:
+ tx = smallIconCache[texture_path]
+ else:
+ tx = load(texture_path)
+ var img: Image = tx.get_image()
+ img.resize(int(size.x), int(size.y))
+ tx = ImageTexture.create_from_image(img)
+ texture = tx
+ errQueue = []
+ break
+ if errQueue:
+ for err in errQueue:
+ log.err(err)
+
+ if texture != null:
+ if as_root or !FileAccess.file_exists(meta):
+ item.set_icon(0, texture)
+
+ for i: TreeItem in item.get_children():
+ _explore(i, texture, false)
func _get_dummy_tree_node() -> void:
- set_physics_process(false)
- var root : TreeItem = _tree.get_root()
- if root:
- _tchild = root.get_first_child()
- if is_instance_valid(_tchild):
- var icon_size : Texture2D = _tchild.get_icon(0)
- if icon_size:
- size = icon_size.get_size()
- set_physics_process(true)
-
-func _on_select_texture(tx : Texture2D, texture_path : String, paths : PackedStringArray) -> void:
- if tx.get_size() != size:
- print("Image selected '", texture_path.get_file(), "' size: ", tx.get_size(), " resized to ", size.x, "x", size.y)
- var img : Image = tx.get_image()
- img.resize(int(size.x), int(size.y))
- tx = ImageTexture.create_from_image(img)
- for p : String in paths:
- _buffer[p] = tx
- _def_update()
- save_queue()
+ set_physics_process(false)
+ var root: TreeItem = _tree.get_root()
+ if root:
+ _tchild = root.get_first_child()
+ if is_instance_valid(_tchild):
+ var icon_size: Texture2D = _tchild.get_icon(0)
+ if icon_size:
+ size = icon_size.get_size()
+ set_physics_process(true)
+
+func _on_select_texture(tx: Texture2D, texture_path: String, paths: PackedStringArray) -> void:
+ if tx.get_size() != size:
+ print("Image selected '", texture_path.get_file(), "' size: ", tx.get_size(), " resized to ", size.x, "x", size.y)
+ var img: Image = tx.get_image()
+ img.resize(int(size.x), int(size.y))
+ tx = ImageTexture.create_from_image(img)
+ for p: String in paths:
+ _buffer[p] = tx
+ _def_update()
+ save_queue()
func save_queue() -> void:
- if _is_saving:
- return
- _is_saving = true
- _quick_save.call_deferred()
-
-func _on_reset_texture(paths : PackedStringArray) -> void:
- for p : String in paths:
- if _buffer.has(p):
- _buffer.erase(p)
- var fs : EditorFileSystem = EditorInterface.get_resource_filesystem()
- if fs: fs.filesystem_changed.emit()
-
-func _on_iconize(paths : PackedStringArray) -> void:
- const PATH : String = "res://addons/fancy_folder_icons/scene/icon_selector.tscn"
- var pop : Window = get_node_or_null("_POP_ICONIZER_")
- if pop == null:
- pop = (ResourceLoader.load(PATH) as PackedScene).instantiate()
- pop.name = "_POP_ICONIZER_"
- pop.plugin = self
- add_child(pop)
- if pop.on_set_texture.is_connected(_on_select_texture):
- pop.on_set_texture.disconnect(_on_select_texture)
- if pop.on_reset_texture.is_connected(_on_reset_texture):
- pop.on_reset_texture.disconnect(_on_reset_texture)
- pop.on_set_texture.connect(_on_select_texture.bind(paths))
- pop.on_reset_texture.connect(_on_reset_texture.bind(paths))
- pop.popup_centered()
+ if _is_saving: return
+ _is_saving = true
+ _quick_save.call_deferred()
+
+func _on_reset_texture(paths: PackedStringArray) -> void:
+ for p: String in paths:
+ if _buffer.has(p):
+ _buffer.erase(p)
+ var fs: EditorFileSystem = EditorInterface.get_resource_filesystem()
+ if fs: fs.filesystem_changed.emit()
+
+func _on_iconize(paths: PackedStringArray) -> void:
+ const PATH: String = "res://addons/fancy_folder_icons/scene/icon_selector.tscn"
+ var pop: Window = get_node_or_null("_POP_ICONIZER_")
+ if pop == null:
+ pop = (ResourceLoader.load(PATH) as PackedScene).instantiate()
+ pop.name = "_POP_ICONIZER_"
+ pop.plugin = self
+ add_child(pop)
+ if pop.on_set_texture.is_connected(_on_select_texture):
+ pop.on_set_texture.disconnect(_on_select_texture)
+ if pop.on_reset_texture.is_connected(_on_reset_texture):
+ pop.on_reset_texture.disconnect(_on_reset_texture)
+ pop.on_set_texture.connect(_on_select_texture.bind(paths))
+ pop.on_reset_texture.connect(_on_reset_texture.bind(paths))
+ pop.popup_centered()
func get_docky() -> ItemList:
- var out : ItemList = null
- var dock : Control = EditorInterface.get_file_system_dock()
- if dock:
- out = dock.find_child("*FileSystemList*", true, false)
- return out
-
-
+ var out: ItemList = null
+ var dock: Control = EditorInterface.get_file_system_dock()
+ if dock:
+ out = dock.find_child("*FileSystemList*", true, false)
+ return out
+
func _ready() -> void:
- set_physics_process(false)
- var dock : FileSystemDock = EditorInterface.get_file_system_dock()
- var fs : EditorFileSystem = EditorInterface.get_resource_filesystem()
- _n(dock)
-
- _get_dummy_tree_node()
+ set_physics_process(false)
+ var dock: FileSystemDock = EditorInterface.get_file_system_dock()
+ var fs: EditorFileSystem = EditorInterface.get_resource_filesystem()
+ _n(dock)
- add_context_menu_plugin(EditorContextMenuPlugin.CONTEXT_SLOT_FILESYSTEM, _menu_service)
+ _get_dummy_tree_node()
- dock.files_moved.connect(_moved_callback)
- dock.folder_moved.connect(_moved_callback)
- dock.folder_removed.connect(_remove_callback)
- dock.file_removed.connect(_remove_callback)
- dock.folder_color_changed.connect(_def_update)
- fs.filesystem_changed.connect(_def_update)
+ add_context_menu_plugin(EditorContextMenuPlugin.CONTEXT_SLOT_FILESYSTEM, _menu_service)
- _def_update()
+ dock.files_moved.connect(_moved_callback)
+ dock.folder_moved.connect(_moved_callback)
+ dock.folder_removed.connect(_remove_callback)
+ dock.file_removed.connect(_remove_callback)
+ dock.folder_color_changed.connect(_def_update)
+ fs.filesystem_changed.connect(_def_update)
+ _def_update()
+
+var _enable_icons_on_split: bool = true
-var _enable_icons_on_split : bool = true
func _enter_tree() -> void:
- _setup()
-
- _menu_service = ResourceLoader.load("res://addons/fancy_folder_icons/menu_fancy.gd").new()
- _menu_service.iconize_paths.connect(_on_iconize)
-
- var vp : Viewport = Engine.get_main_loop().root
- vp.focus_entered.connect(_on_wnd)
- vp.focus_exited.connect(_out_wnd)
-
- var editor : EditorSettings = EditorInterface.get_editor_settings()
- if editor:
- editor.settings_changed.connect(_on_change_settings)
- if !editor.has_setting("plugin/fancy_folder_icons/enable_icons_on_split"):
- editor.set_setting("plugin/fancy_folder_icons/enable_icons_on_split", true)
- else:
- _enable_icons_on_split = editor.get_setting("plugin/fancy_folder_icons/enable_icons_on_split")
+ _setup()
+
+ _menu_service = ResourceLoader.load("res://addons/fancy_folder_icons/menu_fancy.gd").new()
+ _menu_service.iconize_paths.connect(_on_iconize)
+
+ var vp: Viewport = Engine.get_main_loop().root
+ vp.focus_entered.connect(_on_wnd)
+ vp.focus_exited.connect(_out_wnd)
+
+ var editor: EditorSettings = EditorInterface.get_editor_settings()
+ if editor:
+ editor.settings_changed.connect(_on_change_settings)
+ if !editor.has_setting("plugin/fancy_folder_icons/enable_icons_on_split"):
+ editor.set_setting("plugin/fancy_folder_icons/enable_icons_on_split", true)
+ else:
+ _enable_icons_on_split = editor.get_setting("plugin/fancy_folder_icons/enable_icons_on_split")
+ ProjectSettings.set_setting("plugin/fancy_folder_icons/openRules", false)
+ ProjectSettings.settings_changed.connect(_on_change_settings)
+ var temp = JSON.parse_string(FileAccess.get_file_as_string(RULES_FILE))
+ if FileAccess.file_exists(RULES_FILE):
+ if temp and "rules" in temp:
+ rules = temp.rules
+ if FileAccess.file_exists(RULES_FILE):
+ if temp and "textureAppliesToNestedFolders" in temp:
+ textureAppliesToNestedFolders = temp.textureAppliesToNestedFolders
+ ProjectSettings.set_setting("plugin/fancy_folder_icons/rules", rules)
+ ProjectSettings.set_setting("plugin/fancy_folder_icons/textureAppliesToNestedFolders", textureAppliesToNestedFolders)
+ var property_info = {
+ "name": "plugin/fancy_folder_icons/rules",
+ "type": TYPE_DICTIONARY,
+ "hint": PROPERTY_HINT_DICTIONARY_TYPE,
+ "hint_string": (
+ "%d/%d:*" % [TYPE_STRING, PROPERTY_HINT_DIR]
+ +";" +
+ "%d/%d:%s" % [TYPE_STRING, PROPERTY_HINT_FILE_PATH, "*.png,*.jpg,*.jpeg,*.gif,*.svg,*.bmp,*.tga,*.webp"]
+ )
+ }
+ # log.pp(property_info.hint_string)
+
+ ProjectSettings.add_property_info(property_info)
func _on_change_settings() -> void:
- var editor : EditorSettings = EditorInterface.get_editor_settings()
- if editor:
- var settings : PackedStringArray = editor.get_changed_settings()
- if "plugin/fancy_folder_icons/enable_icons_on_split" in settings:
- _enable_icons_on_split = editor.get_setting("plugin/fancy_folder_icons/enable_icons_on_split")
-
+ var editor: EditorSettings = EditorInterface.get_editor_settings()
+ if editor:
+ var settings: PackedStringArray = editor.get_changed_settings()
+ if "plugin/fancy_folder_icons/enable_icons_on_split" in settings:
+ _enable_icons_on_split = editor.get_setting("plugin/fancy_folder_icons/enable_icons_on_split")
+ rules = ProjectSettings.get_setting("plugin/fancy_folder_icons/rules", {})
+ textureAppliesToNestedFolders = ProjectSettings.get_setting("plugin/fancy_folder_icons/textureAppliesToNestedFolders", true)
+ FileAccess.open(RULES_FILE, FileAccess.WRITE_READ).store_string(JSON.stringify({"rules": rules, "textureAppliesToNestedFolders": textureAppliesToNestedFolders}, " "))
+ if ProjectSettings.get_setting("plugin/fancy_folder_icons/openRules", false):
+ ProjectSettings.set_setting("plugin/fancy_folder_icons/openRules", false)
+ OS.shell_open(ProjectSettings.globalize_path(RULES_FILE))
+
func _exit_tree() -> void:
- if is_instance_valid(_popup):
- _popup.queue_free()
-
- if is_instance_valid(_menu_service):
- remove_context_menu_plugin(_menu_service)
-
- var dock : FileSystemDock = EditorInterface.get_file_system_dock()
- var fs : EditorFileSystem = EditorInterface.get_resource_filesystem()
- if dock.files_moved.is_connected(_moved_callback):
- dock.files_moved.disconnect(_moved_callback)
- if dock.folder_moved.is_connected(_moved_callback):
- dock.folder_moved.disconnect(_moved_callback)
- if dock.folder_removed.is_connected(_remove_callback):
- dock.folder_removed.disconnect(_remove_callback)
- if dock.file_removed.is_connected(_remove_callback):
- dock.file_removed.disconnect(_remove_callback)
- if dock.folder_color_changed.is_connected(_def_update):
- dock.folder_color_changed.disconnect(_def_update)
- if fs.filesystem_changed.is_connected(_def_update):
- fs.filesystem_changed.disconnect(_def_update)
-
- var editor : EditorSettings = EditorInterface.get_editor_settings()
- if editor:
- editor.settings_changed.disconnect(_on_change_settings)
-
-
- #region user_dat
- var cfg : ConfigFile = ConfigFile.new()
- for k : String in _buffer.keys():
- if !DirAccess.dir_exists_absolute(k) and !FileAccess.file_exists(k):
- _buffer.erase(k)
- continue
- cfg.set_value("DAT", "PTH", _buffer)
- if OK != cfg.save(DOT_USER):
- push_warning("Error on save HideFolders!")
- #endregion
-
- _menu_service = null
- _buffer.clear()
-
- if !fs.is_queued_for_deletion():
- fs.filesystem_changed.emit()
-
- var vp : Viewport = Engine.get_main_loop().root
- vp.focus_entered.disconnect(_on_wnd)
- vp.focus_exited.disconnect(_out_wnd)
-
-func _on_wnd() -> void:set_physics_process(true)
-func _out_wnd() -> void:set_physics_process(false)
+ if is_instance_valid(_popup):
+ _popup.queue_free()
+
+ if is_instance_valid(_menu_service):
+ remove_context_menu_plugin(_menu_service)
+
+ var dock: FileSystemDock = EditorInterface.get_file_system_dock()
+ var fs: EditorFileSystem = EditorInterface.get_resource_filesystem()
+ if dock.files_moved.is_connected(_moved_callback):
+ dock.files_moved.disconnect(_moved_callback)
+ if dock.folder_moved.is_connected(_moved_callback):
+ dock.folder_moved.disconnect(_moved_callback)
+ if dock.folder_removed.is_connected(_remove_callback):
+ dock.folder_removed.disconnect(_remove_callback)
+ if dock.file_removed.is_connected(_remove_callback):
+ dock.file_removed.disconnect(_remove_callback)
+ if dock.folder_color_changed.is_connected(_def_update):
+ dock.folder_color_changed.disconnect(_def_update)
+ if fs.filesystem_changed.is_connected(_def_update):
+ fs.filesystem_changed.disconnect(_def_update)
+
+ var editor: EditorSettings = EditorInterface.get_editor_settings()
+ if editor:
+ editor.settings_changed.disconnect(_on_change_settings)
+
+ #region user_dat
+ var cfg: ConfigFile = ConfigFile.new()
+ for k: String in _buffer.keys():
+ if !DirAccess.dir_exists_absolute(k) and !FileAccess.file_exists(k):
+ _buffer.erase(k)
+ continue
+ cfg.set_value("DAT", "PTH", _buffer)
+ if OK != cfg.save(DOT_USER):
+ push_warning("Error on save HideFolders!")
+ #endregion
+
+ _menu_service = null
+ _buffer.clear()
+
+ if !fs.is_queued_for_deletion():
+ fs.filesystem_changed.emit()
+
+ var vp: Viewport = Engine.get_main_loop().root
+ vp.focus_entered.disconnect(_on_wnd)
+ vp.focus_exited.disconnect(_out_wnd)
+
+func _on_wnd() -> void: set_physics_process(true)
+func _out_wnd() -> void: set_physics_process(false)
#region rescue_fav
-func _n(n : Node) -> bool:
- if n is Tree:
- var t : TreeItem = (n.get_root())
- if null != t:
- t = t.get_first_child()
- while t != null:
- if t.get_metadata(0) == "res://":
- _tree = n
- return true
- t = t.get_next()
- for x in n.get_children():
- if _n(x): return true
- return false
+func _n(n: Node) -> bool:
+ if n is Tree:
+ var t: TreeItem = (n.get_root())
+ if null != t:
+ t = t.get_first_child()
+ while t != null:
+ if t.get_metadata(0) == "res://":
+ _tree = n
+ return true
+ t = t.get_next()
+ for x in n.get_children():
+ if _n(x): return true
+ return false
#endregion
func _physics_process(_delta: float) -> void:
- _tdelta += 1
- if _tdelta > 60:
- _tdelta = 0
- if !is_instance_valid(_tchild):
- _get_dummy_tree_node()
- _def_update()
+ _tdelta += 1
+ if _tdelta > 60:
+ _tdelta = 0
+ if !is_instance_valid(_tchild):
+ _get_dummy_tree_node()
+ _def_update()
diff --git a/addons/fancy_folder_icons/samples/blog.png.import b/addons/fancy_folder_icons/samples/blog.png.import
index eb991b2..eb60369 100644
--- a/addons/fancy_folder_icons/samples/blog.png.import
+++ b/addons/fancy_folder_icons/samples/blog.png.import
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/blog.png-3ce6b23b3540e9c5163419c99f4ea4de.cte
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
+compress/uastc_level=0
+compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
+process/channel_remap/red=0
+process/channel_remap/green=1
+process/channel_remap/blue=2
+process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
diff --git a/addons/fancy_folder_icons/samples/cancel.png.import b/addons/fancy_folder_icons/samples/cancel.png.import
index 993a6a3..567020a 100644
--- a/addons/fancy_folder_icons/samples/cancel.png.import
+++ b/addons/fancy_folder_icons/samples/cancel.png.import
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/cancel.png-1a3b4f18d6174f61c7c2fea49f3d0775.c
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
+compress/uastc_level=0
+compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
+process/channel_remap/red=0
+process/channel_remap/green=1
+process/channel_remap/blue=2
+process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
diff --git a/addons/fancy_folder_icons/samples/cd.png.import b/addons/fancy_folder_icons/samples/cd.png.import
index 7b655c3..e47f375 100644
--- a/addons/fancy_folder_icons/samples/cd.png.import
+++ b/addons/fancy_folder_icons/samples/cd.png.import
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/cd.png-2a20fb8f14d71d5eba40af2282b65d24.ctex"
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
+compress/uastc_level=0
+compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
+process/channel_remap/red=0
+process/channel_remap/green=1
+process/channel_remap/blue=2
+process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
diff --git a/addons/fancy_folder_icons/samples/danger.png.import b/addons/fancy_folder_icons/samples/danger.png.import
index b76ebbe..79e4594 100644
--- a/addons/fancy_folder_icons/samples/danger.png.import
+++ b/addons/fancy_folder_icons/samples/danger.png.import
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/danger.png-1fa80d931ccec0bc16737f8803765fb6.c
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
+compress/uastc_level=0
+compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
+process/channel_remap/red=0
+process/channel_remap/green=1
+process/channel_remap/blue=2
+process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
diff --git a/addons/fancy_folder_icons/samples/database.png.import b/addons/fancy_folder_icons/samples/database.png.import
index 2d82d65..6f56c8e 100644
--- a/addons/fancy_folder_icons/samples/database.png.import
+++ b/addons/fancy_folder_icons/samples/database.png.import
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/database.png-6639c2fa8739ae254e7ef03960a0dc26
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
+compress/uastc_level=0
+compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
+process/channel_remap/red=0
+process/channel_remap/green=1
+process/channel_remap/blue=2
+process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
diff --git a/addons/fancy_folder_icons/samples/delete.png.import b/addons/fancy_folder_icons/samples/delete.png.import
index 856556b..3253169 100644
--- a/addons/fancy_folder_icons/samples/delete.png.import
+++ b/addons/fancy_folder_icons/samples/delete.png.import
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/delete.png-ab1fa9a00fa41c5fc59f5918f1edeff5.c
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
+compress/uastc_level=0
+compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
+process/channel_remap/red=0
+process/channel_remap/green=1
+process/channel_remap/blue=2
+process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
diff --git a/addons/fancy_folder_icons/samples/down.png.import b/addons/fancy_folder_icons/samples/down.png.import
index bd473a6..f77dd32 100644
--- a/addons/fancy_folder_icons/samples/down.png.import
+++ b/addons/fancy_folder_icons/samples/down.png.import
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/down.png-9408632598f757ad28b0533a0eb022f4.cte
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
+compress/uastc_level=0
+compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
+process/channel_remap/red=0
+process/channel_remap/green=1
+process/channel_remap/blue=2
+process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
diff --git a/addons/fancy_folder_icons/samples/good.png.import b/addons/fancy_folder_icons/samples/good.png.import
index 2d99fb2..6d8bf09 100644
--- a/addons/fancy_folder_icons/samples/good.png.import
+++ b/addons/fancy_folder_icons/samples/good.png.import
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/good.png-8cc712fcf9c12a71f1452756b7290260.cte
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
+compress/uastc_level=0
+compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
+process/channel_remap/red=0
+process/channel_remap/green=1
+process/channel_remap/blue=2
+process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
diff --git a/addons/fancy_folder_icons/samples/heart.png.import b/addons/fancy_folder_icons/samples/heart.png.import
index 276a1e0..1e378cd 100644
--- a/addons/fancy_folder_icons/samples/heart.png.import
+++ b/addons/fancy_folder_icons/samples/heart.png.import
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/heart.png-7b1b7c956dea13053b3f54697b74720c.ct
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
+compress/uastc_level=0
+compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
+process/channel_remap/red=0
+process/channel_remap/green=1
+process/channel_remap/blue=2
+process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
diff --git a/addons/fancy_folder_icons/samples/help.png.import b/addons/fancy_folder_icons/samples/help.png.import
index cfe6cc0..ce6e38f 100644
--- a/addons/fancy_folder_icons/samples/help.png.import
+++ b/addons/fancy_folder_icons/samples/help.png.import
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/help.png-3fa64c30fa268524e8bac49acc707d2e.cte
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
+compress/uastc_level=0
+compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
+process/channel_remap/red=0
+process/channel_remap/green=1
+process/channel_remap/blue=2
+process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
diff --git a/addons/fancy_folder_icons/samples/movie.png.import b/addons/fancy_folder_icons/samples/movie.png.import
index 04eb8a9..bfb4eff 100644
--- a/addons/fancy_folder_icons/samples/movie.png.import
+++ b/addons/fancy_folder_icons/samples/movie.png.import
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/movie.png-5e2c45a5207099e9cabe8053f60142b9.ct
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
+compress/uastc_level=0
+compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
+process/channel_remap/red=0
+process/channel_remap/green=1
+process/channel_remap/blue=2
+process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
diff --git a/addons/fancy_folder_icons/samples/music.png.import b/addons/fancy_folder_icons/samples/music.png.import
index dd6b122..0a73a15 100644
--- a/addons/fancy_folder_icons/samples/music.png.import
+++ b/addons/fancy_folder_icons/samples/music.png.import
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/music.png-e71bc62e80f5bc309da00c12685bdf3e.ct
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
+compress/uastc_level=0
+compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
+process/channel_remap/red=0
+process/channel_remap/green=1
+process/channel_remap/blue=2
+process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
diff --git a/addons/fancy_folder_icons/samples/next.png.import b/addons/fancy_folder_icons/samples/next.png.import
index 3d8e618..e4d56cd 100644
--- a/addons/fancy_folder_icons/samples/next.png.import
+++ b/addons/fancy_folder_icons/samples/next.png.import
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/next.png-ccea7a4dffc0a59d54735c7ea7dcddb9.cte
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
+compress/uastc_level=0
+compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
+process/channel_remap/red=0
+process/channel_remap/green=1
+process/channel_remap/blue=2
+process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
diff --git a/addons/fancy_folder_icons/samples/previous.png.import b/addons/fancy_folder_icons/samples/previous.png.import
index 707637e..193b685 100644
--- a/addons/fancy_folder_icons/samples/previous.png.import
+++ b/addons/fancy_folder_icons/samples/previous.png.import
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/previous.png-4ebce6e70e2eab8f92aae107b12bea64
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
+compress/uastc_level=0
+compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
+process/channel_remap/red=0
+process/channel_remap/green=1
+process/channel_remap/blue=2
+process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
diff --git a/addons/fancy_folder_icons/samples/save.png.import b/addons/fancy_folder_icons/samples/save.png.import
index 01fb8cf..bee3602 100644
--- a/addons/fancy_folder_icons/samples/save.png.import
+++ b/addons/fancy_folder_icons/samples/save.png.import
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/save.png-5a376869782345f739a55633a12200d7.cte
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
+compress/uastc_level=0
+compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
+process/channel_remap/red=0
+process/channel_remap/green=1
+process/channel_remap/blue=2
+process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
diff --git a/addons/fancy_folder_icons/scene/accept.gd b/addons/fancy_folder_icons/scene/accept.gd
index ebbfd1e..c807e71 100644
--- a/addons/fancy_folder_icons/scene/accept.gd
+++ b/addons/fancy_folder_icons/scene/accept.gd
@@ -1,39 +1,39 @@
@tool
extends Button
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-# Fancy Folder Icons
+# Fancy Folder Icons
#
-# Folder Icons addon for addon godot 4
-# https://github.com/CodeNameTwister/Fancy-Folder-Icons
-# author: "Twister"
+# Folder Icons addon for addon godot 4
+# https://github.com/CodeNameTwister/Fancy-Folder-Icons
+# author: "Twister"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
var _nx : Color = Color.YELLOW
var _delta : float = 0.0
func _process(delta: float) -> void:
- _delta += delta * 4.0
- if _delta >= 1.0:
- _delta = 0.0
- set(&"theme_override_colors/font_color", _nx)
- if _nx == Color.YELLOW:
- _nx = Color.DARK_GRAY
- else:
- _nx = Color.YELLOW
- return
- var c_color : Color = get(&"theme_override_colors/font_color")
- set(&"theme_override_colors/font_color", lerp(c_color, _nx, _delta))
+ _delta += delta * 4.0
+ if _delta >= 1.0:
+ _delta = 0.0
+ set(&"theme_override_colors/font_color", _nx)
+ if _nx == Color.YELLOW:
+ _nx = Color.DARK_GRAY
+ else:
+ _nx = Color.YELLOW
+ return
+ var c_color : Color = get(&"theme_override_colors/font_color")
+ set(&"theme_override_colors/font_color", lerp(c_color, _nx, _delta))
func _ready() -> void:
- set_process(false)
- disabled = true
- owner.enable_accept_changes_button.connect(_on_enable)
- set(&"theme_override_colors/font_color", Color.WHITE)
+ set_process(false)
+ disabled = true
+ owner.enable_accept_changes_button.connect(_on_enable)
+ set(&"theme_override_colors/font_color", Color.WHITE)
func _on_enable(e : bool) -> void:
- disabled = !e
- set_process(e)
- if !e:
- set(&"theme_override_colors/font_color", Color.WHITE)
+ disabled = !e
+ set_process(e)
+ if !e:
+ set(&"theme_override_colors/font_color", Color.WHITE)
func _on_pressed() -> void:
- owner.accept_changes()
+ owner.accept_changes()
diff --git a/addons/fancy_folder_icons/scene/icon_selector.gd b/addons/fancy_folder_icons/scene/icon_selector.gd
index 0d1db2b..e8ea900 100644
--- a/addons/fancy_folder_icons/scene/icon_selector.gd
+++ b/addons/fancy_folder_icons/scene/icon_selector.gd
@@ -1,11 +1,11 @@
@tool
extends Window
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-# Fancy Folder Icons
+# Fancy Folder Icons
#
-# Folder Icons addon for addon godot 4
-# https://github.com/CodeNameTwister/Fancy-Folder-Icons
-# author: "Twister"
+# Folder Icons addon for addon godot 4
+# https://github.com/CodeNameTwister/Fancy-Folder-Icons
+# author: "Twister"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
@export var texture_container : Control
@export var line_edit : LineEdit
@@ -25,77 +25,77 @@ var _path : String = ""
var plugin : Object = null
func get_icon_size() -> Vector2:
- if is_instance_valid(plugin):
- return plugin.size
- return Vector2(12.0, 12.0)
+ if is_instance_valid(plugin):
+ return plugin.size
+ return Vector2(12.0, 12.0)
func _call_reorder(tx : Texture) -> void:
- if texture_container:
- texture_container.reorder(tx)
+ if texture_container:
+ texture_container.reorder(tx)
func select_texture(tx: Texture2D, path : String) -> void:
- _selected = null
- _path = path
- if tx:
- line_edit.text = path
- _selected = tx
- _call_reorder(tx)
- _on_line_edit_text_changed(line_edit.text)
- return
- enable_accept_changes_button.emit(false)
+ _selected = null
+ _path = path
+ if tx:
+ line_edit.text = path
+ _selected = tx
+ _call_reorder(tx)
+ _on_line_edit_text_changed(line_edit.text)
+ return
+ enable_accept_changes_button.emit(false)
func accept_changes() -> void:
- _call_reorder(_selected)
- on_set_texture.emit(_selected, _path)
- hide.call_deferred()
+ _call_reorder(_selected)
+ on_set_texture.emit(_selected, _path)
+ hide.call_deferred()
func _ready() -> void:
- enable_accept_changes_button.emit(false)
+ enable_accept_changes_button.emit(false)
func close_requested() -> void:
- enable_accept_changes_button.emit(false)
- hide.call_deferred()
+ enable_accept_changes_button.emit(false)
+ hide.call_deferred()
func _on_close_requested() -> void:
- close_requested()
+ close_requested()
func _on_reset_pressed() -> void:
- on_reset_texture.emit()
- hide.call_deferred()
+ on_reset_texture.emit()
+ hide.call_deferred()
func _on_exit_pressed() -> void:
- close_requested()
+ close_requested()
func _on_go_back_requested() -> void:
- close_requested()
+ close_requested()
func _on_visibility_changed() -> void:
- line_edit.text = ""
- enable_accept_changes_button.emit(false)
- texture_container.enable_by_path("")
+ line_edit.text = ""
+ enable_accept_changes_button.emit(false)
+ texture_container.enable_by_path("")
- if !timer:return
- if !visible:
- timer.start(120)
- else:
- if !timer.is_stopped():
- timer.stop()
+ if !timer:return
+ if !visible:
+ timer.start(120)
+ else:
+ if !timer.is_stopped():
+ timer.stop()
func _on_line_edit_text_changed(path: String) -> void:
- enable_accept_changes_button.emit(line_edit.text.length() > 0)
- texture_container.enable_by_path(path)
+ enable_accept_changes_button.emit(line_edit.text.length() > 0)
+ texture_container.enable_by_path(path)
func _on_explore_pressed() -> void:
- if file_dialog and !file_dialog.visible:
- file_dialog.popup_centered()
+ if file_dialog and !file_dialog.visible:
+ file_dialog.popup_centered()
func _on_file_dialog_file_selected(path: String) -> void:
- if ResourceLoader.exists(path):
- var r : Resource = ResourceLoader.load(path)
- if r is Texture2D:
- select_texture(r, path)
+ if ResourceLoader.exists(path):
+ var r : Resource = ResourceLoader.load(path)
+ if r is Texture2D:
+ select_texture(r, path)
func _on_timer_timeout() -> void:
- name = "_qd"
- queue_free()
+ name = "_qd"
+ queue_free()
diff --git a/addons/fancy_folder_icons/scene/icon_selector.tscn b/addons/fancy_folder_icons/scene/icon_selector.tscn
index 7f5a1a2..4ddb7a5 100644
--- a/addons/fancy_folder_icons/scene/icon_selector.tscn
+++ b/addons/fancy_folder_icons/scene/icon_selector.tscn
@@ -1,22 +1,13 @@
-[gd_scene load_steps=21 format=3 uid="uid://xar82qpavxyl"]
+[gd_scene load_steps=30 format=3 uid="uid://xar82qpavxyl"]
[ext_resource type="Texture2D" uid="uid://cdofmex30bl3q" path="res://addons/fancy_folder_icons/samples/Folder.svg" id="1_wg60l"]
[ext_resource type="Script" uid="uid://b8j4rmn2s6wq8" path="res://addons/fancy_folder_icons/scene/icon_selector.gd" id="1_yibo6"]
[ext_resource type="Script" uid="uid://bgqshjvc1g8kv" path="res://addons/fancy_folder_icons/scene/textures_recent.gd" id="3_5niax"]
[ext_resource type="Script" uid="uid://up3jia7nmthd" path="res://addons/fancy_folder_icons/scene/accept.gd" id="4_3dosb"]
-[ext_resource type="Texture2D" uid="uid://bnfvsykjjsuf8" path="res://addons/fancy_folder_icons/samples/cd.png" id="4_ksxvb"]
[ext_resource type="Script" uid="uid://b7q0u066xrji6" path="res://addons/fancy_folder_icons/scene/texture_select.gd" id="5_ksxvb"]
-[ext_resource type="Texture2D" uid="uid://du7fun3cfkme4" path="res://addons/fancy_folder_icons/samples/database.png" id="5_nn354"]
-[ext_resource type="Texture2D" uid="uid://drkyf0wyc5ar8" path="res://addons/fancy_folder_icons/samples/heart.png" id="6_ksxvb"]
[ext_resource type="Texture2D" uid="uid://b3p3r3nqvqc6f" path="res://addons/fancy_folder_icons/samples/down.png" id="7_i8b63"]
[ext_resource type="Texture2D" uid="uid://11a0a61yelrx" path="res://addons/fancy_folder_icons/samples/danger.png" id="7_ksxvb"]
[ext_resource type="Texture2D" uid="uid://bqgh3qddsbjk3" path="res://addons/fancy_folder_icons/samples/good.png" id="8_c2fc4"]
-[ext_resource type="Texture2D" uid="uid://ce7vxbo46fr2r" path="res://addons/fancy_folder_icons/samples/help.png" id="9_wd0cm"]
-[ext_resource type="Texture2D" uid="uid://bnly2k6dpnygx" path="res://addons/fancy_folder_icons/samples/movie.png" id="10_e2bde"]
-[ext_resource type="Texture2D" uid="uid://det6omavcow6q" path="res://addons/fancy_folder_icons/samples/music.png" id="11_swef7"]
-[ext_resource type="Texture2D" uid="uid://dm7xog3v038c7" path="res://addons/fancy_folder_icons/samples/next.png" id="12_s3hb1"]
-[ext_resource type="Texture2D" uid="uid://dmpj5ely63fu2" path="res://addons/fancy_folder_icons/samples/previous.png" id="13_ri0hx"]
-[ext_resource type="Texture2D" uid="uid://camm6l6pbejlj" path="res://addons/fancy_folder_icons/samples/delete.png" id="16_ksxvb"]
[sub_resource type="Gradient" id="Gradient_5niax"]
offsets = PackedFloat32Array(0.570312, 1)
@@ -30,6 +21,114 @@ fill_from = Vector2(0.5, 0.5)
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_465he"]
texture = SubResource("GradientTexture2D_5fg00")
+[sub_resource type="Image" id="Image_40o3j"]
+data = {
+"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 204, 0, 0, 0, 192, 0, 0, 0, 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 216, 0, 1, 255, 212, 0, 0, 255, 188, 0, 0, 255, 164, 0, 0, 255, 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, 0, 0, 255, 214, 0, 0, 255, 190, 0, 2, 255, 154, 0, 0, 255, 156, 0, 1, 255, 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 175, 0, 0, 0, 176, 0, 0, 255, 176, 0, 0, 255, 0, 0, 0, 0, 175, 0, 0, 255, 176, 0, 0, 255, 178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, 0, 0, 0, 154, 0, 0, 255, 154, 0, 0, 255, 194, 0, 0, 255, 219, 0, 0, 255, 206, 0, 0, 255, 202, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 154, 0, 0, 0, 166, 0, 0, 255, 194, 0, 0, 255, 216, 1, 0, 255, 218, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 198, 0, 1, 0, 208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59, 59, 59, 255, 59, 59, 59, 255, 59, 59, 59, 255, 57, 57, 57, 255, 56, 56, 56, 255, 57, 57, 57, 255, 61, 61, 61, 255, 61, 61, 61, 255, 61, 61, 61, 255, 61, 61, 61, 255, 61, 61, 61, 255, 61, 61, 61, 255, 59, 59, 59, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 53, 53, 53, 255, 56, 56, 56, 255, 54, 54, 54, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255, 51, 51, 51, 255),
+"format": "RGBA8",
+"height": 12,
+"mipmaps": false,
+"width": 12
+}
+
+[sub_resource type="ImageTexture" id="ImageTexture_c3i4f"]
+image = SubResource("Image_40o3j")
+
+[sub_resource type="Image" id="Image_yq33t"]
+data = {
+"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 218, 0, 0, 255, 214, 0, 0, 255, 204, 0, 1, 255, 190, 0, 0, 255, 174, 0, 1, 255, 164, 0, 0, 255, 158, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 215, 0, 0, 255, 218, 0, 0, 255, 208, 0, 0, 255, 190, 0, 0, 255, 172, 0, 0, 255, 158, 0, 0, 255, 154, 0, 0, 255, 0, 0, 0, 0, 154, 0, 0, 0, 0, 0, 0, 0, 196, 0, 1, 255, 200, 0, 0, 255, 207, 1, 1, 255, 214, 0, 0, 255, 214, 0, 0, 255, 190, 1, 0, 255, 165, 0, 0, 255, 154, 0, 0, 255, 155, 0, 0, 255, 156, 0, 1, 255, 158, 0, 0, 255, 0, 0, 0, 0, 186, 0, 1, 255, 186, 1, 0, 255, 194, 0, 0, 255, 202, 0, 0, 255, 214, 0, 0, 255, 193, 1, 0, 255, 154, 0, 0, 255, 155, 1, 1, 255, 162, 0, 0, 255, 165, 0, 0, 255, 166, 0, 0, 255, 0, 0, 0, 0, 174, 0, 1, 255, 174, 0, 1, 255, 174, 0, 1, 255, 174, 0, 1, 255, 175, 0, 1, 0, 0, 0, 0, 0, 178, 0, 0, 255, 178, 0, 0, 255, 178, 0, 0, 255, 178, 0, 0, 255, 178, 0, 0, 255, 0, 0, 0, 0, 165, 0, 0, 255, 164, 0, 0, 255, 160, 0, 2, 255, 155, 0, 0, 255, 154, 0, 0, 255, 0, 0, 0, 0, 218, 0, 0, 255, 206, 0, 2, 255, 198, 0, 1, 255, 193, 0, 1, 255, 190, 0, 0, 255, 0, 0, 0, 0, 158, 0, 0, 255, 154, 0, 0, 255, 154, 0, 0, 255, 154, 0, 0, 255, 165, 0, 0, 255, 193, 0, 1, 255, 214, 0, 0, 255, 219, 0, 0, 255, 212, 0, 0, 255, 206, 0, 0, 255, 202, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 154, 0, 0, 255, 154, 0, 0, 255, 160, 0, 0, 255, 174, 0, 1, 255, 192, 0, 0, 255, 210, 0, 1, 255, 219, 1, 0, 255, 218, 0, 0, 255, 214, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 158, 0, 0, 255, 165, 0, 0, 255, 178, 0, 0, 255, 193, 1, 0, 255, 208, 0, 0, 255, 216, 1, 0, 255, 220, 0, 0, 255, 218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 193, 1, 0, 255, 204, 0, 1, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
+"format": "RGBA8",
+"height": 12,
+"mipmaps": false,
+"width": 12
+}
+
+[sub_resource type="ImageTexture" id="ImageTexture_44s4c"]
+image = SubResource("Image_yq33t")
+
+[sub_resource type="Image" id="Image_is8ms"]
+data = {
+"data": PackedByteArray(214, 160, 47, 234, 255, 220, 81, 255, 188, 20, 20, 255, 177, 16, 16, 255, 167, 15, 15, 255, 169, 25, 25, 255, 167, 37, 37, 174, 200, 25, 25, 255, 193, 25, 25, 255, 186, 25, 25, 255, 177, 25, 25, 255, 255, 204, 0, 255, 79, 43, 43, 225, 246, 223, 132, 255, 188, 20, 20, 255, 176, 15, 15, 255, 167, 15, 15, 255, 159, 15, 15, 255, 152, 22, 22, 174, 200, 25, 25, 255, 193, 25, 25, 255, 186, 25, 25, 255, 177, 25, 25, 255, 51, 51, 51, 255, 229, 192, 186, 225, 51, 51, 51, 255, 183, 15, 15, 255, 176, 15, 15, 255, 167, 15, 15, 255, 159, 15, 15, 255, 152, 22, 22, 174, 200, 25, 25, 255, 193, 25, 25, 255, 186, 25, 25, 255, 177, 25, 25, 255, 51, 51, 51, 255, 229, 181, 133, 225, 51, 51, 51, 255, 186, 0, 0, 255, 178, 0, 0, 255, 168, 9, 9, 255, 159, 15, 15, 255, 152, 22, 22, 174, 194, 0, 0, 255, 186, 0, 0, 255, 178, 0, 0, 255, 169, 0, 0, 255, 255, 209, 27, 255, 229, 167, 79, 223, 255, 222, 88, 255, 186, 0, 0, 255, 178, 0, 0, 255, 169, 0, 0, 255, 160, 0, 0, 255, 153, 0, 0, 165, 194, 0, 0, 255, 186, 0, 0, 255, 178, 0, 0, 255, 169, 0, 0, 255, 255, 220, 80, 255, 78, 38, 38, 223, 255, 207, 17, 255, 186, 0, 0, 255, 178, 0, 0, 255, 211, 127, 127, 255, 160, 0, 0, 255, 153, 0, 0, 165, 219, 103, 103, 254, 220, 127, 127, 255, 178, 0, 0, 255, 169, 0, 0, 255, 51, 51, 51, 255, 78, 38, 38, 223, 51, 51, 51, 255, 186, 0, 0, 255, 178, 0, 0, 255, 211, 127, 127, 255, 160, 0, 0, 255, 215, 155, 155, 209, 194, 0, 0, 255, 220, 127, 127, 255, 178, 0, 0, 255, 169, 0, 0, 255, 51, 51, 51, 255, 229, 151, 0, 223, 51, 51, 51, 255, 186, 0, 0, 255, 178, 0, 0, 255, 169, 0, 0, 255, 160, 0, 0, 255, 153, 0, 0, 165, 194, 0, 0, 255, 186, 0, 0, 255, 178, 0, 0, 255, 169, 0, 0, 255, 255, 240, 181, 255, 229, 151, 0, 223, 255, 204, 0, 255, 186, 0, 0, 255, 178, 0, 0, 255, 169, 0, 0, 255, 160, 0, 0, 255, 153, 0, 0, 165, 194, 0, 0, 255, 186, 0, 0, 255, 178, 0, 0, 255, 169, 0, 0, 255, 255, 225, 106, 255, 78, 38, 38, 223, 255, 204, 0, 255, 186, 0, 0, 255, 178, 0, 0, 255, 169, 0, 0, 255, 160, 0, 0, 255, 153, 0, 0, 165, 194, 0, 0, 255, 186, 0, 0, 255, 178, 0, 0, 255, 169, 0, 0, 255, 51, 51, 51, 255, 78, 38, 38, 223, 255, 204, 0, 255, 186, 0, 0, 255, 178, 0, 0, 255, 169, 0, 0, 255, 160, 0, 0, 255, 153, 0, 0, 165, 194, 0, 0, 255, 186, 0, 0, 255, 178, 0, 0, 255, 169, 0, 0, 255, 51, 51, 51, 255, 228, 151, 1, 224, 56, 56, 56, 255, 186, 0, 0, 255, 178, 0, 0, 255, 169, 0, 0, 255, 160, 0, 0, 255, 153, 0, 0, 165, 194, 0, 0, 255, 186, 0, 0, 255, 181, 20, 20, 255, 172, 20, 20, 255, 255, 204, 0, 255),
+"format": "RGBA8",
+"height": 12,
+"mipmaps": false,
+"width": 12
+}
+
+[sub_resource type="ImageTexture" id="ImageTexture_tjikb"]
+image = SubResource("Image_is8ms")
+
+[sub_resource type="Image" id="Image_nwwdh"]
+data = {
+"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 247, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 255, 255, 255, 255, 255, 255, 255, 75, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 1, 255, 255, 255, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 255, 255, 255, 2, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 255, 255, 255, 90, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 255, 255, 255, 185, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0),
+"format": "RGBA8",
+"height": 12,
+"mipmaps": false,
+"width": 12
+}
+
+[sub_resource type="ImageTexture" id="ImageTexture_tiswq"]
+image = SubResource("Image_nwwdh")
+
+[sub_resource type="Image" id="Image_nn354"]
+data = {
+"data": PackedByteArray(0, 255, 0, 204, 0, 255, 0, 153, 0, 255, 0, 153, 0, 255, 0, 153, 0, 255, 0, 153, 0, 255, 0, 153, 0, 255, 0, 153, 0, 255, 0, 153, 0, 255, 0, 153, 0, 255, 0, 153, 0, 255, 0, 153, 0, 255, 0, 153, 0, 255, 0, 153, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 153, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 153, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 153, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 153, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 153, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 153, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 153, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 153, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 153, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 153, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51, 0, 255, 0, 51),
+"format": "RGBA8",
+"height": 12,
+"mipmaps": false,
+"width": 12
+}
+
+[sub_resource type="ImageTexture" id="ImageTexture_ksxvb"]
+image = SubResource("Image_nn354")
+
+[sub_resource type="Image" id="Image_i8b63"]
+data = {
+"data": PackedByteArray(64, 87, 255, 59, 59, 59, 59, 59, 59, 56, 56, 56, 56, 56, 56, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 64, 87, 255, 59, 59, 59, 59, 59, 59, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 64, 87, 255, 80, 207, 255, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 80, 207, 255, 64, 87, 255, 51, 51, 51, 51, 51, 51, 51, 51, 51, 54, 54, 54, 56, 56, 56, 56, 56, 56, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 64, 87, 255, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 80, 207, 255, 64, 87, 255, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 64, 87, 255, 80, 207, 255, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 80, 207, 255, 64, 87, 255, 80, 207, 255, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 64, 87, 255, 80, 207, 255, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 80, 207, 255, 64, 87, 255, 80, 207, 255, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 80, 207, 255, 64, 87, 255, 80, 207, 255, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 80, 207, 255, 64, 87, 255, 80, 207, 255, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 59, 59, 59, 59, 59, 59, 59, 59, 59),
+"format": "RGB8",
+"height": 12,
+"mipmaps": false,
+"width": 12
+}
+
+[sub_resource type="ImageTexture" id="ImageTexture_c2fc4"]
+image = SubResource("Image_i8b63")
+
+[sub_resource type="Image" id="Image_wd0cm"]
+data = {
+"data": PackedByteArray(59, 59, 59, 59, 59, 59, 59, 59, 59, 56, 56, 56, 56, 56, 56, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 59, 59, 59, 59, 59, 59, 59, 59, 59, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 59, 59, 59, 59, 59, 59, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 59, 59, 59, 51, 51, 51, 51, 51, 51, 51, 51, 51, 54, 54, 54, 56, 56, 56, 56, 56, 56, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 59, 59, 59, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 59, 59, 59, 59, 59, 59, 59, 59, 59),
+"format": "RGB8",
+"height": 12,
+"mipmaps": false,
+"width": 12
+}
+
+[sub_resource type="ImageTexture" id="ImageTexture_e2bde"]
+image = SubResource("Image_wd0cm")
+
+[sub_resource type="Image" id="Image_swef7"]
+data = {
+"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 0, 51, 51, 51, 255, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 0, 51, 51, 51, 255, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 255, 0, 0, 0, 0, 51, 51, 51, 255, 0, 0, 0, 0, 51, 51, 51, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 255, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 255, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 51, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
+"format": "RGBA8",
+"height": 12,
+"mipmaps": false,
+"width": 12
+}
+
+[sub_resource type="ImageTexture" id="ImageTexture_s3hb1"]
+image = SubResource("Image_swef7")
+
+[sub_resource type="Image" id="Image_ri0hx"]
+data = {
+"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 32, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 218, 70, 70, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 207, 54, 54, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, 49, 49, 255, 128, 17, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 30, 30, 0, 197, 44, 44, 255, 140, 57, 57, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 204, 62, 62, 255, 191, 38, 38, 255, 181, 40, 40, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 199, 57, 57, 255, 186, 33, 33, 255, 186, 33, 33, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, 52, 52, 255, 181, 28, 28, 255, 181, 28, 28, 255, 124, 41, 41, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221, 33, 33, 0, 172, 22, 22, 255, 175, 22, 22, 255, 239, 216, 216, 255, 245, 239, 239, 255, 157, 157, 157, 17, 0, 0, 0, 30, 254, 254, 254, 238, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 183, 41, 41, 255, 167, 17, 17, 255, 170, 17, 17, 255, 219, 175, 175, 255, 117, 69, 69, 255, 0, 0, 0, 12, 0, 0, 0, 59, 0, 0, 0, 56, 251, 251, 251, 241, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 177, 35, 35, 255, 161, 11, 11, 255, 164, 11, 11, 255, 247, 238, 238, 255, 241, 237, 237, 255, 106, 13, 13, 3, 0, 0, 0, 57, 0, 0, 0, 54, 252, 252, 252, 240, 0, 0, 0, 6, 0, 0, 0, 0, 222, 33, 33, 0, 172, 30, 30, 255, 156, 6, 6, 255, 159, 6, 6, 255, 149, 46, 46, 255, 198, 136, 136, 255, 76, 17, 17, 165, 0, 0, 0, 50, 251, 251, 251, 241, 0, 0, 0, 55, 0, 0, 0, 2, 0, 0, 0, 0),
+"format": "RGBA8",
+"height": 12,
+"mipmaps": false,
+"width": 12
+}
+
+[sub_resource type="ImageTexture" id="ImageTexture_rh55y"]
+image = SubResource("Image_ri0hx")
+
[node name="IconSelector" type="Window" node_paths=PackedStringArray("texture_container", "line_edit", "file_dialog", "timer")]
oversampling_override = 1.0
title = "Choose Icon"
@@ -96,7 +195,7 @@ text = "Recents:"
[node name="Texture0" type="TextureRect" parent="PanelContainer/Container/VC/HC"]
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
-texture = ExtResource("4_ksxvb")
+texture = SubResource("ImageTexture_c3i4f")
expand_mode = 1
stretch_mode = 3
script = ExtResource("5_ksxvb")
@@ -104,7 +203,7 @@ script = ExtResource("5_ksxvb")
[node name="Texture1" type="TextureRect" parent="PanelContainer/Container/VC/HC"]
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
-texture = ExtResource("7_ksxvb")
+texture = SubResource("ImageTexture_44s4c")
expand_mode = 1
stretch_mode = 3
script = ExtResource("5_ksxvb")
@@ -112,7 +211,7 @@ script = ExtResource("5_ksxvb")
[node name="Texture2" type="TextureRect" parent="PanelContainer/Container/VC/HC"]
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
-texture = ExtResource("8_c2fc4")
+texture = SubResource("ImageTexture_tjikb")
expand_mode = 1
stretch_mode = 3
script = ExtResource("5_ksxvb")
@@ -120,7 +219,7 @@ script = ExtResource("5_ksxvb")
[node name="Texture3" type="TextureRect" parent="PanelContainer/Container/VC/HC"]
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
-texture = ExtResource("7_i8b63")
+texture = SubResource("ImageTexture_tiswq")
expand_mode = 1
stretch_mode = 3
script = ExtResource("5_ksxvb")
@@ -128,7 +227,7 @@ script = ExtResource("5_ksxvb")
[node name="Texture4" type="TextureRect" parent="PanelContainer/Container/VC/HC"]
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
-texture = ExtResource("6_ksxvb")
+texture = SubResource("ImageTexture_ksxvb")
expand_mode = 1
stretch_mode = 3
script = ExtResource("5_ksxvb")
@@ -136,7 +235,7 @@ script = ExtResource("5_ksxvb")
[node name="Texture5" type="TextureRect" parent="PanelContainer/Container/VC/HC"]
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
-texture = ExtResource("9_wd0cm")
+texture = SubResource("ImageTexture_c2fc4")
expand_mode = 1
stretch_mode = 3
script = ExtResource("5_ksxvb")
@@ -144,7 +243,7 @@ script = ExtResource("5_ksxvb")
[node name="Texture6" type="TextureRect" parent="PanelContainer/Container/VC/HC"]
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
-texture = ExtResource("10_e2bde")
+texture = SubResource("ImageTexture_e2bde")
expand_mode = 1
stretch_mode = 3
script = ExtResource("5_ksxvb")
@@ -152,7 +251,7 @@ script = ExtResource("5_ksxvb")
[node name="Texture7" type="TextureRect" parent="PanelContainer/Container/VC/HC"]
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
-texture = ExtResource("11_swef7")
+texture = SubResource("ImageTexture_s3hb1")
expand_mode = 1
stretch_mode = 3
script = ExtResource("5_ksxvb")
@@ -160,7 +259,7 @@ script = ExtResource("5_ksxvb")
[node name="Texture8" type="TextureRect" parent="PanelContainer/Container/VC/HC"]
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
-texture = ExtResource("12_s3hb1")
+texture = SubResource("ImageTexture_rh55y")
expand_mode = 1
stretch_mode = 3
script = ExtResource("5_ksxvb")
@@ -168,7 +267,7 @@ script = ExtResource("5_ksxvb")
[node name="Texture9" type="TextureRect" parent="PanelContainer/Container/VC/HC"]
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
-texture = ExtResource("13_ri0hx")
+texture = ExtResource("7_ksxvb")
expand_mode = 1
stretch_mode = 3
script = ExtResource("5_ksxvb")
@@ -176,16 +275,15 @@ script = ExtResource("5_ksxvb")
[node name="Texture10" type="TextureRect" parent="PanelContainer/Container/VC/HC"]
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
-texture = ExtResource("5_nn354")
+texture = ExtResource("8_c2fc4")
expand_mode = 1
stretch_mode = 3
script = ExtResource("5_ksxvb")
[node name="Texture11" type="TextureRect" parent="PanelContainer/Container/VC/HC"]
-modulate = Color(0.6968878, 0.6968878, 0.6968878, 1)
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
-texture = ExtResource("16_ksxvb")
+texture = ExtResource("7_i8b63")
expand_mode = 1
stretch_mode = 3
script = ExtResource("5_ksxvb")
diff --git a/addons/fancy_folder_icons/scene/texture_select.gd b/addons/fancy_folder_icons/scene/texture_select.gd
index f715149..6f075a2 100644
--- a/addons/fancy_folder_icons/scene/texture_select.gd
+++ b/addons/fancy_folder_icons/scene/texture_select.gd
@@ -1,11 +1,11 @@
@tool
extends TextureRect
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-# Fancy Folder Icons
+# Fancy Folder Icons
#
-# Folder Icons addon for addon godot 4
-# https://github.com/CodeNameTwister/Fancy-Folder-Icons
-# author: "Twister"
+# Folder Icons addon for addon godot 4
+# https://github.com/CodeNameTwister/Fancy-Folder-Icons
+# author: "Twister"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
var _nxt : Color = Color.DARK_GRAY
@@ -14,60 +14,60 @@ var _fps : float = 0.0
var path : String = ""
func _set(property: StringName, value: Variant) -> bool:
- if property == &"texture":
- if null != value:
- if value is Resource:
- var new_path : String = (value as Resource).resource_path
- if !new_path.is_empty():
- path = new_path
-
- if value is Texture2D:
- var image_size : Vector2 = Vector2(12.0, 12.0)
- if owner and owner.has_method(&"get_icon_size"):
- image_size = owner.call(&"get_icon_size")
- if value.get_size() != image_size:
- var img : Image = value.get_image()
- img.resize(int(image_size.x), int(image_size.y), Image.INTERPOLATE_NEAREST)
- texture = ImageTexture.create_from_image(img)
- #texture.resource_path = value.resource_path #No Cache Override
- return true
- if path.is_empty():
- path = str(get_index())
- texture = value
- return true
- return false
+ if property == &"texture":
+ if null != value:
+ if value is Resource:
+ var new_path : String = (value as Resource).resource_path
+ if !new_path.is_empty():
+ path = new_path
+
+ if value is Texture2D:
+ var image_size : Vector2 = Vector2(12.0, 12.0)
+ if owner and owner.has_method(&"get_icon_size"):
+ image_size = owner.call(&"get_icon_size")
+ if value.get_size() != image_size:
+ var img : Image = value.get_image()
+ img.resize(int(image_size.x), int(image_size.y), Image.INTERPOLATE_NEAREST)
+ texture = ImageTexture.create_from_image(img)
+ #texture.resource_path = value.resource_path #No Cache Override
+ return true
+ if path.is_empty():
+ path = str(get_index())
+ texture = value
+ return true
+ return false
func _ready() -> void:
- set_process(false)
- gui_input.connect(_on_gui)
- if texture.resource_path == null:
- texture = null
- else:
- path = texture.resource_path
+ set_process(false)
+ gui_input.connect(_on_gui)
+ if texture.resource_path == null:
+ texture = null
+ else:
+ path = texture.resource_path
func _on_gui(i : InputEvent) -> void:
- if i is InputEventMouseButton:
- if i.button_index == 1 and i.pressed:
- if texture == null:
- return
- owner.select_texture(texture, path)
+ if i is InputEventMouseButton:
+ if i.button_index == 1 and i.pressed:
+ if texture == null:
+ return
+ owner.select_texture(texture, path)
func enable() -> void:
- set_process(true)
+ set_process(true)
func reset() -> void:
- set_process(false)
- modulate = Color.WHITE
- _nxt = Color.DARK_GRAY
+ set_process(false)
+ modulate = Color.WHITE
+ _nxt = Color.DARK_GRAY
func _process(delta: float) -> void:
- _fps += delta * 4.0
- if _fps >= 1.0:
- _fps = 0.0
- modulate = _nxt
- if _nxt == Color.DARK_GRAY:
- _nxt = Color.WHITE
- else:
- _nxt = Color.DARK_GRAY
- return
- modulate = lerp(modulate, _nxt, _fps)
+ _fps += delta * 4.0
+ if _fps >= 1.0:
+ _fps = 0.0
+ modulate = _nxt
+ if _nxt == Color.DARK_GRAY:
+ _nxt = Color.WHITE
+ else:
+ _nxt = Color.DARK_GRAY
+ return
+ modulate = lerp(modulate, _nxt, _fps)
diff --git a/addons/fancy_folder_icons/scene/textures_recent.gd b/addons/fancy_folder_icons/scene/textures_recent.gd
index cad63af..0a6844c 100644
--- a/addons/fancy_folder_icons/scene/textures_recent.gd
+++ b/addons/fancy_folder_icons/scene/textures_recent.gd
@@ -1,93 +1,93 @@
@tool
extends HBoxContainer
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-# Fancy Folder Icons
+# Fancy Folder Icons
#
-# Folder Icons addon for addon godot 4
-# https://github.com/CodeNameTwister/Fancy-Folder-Icons
-# author: "Twister"
+# Folder Icons addon for addon godot 4
+# https://github.com/CodeNameTwister/Fancy-Folder-Icons
+# author: "Twister"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
const DOT_USER : String = "user://editor/fancy_folder_icon_recents.dat"
func reorder(new_tx : Texture2D) -> void:
- if is_instance_valid(new_tx):
- var exist : bool = false
- var last_path : String = new_tx.resource_path
- for x : Node in get_children():
- if x is TextureRect:
- if x.texture != null:
- if (!last_path.is_empty() and last_path == x.path) or new_tx == x.texture:
- if x.texture != new_tx:
- x.texture = new_tx
- exist = true
- break
- if exist:
- return
- var last_texture : Texture2D = new_tx
- for x : Node in get_children():
- if x is TextureRect:
- var _current_texture : Texture2D = x.texture
- var _current_path : String = x.path
- x.path = last_path
- x.texture = last_texture
- last_texture = _current_texture
- last_path = _current_path
- x.queue_redraw()
+ if is_instance_valid(new_tx):
+ var exist : bool = false
+ var last_path : String = new_tx.resource_path
+ for x : Node in get_children():
+ if x is TextureRect:
+ if x.texture != null:
+ if (!last_path.is_empty() and last_path == x.path) or new_tx == x.texture:
+ if x.texture != new_tx:
+ x.texture = new_tx
+ exist = true
+ break
+ if exist:
+ return
+ var last_texture : Texture2D = new_tx
+ for x : Node in get_children():
+ if x is TextureRect:
+ var _current_texture : Texture2D = x.texture
+ var _current_path : String = x.path
+ x.path = last_path
+ x.texture = last_texture
+ last_texture = _current_texture
+ last_path = _current_path
+ x.queue_redraw()
func enable_by_path(p : String) -> void:
- for x : Node in get_children():
- if x is TextureRect:
- if null != x.texture:
- if x.path == p:
- x.enable()
- else:
- x.reset()
+ for x : Node in get_children():
+ if x is TextureRect:
+ if null != x.texture:
+ if x.path == p:
+ x.enable()
+ else:
+ x.reset()
func _setup() -> void:
- var folder : String = DOT_USER.get_base_dir()
- if !DirAccess.dir_exists_absolute(folder):
- DirAccess.make_dir_absolute(folder)
- return
- if FileAccess.file_exists(DOT_USER):
- var cfg : ConfigFile = ConfigFile.new()
- if OK != cfg.load(DOT_USER):return
- var _icons : PackedStringArray = cfg.get_value("RECENTS", "ICONS", [])
+ var folder : String = DOT_USER.get_base_dir()
+ if !DirAccess.dir_exists_absolute(folder):
+ DirAccess.make_dir_absolute(folder)
+ return
+ if FileAccess.file_exists(DOT_USER):
+ var cfg : ConfigFile = ConfigFile.new()
+ if OK != cfg.load(DOT_USER):return
+ var _icons : PackedStringArray = cfg.get_value("RECENTS", "ICONS", [])
- var append : Array[Texture2D] = []
- for x : String in _icons:
- if FileAccess.file_exists(x):
- var r : Resource = ResourceLoader.load(x)
- if r is Texture2D:
- append.append(r)
- if append.size() >= get_child_count():break
+ var append : Array[Texture2D] = []
+ for x : String in _icons:
+ if FileAccess.file_exists(x):
+ var r : Resource = ResourceLoader.load(x)
+ if r is Texture2D:
+ append.append(r)
+ if append.size() >= get_child_count():break
- if append.size() > 0:
- var index : int = 0
- for x : Node in get_children():
- if x is TextureRect:
- var tx : Variant = append[index]
- if tx is Texture2D:
- x.texture = tx
- x.path = tx.resource_path
- index += 1
- if index >= append.size():break
+ if append.size() > 0:
+ var index : int = 0
+ for x : Node in get_children():
+ if x is TextureRect:
+ var tx : Variant = append[index]
+ if tx is Texture2D:
+ x.texture = tx
+ x.path = tx.resource_path
+ index += 1
+ if index >= append.size():break
func _on_exit() -> void:
- var pack : PackedStringArray = []
- for x : Node in get_children():
- if x is TextureRect:
- var tx : Texture2D = x.texture
- if null != tx:
- var path : String = x.path
- if path.is_empty():continue
- pack.append(path)
- if pack.size() > 0:
- var cfg : ConfigFile = ConfigFile.new()
- cfg.set_value("RECENTS", "ICONS", pack)
- if OK != cfg.save(DOT_USER):
- push_warning("Can not save recent icons changes!")
+ var pack : PackedStringArray = []
+ for x : Node in get_children():
+ if x is TextureRect:
+ var tx : Texture2D = x.texture
+ if null != tx:
+ var path : String = x.path
+ if path.is_empty():continue
+ pack.append(path)
+ if pack.size() > 0:
+ var cfg : ConfigFile = ConfigFile.new()
+ cfg.set_value("RECENTS", "ICONS", pack)
+ if OK != cfg.save(DOT_USER):
+ push_warning("Can not save recent icons changes!")
func _ready() -> void:
- _setup()
- tree_exiting.connect(_on_exit)
+ _setup()
+ tree_exiting.connect(_on_exit)