summaryrefslogtreecommitdiffstats
path: root/tools/editor/plugins/script_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor/plugins/script_editor_plugin.cpp')
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp
index a01565a046..2d2e02f5c4 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -752,6 +752,11 @@ void ScriptEditor::_menu_option(int p_option) {
debugger->show();
}
} break;
+ case HELP_SELECTED: {
+ String selected = current->get_text_edit()->get_selection_text();
+ editor->call("_editor_select", 3);
+ editor->emit_signal("request_help", selected);
+ } break;
case WINDOW_CLOSE: {
erase_tab_confirm->set_text("Close Tab?:\n\""+current->get_name()+"\"");
@@ -1362,6 +1367,12 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
window_menu->get_popup()->add_separator();
window_menu->get_popup()->connect("item_pressed", this,"_menu_option");
+ help_menu = memnew( MenuButton );
+ menu_hb->add_child(help_menu);
+ help_menu->set_text("Help");
+ help_menu->get_popup()->add_item("Selected", HELP_SELECTED, KEY_MASK_CTRL|KEY_MASK_SHIFT|KEY_D);
+ help_menu->get_popup()->connect("item_pressed", this,"_menu_option");
+
tab_container->connect("tab_changed", this,"_tab_changed");
find_replace_dialog = memnew(FindReplaceDialog);