소스 검색

Replaces CTRL with CMD in TileMapEditor for MacOS.

Replacing CTRL with CMD makes sense dure to consistency
with MacOS and avoiding conflict with the accessibility
hotkey (ctrl+lmb = rmb)

Fixes: #18238
Anish 7 년 전
부모
커밋
cca7633739
1개의 변경된 파일12개의 추가작업 그리고 3개의 파일을 삭제
  1. 12 3
      editor/plugins/tile_map_editor_plugin.cpp

+ 12 - 3
editor/plugins/tile_map_editor_plugin.cpp

@@ -724,7 +724,11 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
 
 
 					if (mb->get_shift()) {
 					if (mb->get_shift()) {
 
 
+#ifdef APPLE_STYLE_KEYS
+						if (mb->get_command())
+#else
 						if (mb->get_control())
 						if (mb->get_control())
+#endif
 							tool = TOOL_RECTANGLE_PAINT;
 							tool = TOOL_RECTANGLE_PAINT;
 						else
 						else
 							tool = TOOL_LINE_PAINT;
 							tool = TOOL_LINE_PAINT;
@@ -734,9 +738,11 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
 
 
 						return true;
 						return true;
 					}
 					}
-
+#ifdef APPLE_STYLE_KEYS
+					if (mb->get_command()) {
+#else
 					if (mb->get_control()) {
 					if (mb->get_control()) {
-
+#endif
 						tool = TOOL_PICKING;
 						tool = TOOL_PICKING;
 						_pick_tile(over_tile);
 						_pick_tile(over_tile);
 
 
@@ -940,8 +946,11 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
 					undo_redo->add_undo_method(node, "set", "tile_data", node->get("tile_data"));
 					undo_redo->add_undo_method(node, "set", "tile_data", node->get("tile_data"));
 
 
 					if (mb->get_shift()) {
 					if (mb->get_shift()) {
-
+#ifdef APPLE_STYLE_KEYS
+						if (mb->get_command())
+#else
 						if (mb->get_control())
 						if (mb->get_control())
+#endif
 							tool = TOOL_RECTANGLE_ERASE;
 							tool = TOOL_RECTANGLE_ERASE;
 						else
 						else
 							tool = TOOL_LINE_ERASE;
 							tool = TOOL_LINE_ERASE;