renamed all Rect2.pos to Rect2.position
This commit is contained in:
parent
69bec86028
commit
a3c90b0293
84 changed files with 685 additions and 685 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue