Merge pull request #14475 from volzhs/mouse_position

Fix mouse position in viewport
This commit is contained in:
Rémi Verschelde 2017-12-10 00:18:02 +01:00 committed by GitHub
commit f09e2cf094
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1269,12 +1269,9 @@ Transform2D Viewport::_get_input_pre_xform() const {
Vector2 Viewport::_get_window_offset() const { Vector2 Viewport::_get_window_offset() const {
/* if (get_parent() && get_parent()->has_method("get_global_position")) {
if (parent_control) { return get_parent()->call("get_global_position");
return (parent_control->get_viewport()->get_final_transform() * parent_control->get_global_transform_with_canvas()).get_origin();
} }
*/
return Vector2(); return Vector2();
} }