diff options
author | marynate <mary.w.nate@gmail.com> | 2014-05-05 21:59:18 +0800 |
---|---|---|
committer | marynate <mary.w.nate@gmail.com> | 2014-05-06 19:20:59 +0800 |
commit | 145b8c5e6fb755a2454312dc6f49ca50ff5175b2 (patch) | |
tree | 48db04e1768d5e5ffdeb70b4054006f121cbf7e1 /tools/editor/plugins/script_editor_plugin.cpp | |
parent | e27bc784ddb71423792f58e88266680d63f4d237 (diff) | |
download | redot-engine-145b8c5e6fb755a2454312dc6f49ca50ff5175b2.tar.gz |
Start working on script editor help
Diffstat (limited to 'tools/editor/plugins/script_editor_plugin.cpp')
-rw-r--r-- | tools/editor/plugins/script_editor_plugin.cpp | 11 |
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); |