summaryrefslogtreecommitdiff
path: root/editor/import
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2021-08-13 16:31:57 -0500
committerAaron Franke <arnfranke@yahoo.com>2021-11-12 15:37:54 -0600
commit3c0fdcc8acfadb124fbfa914532868948561c351 (patch)
treee6d222c6488c1e4f1a9e4ffa68c1404473a00843 /editor/import
parent4f85cad013c5469a39287e9aa474735f950e302c (diff)
Use "enum class" for input enums
Diffstat (limited to 'editor/import')
-rw-r--r--editor/import/scene_import_settings.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/import/scene_import_settings.cpp b/editor/import/scene_import_settings.cpp
index 9b9320ad6d..9f91a32c44 100644
--- a/editor/import/scene_import_settings.cpp
+++ b/editor/import/scene_import_settings.cpp
@@ -737,21 +737,21 @@ void SceneImportSettings::_viewport_input(const Ref<InputEvent> &p_input) {
zoom = &md.cam_zoom;
}
Ref<InputEventMouseMotion> mm = p_input;
- if (mm.is_valid() && mm->get_button_mask() & MOUSE_BUTTON_MASK_LEFT) {
+ if (mm.is_valid() && (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) {
(*rot_x) -= mm->get_relative().y * 0.01 * EDSCALE;
(*rot_y) -= mm->get_relative().x * 0.01 * EDSCALE;
(*rot_x) = CLAMP((*rot_x), -Math_PI / 2, Math_PI / 2);
_update_camera();
}
Ref<InputEventMouseButton> mb = p_input;
- if (mb.is_valid() && mb->get_button_index() == MOUSE_BUTTON_WHEEL_DOWN) {
+ if (mb.is_valid() && mb->get_button_index() == MouseButton::WHEEL_DOWN) {
(*zoom) *= 1.1;
if ((*zoom) > 10.0) {
(*zoom) = 10.0;
}
_update_camera();
}
- if (mb.is_valid() && mb->get_button_index() == MOUSE_BUTTON_WHEEL_UP) {
+ if (mb.is_valid() && mb->get_button_index() == MouseButton::WHEEL_UP) {
(*zoom) /= 1.1;
if ((*zoom) < 0.1) {
(*zoom) = 0.1;