summaryrefslogtreecommitdiff
path: root/tests/servers/test_physics_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/servers/test_physics_2d.cpp')
-rw-r--r--tests/servers/test_physics_2d.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/servers/test_physics_2d.cpp b/tests/servers/test_physics_2d.cpp
index b6360cde8a..06aa88b5c0 100644
--- a/tests/servers/test_physics_2d.cpp
+++ b/tests/servers/test_physics_2d.cpp
@@ -196,10 +196,10 @@ protected:
if (mb->is_pressed()) {
Point2 p = mb->get_position();
- if (mb->get_button_index() == 1) {
+ if (mb->get_button_index() == MouseButton::LEFT) {
ray_to = p;
_do_ray_query();
- } else if (mb->get_button_index() == 2) {
+ } else if (mb->get_button_index() == MouseButton::RIGHT) {
ray_from = p;
_do_ray_query();
}
@@ -211,10 +211,10 @@ protected:
if (mm.is_valid()) {
Point2 p = mm->get_position();
- if (mm->get_button_mask() & MOUSE_BUTTON_MASK_LEFT) {
+ if ((mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) {
ray_to = p;
_do_ray_query();
- } else if (mm->get_button_mask() & MOUSE_BUTTON_MASK_RIGHT) {
+ } else if ((mm->get_button_mask() & MouseButton::MASK_RIGHT) != MouseButton::NONE) {
ray_from = p;
_do_ray_query();
}