MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / get_theme_icon

Method get_theme_icon

editor/script/script_text_editor.cpp:816–831  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

814}
815
816Ref<Texture2D> ScriptTextEditor::get_theme_icon() {
817 if (get_parent_control()) {
818 String icon_name = script->get_class();
819 if (script->is_built_in()) {
820 icon_name += "Internal";
821 }
822
823 if (get_parent_control()->has_theme_icon(icon_name, EditorStringName(EditorIcons))) {
824 return get_parent_control()->get_editor_theme_icon(icon_name);
825 } else if (get_parent_control()->has_theme_icon(script->get_class(), EditorStringName(EditorIcons))) {
826 return get_parent_control()->get_editor_theme_icon(script->get_class());
827 }
828 }
829
830 return Ref<Texture2D>();
831}
832
833void ScriptTextEditor::_validate_script() {
834 CodeEdit *te = code_editor->get_text_editor();

Callers 1

_inline_object_drawMethod · 0.45

Calls 4

is_built_inMethod · 0.80
get_classMethod · 0.45
has_theme_iconMethod · 0.45
get_editor_theme_iconMethod · 0.45

Tested by

no test coverage detected