summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-12-10 00:18:02 +0100
committerGitHub <noreply@github.com>2017-12-10 00:18:02 +0100
commitf09e2cf09436e1e63936d011f9eec72dd18ff20a (patch)
treecb301a5b52423355b3557ec0160eff5c458f74f8 /scene
parent58e8da57de06aa0e44ea2bc11a061cc0d1029c43 (diff)
parent0e9d31a2e676b9be255eca216737e99ac6709610 (diff)
Merge pull request #14475 from volzhs/mouse_position
Fix mouse position in viewport
Diffstat (limited to 'scene')
-rw-r--r--scene/main/viewport.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index a785abbc65..ea8adc58cd 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -1269,12 +1269,9 @@ Transform2D Viewport::_get_input_pre_xform() const {
Vector2 Viewport::_get_window_offset() const {
- /*
- if (parent_control) {
- return (parent_control->get_viewport()->get_final_transform() * parent_control->get_global_transform_with_canvas()).get_origin();
+ if (get_parent() && get_parent()->has_method("get_global_position")) {
+ return get_parent()->call("get_global_position");
}
- */
-
return Vector2();
}