summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnish <anishbhobe@hotmail.com>2018-04-23 19:25:36 +0530
committerAnish <anishbhobe@hotmail.com>2018-04-23 19:39:01 +0530
commitcca7633739e433259b926224f659b9540e518e0a (patch)
tree909f285ceccf81ad6d75050bb3591d7962ad922d
parent1c419531a009f48aa074f9b5f93b98d387c33723 (diff)
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
-rw-r--r--editor/plugins/tile_map_editor_plugin.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp
index 14c584fa35..72b3af5a09 100644
--- a/editor/plugins/tile_map_editor_plugin.cpp
+++ b/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()) {
+#ifdef APPLE_STYLE_KEYS
+ if (mb->get_command())
+#else
if (mb->get_control())
+#endif
tool = TOOL_RECTANGLE_PAINT;
else
tool = TOOL_LINE_PAINT;
@@ -734,9 +738,11 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
return true;
}
-
+#ifdef APPLE_STYLE_KEYS
+ if (mb->get_command()) {
+#else
if (mb->get_control()) {
-
+#endif
tool = TOOL_PICKING;
_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"));
if (mb->get_shift()) {
-
+#ifdef APPLE_STYLE_KEYS
+ if (mb->get_command())
+#else
if (mb->get_control())
+#endif
tool = TOOL_RECTANGLE_ERASE;
else
tool = TOOL_LINE_ERASE;