mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Added Shortcut tooltip to Editor Main Screen Plugins
Co-Authored-By: Kushagra <53115703+kushagra10025@users.noreply.github.com>
This commit is contained in:
parent
5f12ada7a4
commit
4bb188f85f
2 changed files with 21 additions and 16 deletions
|
|
@ -263,6 +263,11 @@ void EditorMainScreen::add_main_plugin(EditorPlugin *p_editor) {
|
|||
tb->set_name(p_editor->get_plugin_name());
|
||||
tb->set_text(p_editor->get_plugin_name());
|
||||
|
||||
Ref<Shortcut> shortcut = EditorSettings::get_singleton()->get_shortcut("editor/editor_" + p_editor->get_plugin_name().to_lower());
|
||||
if (shortcut.is_valid()) {
|
||||
tb->set_shortcut(shortcut);
|
||||
}
|
||||
|
||||
Ref<Texture2D> icon = p_editor->get_plugin_icon();
|
||||
if (icon.is_null() && has_theme_icon(p_editor->get_plugin_name(), EditorStringName(EditorIcons))) {
|
||||
icon = get_editor_theme_icon(p_editor->get_plugin_name());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue