Added Shortcut tooltip to Editor Main Screen Plugins

Co-Authored-By: Kushagra <53115703+kushagra10025@users.noreply.github.com>
This commit is contained in:
Thaddeus Crews 2025-08-02 17:55:14 +05:30
parent 5f12ada7a4
commit 4bb188f85f
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
2 changed files with 21 additions and 16 deletions

View file

@ -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());