diff options
| author | Bojidar Marinov | 2016-04-06 14:24:35 +0300 |
|---|---|---|
| committer | Rémi Verschelde | 2016-04-06 18:49:26 +0200 |
| commit | dea6671d587b242288f957f814ff94b7eb6d3003 (patch) | |
| tree | e6d87eb683751cb10379ba325c046631697a24e9 /tools | |
| parent | 7c6d2e7062e72ac9d187ace77f95e250091418af (diff) | |
| download | godot-dea6671d587b242288f957f814ff94b7eb6d3003.tar.gz godot-dea6671d587b242288f957f814ff94b7eb6d3003.tar.zst godot-dea6671d587b242288f957f814ff94b7eb6d3003.zip | |
Bind Z key (without modifiers) to toggle wireframe in 3D view
Fixed #4124
(cherry picked from commit 8ee8802cbe753c9cb6472da9f906a71954ecae5e)
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/editor/plugins/spatial_editor_plugin.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp index 12b662bbe..dbf241a8b 100644 --- a/tools/editor/plugins/spatial_editor_plugin.cpp +++ b/tools/editor/plugins/spatial_editor_plugin.cpp @@ -3600,6 +3600,17 @@ void SpatialEditor::_unhandled_key_input(InputEvent p_event) { case KEY_E: _menu_item_pressed(MENU_TOOL_ROTATE); break; case KEY_R: _menu_item_pressed(MENU_TOOL_SCALE); break; + case KEY_Z: { + if (k.mod.shift || k.mod.control || k.mod.command) + break; + + if (view_menu->get_popup()->is_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_DISPLAY_WIREFRAME))) { + _menu_item_pressed(MENU_VIEW_DISPLAY_NORMAL); + } else { + _menu_item_pressed(MENU_VIEW_DISPLAY_WIREFRAME); + } + } break; + #if 0 #endif } |
