Start working on script editor help
This commit is contained in:
parent
e27bc784dd
commit
145b8c5e6f
3 changed files with 24 additions and 2 deletions
|
@ -43,9 +43,16 @@ void EditorHelpSearch::popup(const String& p_term) {
|
||||||
if (p_term!="") {
|
if (p_term!="") {
|
||||||
search_box->set_text(p_term);
|
search_box->set_text(p_term);
|
||||||
search_box->select_all();
|
search_box->select_all();
|
||||||
} else
|
_update_search();
|
||||||
|
//TreeItem *ti = search_options->select_single_item();
|
||||||
|
//if (!ti)
|
||||||
|
// return;
|
||||||
|
search_options->grab_focus();
|
||||||
|
|
||||||
|
} else {
|
||||||
search_box->clear();
|
search_box->clear();
|
||||||
search_box->grab_focus();
|
search_box->grab_focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -863,6 +870,8 @@ void EditorHelp::_goto_desc(const String& p_class,bool p_update_history,int p_vs
|
||||||
void EditorHelp::_request_help(const String& p_string) {
|
void EditorHelp::_request_help(const String& p_string) {
|
||||||
|
|
||||||
_goto_desc(p_string);
|
_goto_desc(p_string);
|
||||||
|
class_search->popup(p_string);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//100 palabras
|
//100 palabras
|
||||||
|
|
|
@ -752,6 +752,11 @@ void ScriptEditor::_menu_option(int p_option) {
|
||||||
debugger->show();
|
debugger->show();
|
||||||
}
|
}
|
||||||
} break;
|
} 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: {
|
case WINDOW_CLOSE: {
|
||||||
|
|
||||||
erase_tab_confirm->set_text("Close Tab?:\n\""+current->get_name()+"\"");
|
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()->add_separator();
|
||||||
window_menu->get_popup()->connect("item_pressed", this,"_menu_option");
|
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");
|
tab_container->connect("tab_changed", this,"_tab_changed");
|
||||||
|
|
||||||
find_replace_dialog = memnew(FindReplaceDialog);
|
find_replace_dialog = memnew(FindReplaceDialog);
|
||||||
|
|
|
@ -133,6 +133,7 @@ class ScriptEditor : public VBoxContainer {
|
||||||
DEBUG_BREAK,
|
DEBUG_BREAK,
|
||||||
DEBUG_CONTINUE,
|
DEBUG_CONTINUE,
|
||||||
DEBUG_SHOW,
|
DEBUG_SHOW,
|
||||||
|
HELP_SELECTED,
|
||||||
WINDOW_CLOSE,
|
WINDOW_CLOSE,
|
||||||
WINDOW_MOVE_LEFT,
|
WINDOW_MOVE_LEFT,
|
||||||
WINDOW_MOVE_RIGHT,
|
WINDOW_MOVE_RIGHT,
|
||||||
|
@ -145,6 +146,7 @@ class ScriptEditor : public VBoxContainer {
|
||||||
MenuButton *search_menu;
|
MenuButton *search_menu;
|
||||||
MenuButton *window_menu;
|
MenuButton *window_menu;
|
||||||
MenuButton *debug_menu;
|
MenuButton *debug_menu;
|
||||||
|
MenuButton *help_menu;
|
||||||
uint64_t idle;
|
uint64_t idle;
|
||||||
|
|
||||||
TabContainer *tab_container;
|
TabContainer *tab_container;
|
||||||
|
|
Loading…
Reference in a new issue