diff options
Diffstat (limited to 'editor/editor_data.h')
-rw-r--r-- | editor/editor_data.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/editor/editor_data.h b/editor/editor_data.h index 9f5d3e2a15..87a76ee5ba 100644 --- a/editor/editor_data.h +++ b/editor/editor_data.h @@ -147,6 +147,7 @@ private: bool _find_updated_instances(Node *p_root, Node *p_node, Set<String> &checked_paths); HashMap<StringName, String> _script_class_icon_paths; + HashMap<String, StringName> _script_class_file_to_path; public: EditorPlugin *get_editor(Object *p_object); @@ -214,10 +215,14 @@ public: void notify_resource_saved(const Ref<Resource> &p_resource); bool script_class_is_parent(const String &p_class, const String &p_inherits); - StringName script_class_get_base(const String &p_class); + StringName script_class_get_base(const String &p_class) const; Object *script_class_instance(const String &p_class); - String script_class_get_icon_path(const String &p_class) const { return _script_class_icon_paths.has(p_class) ? _script_class_icon_paths[p_class] : String(); } - void script_class_set_icon_path(const String &p_class, const String &p_icon_path) { _script_class_icon_paths[p_class] = p_icon_path; } + + StringName script_class_get_name(const String &p_path) const; + void script_class_set_name(const String &p_path, const StringName &p_class); + + String script_class_get_icon_path(const String &p_class) const; + void script_class_set_icon_path(const String &p_class, const String &p_icon_path); void script_class_clear_icon_paths() { _script_class_icon_paths.clear(); } void script_class_save_icon_paths(); void script_class_load_icon_paths(); |