mirror of
https://github.com/godotengine/godot.git
synced 2025-10-23 18:03:35 +00:00
Merge pull request #55541 from KoBeWi/outcognito_scripts
This commit is contained in:
commit
3efa6644c4
5 changed files with 34 additions and 2 deletions
|
|
@ -392,8 +392,17 @@ String ScriptTextEditor::get_name() {
|
|||
}
|
||||
|
||||
Ref<Texture2D> ScriptTextEditor::get_theme_icon() {
|
||||
if (get_parent_control() && get_parent_control()->has_theme_icon(script->get_class(), "EditorIcons")) {
|
||||
return get_parent_control()->get_theme_icon(script->get_class(), "EditorIcons");
|
||||
if (get_parent_control()) {
|
||||
String icon_name = script->get_class();
|
||||
if (script->is_built_in()) {
|
||||
icon_name += "Internal";
|
||||
}
|
||||
|
||||
if (get_parent_control()->has_theme_icon(icon_name, "EditorIcons")) {
|
||||
return get_parent_control()->get_theme_icon(icon_name, "EditorIcons");
|
||||
} else if (get_parent_control()->has_theme_icon(script->get_class(), "EditorIcons")) {
|
||||
return get_parent_control()->get_theme_icon(script->get_class(), "EditorIcons");
|
||||
}
|
||||
}
|
||||
|
||||
return Ref<Texture2D>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue