diff options
author | Daniel J. Ramirez <djrmuv@gmail.com> | 2016-06-19 14:32:49 -0500 |
---|---|---|
committer | Daniel J. Ramirez <djrmuv@gmail.com> | 2016-06-19 14:32:49 -0500 |
commit | 753d86f27ad4fe9b46888269404b68c334efca1e (patch) | |
tree | 0731d9532268a5afc9a55776727803d0b154cd43 /tools/editor | |
parent | 725b9c8c05a9906218ac28a2c7b583e4754d91e5 (diff) |
Switch tabs using CTRL+TAB and CTRL+SHIFT+TAB
Diffstat (limited to 'tools/editor')
-rw-r--r-- | tools/editor/editor_node.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index dd50b720f7..632a94aad9 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -205,6 +205,18 @@ void EditorNode::_unhandled_input(const InputEvent& p_event) { case KEY_F6: _menu_option_confirm(RUN_PLAY_SCENE,true); break; //case KEY_F7: _menu_option_confirm(RUN_PAUSE,true); break; case KEY_F8: _menu_option_confirm(RUN_STOP,true); break;*/ + case KEY_TAB: + if (p_event.key.mod.command) { + int current_tab = editor_data.get_edited_scene(); + int tab_offset = 1; + if (p_event.key.mod.shift) + tab_offset = -1; + int next_tab = current_tab + tab_offset; + next_tab = next_tab >= 0 ? next_tab : editor_data.get_edited_scene_count() - 1; + next_tab %= editor_data.get_edited_scene_count(); + _scene_tab_changed(next_tab); + } + break; } } |