|
@@ -1784,11 +1784,7 @@ ScriptTextEditor::ScriptTextEditor() {
|
|
|
search_menu->get_popup()->add_separator();
|
|
|
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_in_files"), SEARCH_IN_FILES);
|
|
|
search_menu->get_popup()->add_separator();
|
|
|
- search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_function"), SEARCH_LOCATE_FUNCTION);
|
|
|
- search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"), SEARCH_GOTO_LINE);
|
|
|
- search_menu->get_popup()->add_separator();
|
|
|
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/contextual_help"), HELP_CONTEXTUAL);
|
|
|
-
|
|
|
search_menu->get_popup()->connect("id_pressed", this, "_edit_option");
|
|
|
|
|
|
edit_hb->add_child(edit_menu);
|
|
@@ -1797,6 +1793,11 @@ ScriptTextEditor::ScriptTextEditor() {
|
|
|
edit_hb->add_child(goto_menu);
|
|
|
goto_menu->set_text(TTR("Go To"));
|
|
|
goto_menu->set_switch_on_hover(true);
|
|
|
+ goto_menu->get_popup()->connect("id_pressed", this, "_edit_option");
|
|
|
+
|
|
|
+ goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_function"), SEARCH_LOCATE_FUNCTION);
|
|
|
+ goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"), SEARCH_GOTO_LINE);
|
|
|
+ goto_menu->get_popup()->add_separator();
|
|
|
|
|
|
bookmarks_menu = memnew(PopupMenu);
|
|
|
bookmarks_menu->set_name("Bookmarks");
|
|
@@ -1856,16 +1857,12 @@ void ScriptTextEditor::register_editor() {
|
|
|
ED_SHORTCUT("script_text_editor/move_down", TTR("Move Down"), KEY_MASK_ALT | KEY_DOWN);
|
|
|
ED_SHORTCUT("script_text_editor/delete_line", TTR("Delete Line"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_K);
|
|
|
|
|
|
- //leave these at zero, same can be accomplished with tab/shift-tab, including selection
|
|
|
- //the next/previous in history shortcut in this case makes a lot more sene.
|
|
|
+ // Leave these at zero, same can be accomplished with tab/shift-tab, including selection.
|
|
|
+ // The next/previous in history shortcut in this case makes a lot more sense.
|
|
|
|
|
|
ED_SHORTCUT("script_text_editor/indent_left", TTR("Indent Left"), 0);
|
|
|
ED_SHORTCUT("script_text_editor/indent_right", TTR("Indent Right"), 0);
|
|
|
ED_SHORTCUT("script_text_editor/toggle_comment", TTR("Toggle Comment"), KEY_MASK_CMD | KEY_K);
|
|
|
- ED_SHORTCUT("script_text_editor/toggle_bookmark", TTR("Toggle Bookmark"), KEY_MASK_CMD | KEY_MASK_ALT | KEY_B);
|
|
|
- ED_SHORTCUT("script_text_editor/goto_next_bookmark", TTR("Go to Next Bookmark"), KEY_MASK_CMD | KEY_B);
|
|
|
- ED_SHORTCUT("script_text_editor/goto_previous_bookmark", TTR("Go to Previous Bookmark"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_B);
|
|
|
- ED_SHORTCUT("script_text_editor/remove_all_bookmarks", TTR("Remove All Bookmarks"), 0);
|
|
|
ED_SHORTCUT("script_text_editor/toggle_fold_line", TTR("Fold/Unfold Line"), KEY_MASK_ALT | KEY_F);
|
|
|
ED_SHORTCUT("script_text_editor/fold_all_lines", TTR("Fold All Lines"), 0);
|
|
|
ED_SHORTCUT("script_text_editor/unfold_all_lines", TTR("Unfold All Lines"), 0);
|
|
@@ -1881,15 +1878,6 @@ void ScriptTextEditor::register_editor() {
|
|
|
ED_SHORTCUT("script_text_editor/convert_indent_to_tabs", TTR("Convert Indent to Tabs"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_I);
|
|
|
ED_SHORTCUT("script_text_editor/auto_indent", TTR("Auto Indent"), KEY_MASK_CMD | KEY_I);
|
|
|
|
|
|
-#ifdef OSX_ENABLED
|
|
|
- ED_SHORTCUT("script_text_editor/toggle_breakpoint", TTR("Toggle Breakpoint"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_B);
|
|
|
-#else
|
|
|
- ED_SHORTCUT("script_text_editor/toggle_breakpoint", TTR("Toggle Breakpoint"), KEY_F9);
|
|
|
-#endif
|
|
|
- ED_SHORTCUT("script_text_editor/remove_all_breakpoints", TTR("Remove All Breakpoints"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F9);
|
|
|
- ED_SHORTCUT("script_text_editor/goto_next_breakpoint", TTR("Go to Next Breakpoint"), KEY_MASK_CMD | KEY_PERIOD);
|
|
|
- ED_SHORTCUT("script_text_editor/goto_previous_breakpoint", TTR("Go to Previous Breakpoint"), KEY_MASK_CMD | KEY_COMMA);
|
|
|
-
|
|
|
ED_SHORTCUT("script_text_editor/find", TTR("Find..."), KEY_MASK_CMD | KEY_F);
|
|
|
#ifdef OSX_ENABLED
|
|
|
ED_SHORTCUT("script_text_editor/find_next", TTR("Find Next"), KEY_MASK_CMD | KEY_G);
|
|
@@ -1903,6 +1891,17 @@ void ScriptTextEditor::register_editor() {
|
|
|
|
|
|
ED_SHORTCUT("script_text_editor/find_in_files", TTR("Find in Files..."), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F);
|
|
|
|
|
|
+#ifdef OSX_ENABLED
|
|
|
+ ED_SHORTCUT("script_text_editor/contextual_help", TTR("Contextual Help"), KEY_MASK_ALT | KEY_MASK_SHIFT | KEY_SPACE);
|
|
|
+#else
|
|
|
+ ED_SHORTCUT("script_text_editor/contextual_help", TTR("Contextual Help"), KEY_MASK_ALT | KEY_F1);
|
|
|
+#endif
|
|
|
+
|
|
|
+ ED_SHORTCUT("script_text_editor/toggle_bookmark", TTR("Toggle Bookmark"), KEY_MASK_CMD | KEY_MASK_ALT | KEY_B);
|
|
|
+ ED_SHORTCUT("script_text_editor/goto_next_bookmark", TTR("Go to Next Bookmark"), KEY_MASK_CMD | KEY_B);
|
|
|
+ ED_SHORTCUT("script_text_editor/goto_previous_bookmark", TTR("Go to Previous Bookmark"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_B);
|
|
|
+ ED_SHORTCUT("script_text_editor/remove_all_bookmarks", TTR("Remove All Bookmarks"), 0);
|
|
|
+
|
|
|
#ifdef OSX_ENABLED
|
|
|
ED_SHORTCUT("script_text_editor/goto_function", TTR("Go to Function..."), KEY_MASK_CTRL | KEY_MASK_CMD | KEY_J);
|
|
|
#else
|
|
@@ -1911,10 +1910,13 @@ void ScriptTextEditor::register_editor() {
|
|
|
ED_SHORTCUT("script_text_editor/goto_line", TTR("Go to Line..."), KEY_MASK_CMD | KEY_L);
|
|
|
|
|
|
#ifdef OSX_ENABLED
|
|
|
- ED_SHORTCUT("script_text_editor/contextual_help", TTR("Contextual Help"), KEY_MASK_ALT | KEY_MASK_SHIFT | KEY_SPACE);
|
|
|
+ ED_SHORTCUT("script_text_editor/toggle_breakpoint", TTR("Toggle Breakpoint"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_B);
|
|
|
#else
|
|
|
- ED_SHORTCUT("script_text_editor/contextual_help", TTR("Contextual Help"), KEY_MASK_ALT | KEY_F1);
|
|
|
+ ED_SHORTCUT("script_text_editor/toggle_breakpoint", TTR("Toggle Breakpoint"), KEY_F9);
|
|
|
#endif
|
|
|
+ ED_SHORTCUT("script_text_editor/remove_all_breakpoints", TTR("Remove All Breakpoints"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F9);
|
|
|
+ ED_SHORTCUT("script_text_editor/goto_next_breakpoint", TTR("Go to Next Breakpoint"), KEY_MASK_CMD | KEY_PERIOD);
|
|
|
+ ED_SHORTCUT("script_text_editor/goto_previous_breakpoint", TTR("Go to Previous Breakpoint"), KEY_MASK_CMD | KEY_COMMA);
|
|
|
|
|
|
ScriptEditor::register_create_script_editor_function(create_editor);
|
|
|
}
|