mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Refactor editor icon retrieval
This commit is contained in:
parent
06c8b5a4ff
commit
5436abefe4
29 changed files with 192 additions and 252 deletions
|
@ -428,8 +428,9 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
|
|||
ObjectID id = ObjectID(p_data[i + 3]);
|
||||
|
||||
it->set_text(0, p_data[i + 1]);
|
||||
if (has_icon(p_data[i + 2], "EditorIcons"))
|
||||
it->set_icon(0, get_icon(p_data[i + 2], "EditorIcons"));
|
||||
Ref<Texture> icon = EditorNode::get_singleton()->get_class_icon(p_data[i + 2], "");
|
||||
if (icon.is_valid())
|
||||
it->set_icon(0, icon);
|
||||
it->set_metadata(0, id);
|
||||
|
||||
if (id == inspected_object_id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue