Merge pull request #55706 from jmb462/fix-bad-control-wrap_mouse-offset

Fix bad mouse offset with Control::wrap_mouse()
This commit is contained in:
Rémi Verschelde 2021-12-07 22:38:26 +01:00 committed by GitHub
commit ff118d7a88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2590,7 +2590,7 @@ Control *Control::get_focus_owner() const {
void Control::warp_mouse(const Point2 &p_to_pos) {
ERR_FAIL_COND(!is_inside_tree());
get_viewport()->warp_mouse(get_screen_transform().xform(p_to_pos));
get_viewport()->warp_mouse(get_global_transform().xform(p_to_pos));
}
bool Control::is_text_field() const {