Browse Source

update mouse and input coords page (again)

Hex-4 1 year ago
parent
commit
2e29e988f9
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tutorials/inputs/mouse_and_input_coordinates.rst

+ 2 - 2
tutorials/inputs/mouse_and_input_coordinates.rst

@@ -36,7 +36,7 @@ for example:
            print("Mouse Motion at: ", event.position)
            print("Mouse Motion at: ", event.position)
 
 
        # Print the size of the viewport.
        # Print the size of the viewport.
-       print("Viewport Resolution is: ", get_viewport().get_visible_rect())
+       print("Viewport Resolution is: ", get_viewport().get_visible_rect().size)
 
 
  .. code-tab:: csharp
  .. code-tab:: csharp
 
 
@@ -49,7 +49,7 @@ for example:
             GD.Print("Mouse Motion at: ", eventMouseMotion.Position);
             GD.Print("Mouse Motion at: ", eventMouseMotion.Position);
 
 
         // Print the size of the viewport.
         // Print the size of the viewport.
-        GD.Print("Viewport Resolution is: ", GetViewportRect().GetVisibleRect());
+        GD.Print("Viewport Resolution is: ", GetViewport().GetVisibleRect().Size);
     }
     }
 
 
 Alternatively, it's possible to ask the viewport for the mouse position:
 Alternatively, it's possible to ask the viewport for the mouse position: