summaryrefslogtreecommitdiff
path: root/main/input_default.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-06-05 15:52:05 +0200
committerGitHub <noreply@github.com>2017-06-05 15:52:05 +0200
commitf8d7670e82007103573b88f48fe7b7c4addbd66d (patch)
treef4802061ca26ae9220ec9a5e9d51d80e1a465faa /main/input_default.cpp
parent075c7d8133e4fde353ab54a255638b0c9a3740a5 (diff)
parenta3c90b029308eb46b7fd83a0cf7b502ecbd79d55 (diff)
Merge pull request #9038 from AlexHolly/rect2-rename-pos
renamed all Rect2.pos to Rect2.position
Diffstat (limited to 'main/input_default.cpp')
-rw-r--r--main/input_default.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/input_default.cpp b/main/input_default.cpp
index 0ac97bf800..e488438059 100644
--- a/main/input_default.cpp
+++ b/main/input_default.cpp
@@ -493,10 +493,10 @@ 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_position() - p_rect.pos;
+ const Point2i pos_local = p_motion->get_global_position() - p_rect.position;
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);
+ OS::get_singleton()->warp_mouse_pos(pos_warped + p_rect.position);
}
return rel_warped;