You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-20 14:45:44 +00:00
Refactor editor icon retrieval
This commit is contained in:
committed by
Will Nations
parent
06c8b5a4ff
commit
5436abefe4
@@ -31,6 +31,7 @@
|
||||
#include "property_selector.h"
|
||||
|
||||
#include "core/os/keyboard.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor_scale.h"
|
||||
|
||||
void PropertySelector::_text_changed(const String &p_newtext) {
|
||||
@@ -161,10 +162,8 @@ void PropertySelector::_update_search() {
|
||||
Ref<Texture> icon;
|
||||
if (E->get().name == "Script Variables") {
|
||||
icon = get_icon("Script", "EditorIcons");
|
||||
} else if (has_icon(E->get().name, "EditorIcons")) {
|
||||
icon = get_icon(E->get().name, "EditorIcons");
|
||||
} else {
|
||||
icon = get_icon("Object", "EditorIcons");
|
||||
icon = EditorNode::get_singleton()->get_class_icon(E->get().name);
|
||||
}
|
||||
category->set_icon(0, icon);
|
||||
continue;
|
||||
@@ -241,10 +240,8 @@ void PropertySelector::_update_search() {
|
||||
if (E->get().name == "*Script Methods") {
|
||||
icon = get_icon("Script", "EditorIcons");
|
||||
script_methods = true;
|
||||
} else if (has_icon(rep, "EditorIcons")) {
|
||||
icon = get_icon(rep, "EditorIcons");
|
||||
} else {
|
||||
icon = get_icon("Object", "EditorIcons");
|
||||
icon = EditorNode::get_singleton()->get_class_icon(rep);
|
||||
}
|
||||
category->set_icon(0, icon);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user