Skip to content

Commit a5811a2

Browse files
committed
close #8074, update mouse and input coordinates page
1 parent 793baa1 commit a5811a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tutorials/inputs/mouse_and_input_coordinates.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ for example:
3636
print("Mouse Motion at: ", event.position)
3737

3838
# Print the size of the viewport.
39-
print("Viewport Resolution is: ", get_viewport_rect().size)
39+
print("Viewport Resolution is: ", get_viewport().get_visible_rect())
4040

4141
.. code-tab:: csharp
4242

@@ -49,7 +49,7 @@ for example:
4949
GD.Print("Mouse Motion at: ", eventMouseMotion.Position);
5050

5151
// Print the size of the viewport.
52-
GD.Print("Viewport Resolution is: ", GetViewportRect().Size);
52+
GD.Print("Viewport Resolution is: ", GetViewportRect().GetVisibleRect());
5353
}
5454

5555
Alternatively, it's possible to ask the viewport for the mouse position:

0 commit comments

Comments
 (0)