Fix theme methods usage in docs
- Fix usages of `get_icon` that was renamed `get_theme_icon`. - Replace `new Control().get_font*` with `ThemeDB.fallback_font*`.
This commit is contained in:
parent
20d6672846
commit
361ff55241
2 changed files with 8 additions and 8 deletions
|
|
@ -237,7 +237,7 @@
|
|||
# You can use a custom icon:
|
||||
return preload("res://addons/my_plugin/my_plugin_icon.svg")
|
||||
# Or use a built-in icon:
|
||||
return get_editor_interface().get_base_control().get_icon("Node", "EditorIcons")
|
||||
return get_editor_interface().get_base_control().get_theme_icon("Node", "EditorIcons")
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
public override Texture2D GetPluginIcon()
|
||||
|
|
@ -245,7 +245,7 @@
|
|||
// You can use a custom icon:
|
||||
return ResourceLoader.Load<Texture2D>("res://addons/my_plugin/my_plugin_icon.svg");
|
||||
// Or use a built-in icon:
|
||||
return GetEditorInterface().GetBaseControl().GetIcon("Node", "EditorIcons");
|
||||
return GetEditorInterface().GetBaseControl().GetThemeIcon("Node", "EditorIcons");
|
||||
}
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue