From a5811a29fba57c0328651823ef5c530c564ec0b0 Mon Sep 17 00:00:00 2001 From: Hex-4 <121138331+Hex-4@users.noreply.github.com> Date: Wed, 4 Oct 2023 01:15:49 +0000 Subject: [PATCH] close #8074, update mouse and input coordinates page --- tutorials/inputs/mouse_and_input_coordinates.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorials/inputs/mouse_and_input_coordinates.rst b/tutorials/inputs/mouse_and_input_coordinates.rst index 459068e7309..e67b0d8a38f 100644 --- a/tutorials/inputs/mouse_and_input_coordinates.rst +++ b/tutorials/inputs/mouse_and_input_coordinates.rst @@ -36,7 +36,7 @@ for example: print("Mouse Motion at: ", event.position) # Print the size of the viewport. - print("Viewport Resolution is: ", get_viewport_rect().size) + print("Viewport Resolution is: ", get_viewport().get_visible_rect()) .. code-tab:: csharp @@ -49,7 +49,7 @@ for example: GD.Print("Mouse Motion at: ", eventMouseMotion.Position); // Print the size of the viewport. - GD.Print("Viewport Resolution is: ", GetViewportRect().Size); + GD.Print("Viewport Resolution is: ", GetViewportRect().GetVisibleRect()); } Alternatively, it's possible to ask the viewport for the mouse position: