From eb6c7ec09cd03850fa09de69651b08fc153b62c1 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sun, 7 Jun 2020 15:34:01 +0200 Subject: [PATCH] Add an editor tooltip to document gizmo visibility options See discussion in https://github.com/godotengine/godot-proposals/issues/716. (cherry picked from commit 138a4eecb305016a686c43409c554331fcf7c3c7) --- editor/plugins/spatial_editor_plugin.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 59fe641c56c..0b68e1b3646 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -5380,6 +5380,9 @@ void SpatialEditor::_update_gizmos_menu() { const int plugin_state = gizmo_plugins_by_name[i]->get_state(); gizmos_menu->add_multistate_item(TTR(plugin_name), 3, plugin_state, i); const int idx = gizmos_menu->get_item_index(i); + gizmos_menu->set_item_tooltip( + idx, + TTR("Click to toggle between visibility states.\n\nOpen eye: Gizmo is visible.\nClosed eye: Gizmo is hidden.\nHalf-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\").")); switch (plugin_state) { case EditorSpatialGizmoPlugin::VISIBLE: gizmos_menu->set_item_icon(idx, gizmos_menu->get_icon("visibility_visible"));