Browse Source

Make KEY_ESCAPE close all output/debugger docks on bottom

Bernhard Liebl 7 năm trước cách đây
mục cha
commit
2ae2735a7a
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      editor/editor_node.cpp

+ 6 - 0
editor/editor_node.cpp

@@ -217,6 +217,12 @@ void EditorNode::_unhandled_input(const Ref<InputEvent> &p_event) {
 		} else if (ED_IS_SHORTCUT("editor/editor_prev", p_event)) {
 		} else if (ED_IS_SHORTCUT("editor/editor_prev", p_event)) {
 			_editor_select_prev();
 			_editor_select_prev();
 		}
 		}
+
+		if (k->get_scancode() == KEY_ESCAPE) {
+			for (int i = 0; i < bottom_panel_items.size(); i++) {
+				_bottom_panel_switch(false, i);
+			}
+		}
 	}
 	}
 }
 }