diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_node.cpp | 5 | ||||
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 3 | ||||
-rw-r--r-- | editor/plugins/script_text_editor.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/shader_editor_plugin.cpp | 6 | ||||
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 2 |
5 files changed, 14 insertions, 4 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index b8d5ba5acb..dcb65da224 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -5135,6 +5135,7 @@ EditorNode::EditorNode() { file_menu = memnew(MenuButton); file_menu->set_flat(false); + file_menu->set_switch_on_hover(true); file_menu->set_text(TTR("Scene")); file_menu->add_style_override("hover", gui_base->get_stylebox("MenuHover", "EditorStyles")); left_menu_hb->add_child(file_menu); @@ -5226,6 +5227,7 @@ EditorNode::EditorNode() { project_menu = memnew(MenuButton); project_menu->set_flat(false); + project_menu->set_switch_on_hover(true); project_menu->set_tooltip(TTR("Miscellaneous project or scene-wide tools.")); project_menu->set_text(TTR("Project")); project_menu->add_style_override("hover", gui_base->get_stylebox("MenuHover", "EditorStyles")); @@ -5267,6 +5269,7 @@ EditorNode::EditorNode() { debug_menu = memnew(MenuButton); debug_menu->set_flat(false); + debug_menu->set_switch_on_hover(true); debug_menu->set_text(TTR("Debug")); debug_menu->add_style_override("hover", gui_base->get_stylebox("MenuHover", "EditorStyles")); left_menu_hb->add_child(debug_menu); @@ -5297,6 +5300,7 @@ EditorNode::EditorNode() { settings_menu = memnew(MenuButton); settings_menu->set_flat(false); + settings_menu->set_switch_on_hover(true); settings_menu->set_text(TTR("Editor")); settings_menu->add_style_override("hover", gui_base->get_stylebox("MenuHover", "EditorStyles")); left_menu_hb->add_child(settings_menu); @@ -5333,6 +5337,7 @@ EditorNode::EditorNode() { // Help Menu help_menu = memnew(MenuButton); help_menu->set_flat(false); + help_menu->set_switch_on_hover(true); help_menu->set_text(TTR("Help")); help_menu->add_style_override("hover", gui_base->get_stylebox("MenuHover", "EditorStyles")); left_menu_hb->add_child(help_menu); diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 085660b79e..e101c0d99e 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -2982,6 +2982,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { file_menu = memnew(MenuButton); menu_hb->add_child(file_menu); file_menu->set_text(TTR("File")); + file_menu->set_switch_on_hover(true); file_menu->get_popup()->set_hide_on_window_lose_focus(true); file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/new", TTR("New Script")), FILE_NEW); file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/new_textfile", TTR("New TextFile")), FILE_NEW_TEXTFILE); @@ -3033,6 +3034,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { script_search_menu = memnew(MenuButton); menu_hb->add_child(script_search_menu); script_search_menu->set_text(TTR("Search")); + script_search_menu->set_switch_on_hover(true); script_search_menu->get_popup()->set_hide_on_window_lose_focus(true); script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find", TTR("Find..."), KEY_MASK_CMD | KEY_F), HELP_SEARCH_FIND); script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_next", TTR("Find Next"), KEY_F3), HELP_SEARCH_FIND_NEXT); @@ -3042,6 +3044,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { debug_menu = memnew(MenuButton); menu_hb->add_child(debug_menu); debug_menu->set_text(TTR("Debug")); + debug_menu->set_switch_on_hover(true); debug_menu->get_popup()->set_hide_on_window_lose_focus(true); debug_menu->get_popup()->add_shortcut(ED_SHORTCUT("debugger/step_over", TTR("Step Over"), KEY_F10), DEBUG_NEXT); debug_menu->get_popup()->add_shortcut(ED_SHORTCUT("debugger/step_into", TTR("Step Into"), KEY_F11), DEBUG_STEP); diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index c3e2aa86f0..b7b259c6e1 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -1465,6 +1465,7 @@ ScriptTextEditor::ScriptTextEditor() { edit_menu = memnew(MenuButton); edit_menu->set_text(TTR("Edit")); + edit_menu->set_switch_on_hover(true); edit_menu->get_popup()->set_hide_on_window_lose_focus(true); edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/undo"), EDIT_UNDO); edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/redo"), EDIT_REDO); @@ -1519,6 +1520,7 @@ ScriptTextEditor::ScriptTextEditor() { search_menu = memnew(MenuButton); edit_hb->add_child(search_menu); search_menu->set_text(TTR("Search")); + search_menu->set_switch_on_hover(true); search_menu->get_popup()->set_hide_on_window_lose_focus(true); search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find"), SEARCH_FIND); search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_next"), SEARCH_FIND_NEXT); diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index 638de1b213..0e0c27ee99 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -526,9 +526,8 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) { HBoxContainer *hbc = memnew(HBoxContainer); edit_menu = memnew(MenuButton); - //edit_menu->set_position(Point2(5, -1)); edit_menu->set_text(TTR("Edit")); - + edit_menu->set_switch_on_hover(true); edit_menu->get_popup()->set_hide_on_window_lose_focus(true); edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/undo"), EDIT_UNDO); edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/redo"), EDIT_REDO); @@ -548,12 +547,11 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) { edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/clone_down"), EDIT_CLONE_DOWN); edit_menu->get_popup()->add_separator(); edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/complete_symbol"), EDIT_COMPLETE); - edit_menu->get_popup()->connect("id_pressed", this, "_menu_option"); search_menu = memnew(MenuButton); - //search_menu->set_position(Point2(38, -1)); search_menu->set_text(TTR("Search")); + search_menu->set_switch_on_hover(true); search_menu->get_popup()->set_hide_on_window_lose_focus(true); search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find"), SEARCH_FIND); search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_next"), SEARCH_FIND_NEXT); diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index a5563c0497..1b3e800dca 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -5475,6 +5475,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { transform_menu = memnew(MenuButton); transform_menu->set_text(TTR("Transform")); + transform_menu->set_switch_on_hover(true); hbc_menu->add_child(transform_menu); p = transform_menu->get_popup(); @@ -5487,6 +5488,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { view_menu = memnew(MenuButton); view_menu->set_text(TTR("View")); + view_menu->set_switch_on_hover(true); hbc_menu->add_child(view_menu); p = view_menu->get_popup(); |