1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Streamline class icon resolution in the editor

This commit is contained in:
Yuri Sizov
2023-03-31 21:17:59 +02:00
parent c58080299a
commit 9fae65404a
8 changed files with 137 additions and 152 deletions

View File

@@ -144,6 +144,9 @@ private:
HashMap<StringName, String> _script_class_icon_paths;
HashMap<String, StringName> _script_class_file_to_path;
HashMap<Ref<Script>, Ref<Texture>> _script_icon_cache;
Ref<ImageTexture> _load_script_icon(const String &p_path) const;
public:
EditorPlugin *get_editor(Object *p_object);
@@ -240,6 +243,9 @@ public:
void script_class_save_icon_paths();
void script_class_load_icon_paths();
Ref<Texture2D> get_script_icon(const Ref<Script> &p_script);
void clear_script_icon_cache();
EditorData();
~EditorData();
};