diff options
author | Andreas Haas <liu.gam3@gmail.com> | 2017-06-03 10:54:24 +0200 |
---|---|---|
committer | Andreas Haas <liu.gam3@gmail.com> | 2017-06-03 11:26:39 +0200 |
commit | 9bc534896135322a578118f433f0dc6265839082 (patch) | |
tree | 30316ffea9d6321c6b8292a02b6db3dac9cd1053 /main | |
parent | 5a6d4971e13157cc5f0de199de7f6d257070fc66 (diff) |
InputEvent: Renamed "pos" property to "position"
Make the naming consistent with other classes.
Diffstat (limited to 'main')
-rw-r--r-- | main/input_default.cpp | 8 | ||||
-rw-r--r-- | main/tests/test_physics_2d.cpp | 4 |
2 files changed, 6 insertions, 6 deletions
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<InputEvent> &p_event) { Ref<InputEventScreenTouch> 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<InputEvent> &p_event) { Ref<InputEventScreenDrag> 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<InputEventMouseMotion> &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; |