You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
renamed all Rect2.pos to Rect2.position
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user