mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Add custom icons to script classes.
This commit is contained in:
@@ -146,6 +146,8 @@ private:
|
||||
|
||||
bool _find_updated_instances(Node *p_root, Node *p_node, Set<String> &checked_paths);
|
||||
|
||||
HashMap<StringName, String> _script_class_icon_paths;
|
||||
|
||||
public:
|
||||
EditorPlugin *get_editor(Object *p_object);
|
||||
EditorPlugin *get_subeditor(Object *p_object);
|
||||
@@ -213,6 +215,12 @@ public:
|
||||
|
||||
bool script_class_is_parent(const String &p_class, const String &p_inherits);
|
||||
StringName script_class_get_base(const String &p_class);
|
||||
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; }
|
||||
void script_class_clear_icon_paths() { _script_class_icon_paths.clear(); }
|
||||
void script_class_save_icon_paths();
|
||||
void script_class_load_icon_paths();
|
||||
|
||||
EditorData();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user