mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Make script type distinguishable by icon
This commit is contained in:
parent
28174d531b
commit
f524ddebd5
5 changed files with 34 additions and 2 deletions
|
@ -2637,6 +2637,15 @@ String VisualScriptEditor::get_name() {
|
|||
}
|
||||
|
||||
Ref<Texture2D> VisualScriptEditor::get_theme_icon() {
|
||||
String icon_name = "VisualScript";
|
||||
if (script->is_built_in()) {
|
||||
icon_name += "Internal";
|
||||
}
|
||||
|
||||
if (Control::has_theme_icon(icon_name, "EditorIcons")) {
|
||||
return get_parent_control()->get_theme_icon(icon_name, "EditorIcons");
|
||||
}
|
||||
|
||||
return Control::get_theme_icon(SNAME("VisualScript"), SNAME("EditorIcons"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue