mirror of
https://github.com/godotengine/godot.git
synced 2025-10-25 02:43:29 +00:00
Merge pull request #31338 from Calinou/reorganize-menus
Reorganize various menus for consistency and conciseness
This commit is contained in:
commit
f8574da2c2
8 changed files with 83 additions and 68 deletions
|
|
@ -1656,16 +1656,17 @@ void ScriptTextEditor::_color_changed(const Color &p_color) {
|
|||
void ScriptTextEditor::_make_context_menu(bool p_selection, bool p_color, bool p_foldable, bool p_open_docs, bool p_goto_definition) {
|
||||
|
||||
context_menu->clear();
|
||||
if (p_selection) {
|
||||
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/cut"), EDIT_CUT);
|
||||
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/copy"), EDIT_COPY);
|
||||
}
|
||||
|
||||
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/paste"), EDIT_PASTE);
|
||||
context_menu->add_separator();
|
||||
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/select_all"), EDIT_SELECT_ALL);
|
||||
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/undo"), EDIT_UNDO);
|
||||
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/redo"), EDIT_REDO);
|
||||
|
||||
context_menu->add_separator();
|
||||
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/cut"), EDIT_CUT);
|
||||
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/copy"), EDIT_COPY);
|
||||
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/paste"), EDIT_PASTE);
|
||||
|
||||
context_menu->add_separator();
|
||||
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/select_all"), EDIT_SELECT_ALL);
|
||||
|
||||
context_menu->add_separator();
|
||||
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_left"), EDIT_INDENT_LEFT);
|
||||
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_right"), EDIT_INDENT_RIGHT);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue