diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-08-25 23:49:43 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-08-25 23:49:43 +0200 |
commit | cb58df155c53fc19ed64b6b69a7ab1c44f049f3b (patch) | |
tree | e2dcb4d3ae88ca4f6c0d40d3a3fb7d48eca4424b /editor | |
parent | 2ec621fac3e4e9c3324eb083599dbd15073ac09b (diff) |
only allow z level switch when modifier held
Diffstat (limited to 'editor')
-rw-r--r-- | editor/update.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/update.cpp b/editor/update.cpp index 64d6a2a6..a6f1aca5 100644 --- a/editor/update.cpp +++ b/editor/update.cpp @@ -116,6 +116,8 @@ void app::do_mouse_up_down(uint8_t button, bool is_down, int mods) void app::do_mouse_scroll(int offset) { auto mods = get_key_modifiers(); + if (!(mods & (kmod_ctrl|kmod_shift))) + return; int min_z = mods & kmod_ctrl ? chunk_z_min : std::max(0, (int)chunk_z_min); _z_level = (int8_t)Math::clamp(_z_level + offset, min_z, (int)chunk_z_max); } |