From 9bc534896135322a578118f433f0dc6265839082 Mon Sep 17 00:00:00 2001 From: Andreas Haas Date: Sat, 3 Jun 2017 10:54:24 +0200 Subject: InputEvent: Renamed "pos" property to "position" Make the naming consistent with other classes. --- main/input_default.cpp | 8 ++++---- main/tests/test_physics_2d.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'main') diff --git a/main/input_default.cpp b/main/input_default.cpp index 0de30e5e9e..0ac97bf800 100644 --- a/main/input_default.cpp +++ b/main/input_default.cpp @@ -325,11 +325,11 @@ void InputDefault::parse_input_event(const Ref &p_event) { Ref touch_event; touch_event.instance(); touch_event->set_pressed(mb->is_pressed()); - touch_event->set_pos(mb->get_pos()); + touch_event->set_position(mb->get_position()); main_loop->input_event(touch_event); } - Point2 pos = mb->get_global_pos(); + Point2 pos = mb->get_global_position(); if (mouse_pos != pos) { set_mouse_position(pos); } @@ -343,7 +343,7 @@ void InputDefault::parse_input_event(const Ref &p_event) { Ref drag_event; drag_event.instance(); - drag_event->set_pos(mm->get_pos()); + drag_event->set_position(mm->get_position()); drag_event->set_relative(mm->get_relative()); drag_event->set_speed(mm->get_speed()); @@ -493,7 +493,7 @@ Point2i InputDefault::warp_mouse_motion(const Ref &p_moti Math::fmod(p_motion->get_relative().x + rel_sgn.x * warp_margin.x, p_rect.size.x) - rel_sgn.x * warp_margin.x, Math::fmod(p_motion->get_relative().y + rel_sgn.y * warp_margin.y, p_rect.size.y) - rel_sgn.y * warp_margin.y); - const Point2i pos_local = p_motion->get_global_pos() - p_rect.pos; + const Point2i pos_local = p_motion->get_global_position() - p_rect.pos; const Point2i pos_warped(Math::fposmod(pos_local.x, p_rect.size.x), Math::fposmod(pos_local.y, p_rect.size.y)); if (pos_warped != pos_local) { OS::get_singleton()->warp_mouse_pos(pos_warped + p_rect.pos); diff --git a/main/tests/test_physics_2d.cpp b/main/tests/test_physics_2d.cpp index 5f57275503..2c9b51aadb 100644 --- a/main/tests/test_physics_2d.cpp +++ b/main/tests/test_physics_2d.cpp @@ -216,7 +216,7 @@ protected: if (mb->is_pressed()) { - Point2 p(mb->get_pos().x, mb->get_pos().y); + Point2 p(mb->get_position().x, mb->get_position().y); if (mb->get_button_index() == 1) { ray_to = p; @@ -232,7 +232,7 @@ protected: if (mm.is_valid()) { - Point2 p = mm->get_pos(); + Point2 p = mm->get_position(); if (mm->get_button_mask() & BUTTON_MASK_LEFT) { ray_to = p; -- cgit v1.2.3