We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 09be277 + a5811a2 commit fd94ebfCopy full SHA for fd94ebf
tutorials/inputs/mouse_and_input_coordinates.rst
@@ -36,7 +36,7 @@ for example:
36
print("Mouse Motion at: ", event.position)
37
38
# Print the size of the viewport.
39
- print("Viewport Resolution is: ", get_viewport_rect().size)
+ print("Viewport Resolution is: ", get_viewport().get_visible_rect())
40
41
.. code-tab:: csharp
42
@@ -49,7 +49,7 @@ for example:
49
GD.Print("Mouse Motion at: ", eventMouseMotion.Position);
50
51
// Print the size of the viewport.
52
- GD.Print("Viewport Resolution is: ", GetViewportRect().Size);
+ GD.Print("Viewport Resolution is: ", GetViewportRect().GetVisibleRect());
53
}
54
55
Alternatively, it's possible to ask the viewport for the mouse position:
0 commit comments