mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Add custom icons to script classes.
This commit is contained in:
parent
b4f579b5ba
commit
6d9cc032e7
12 changed files with 165 additions and 38 deletions
|
|
@ -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();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue