2
0
Эх сурвалжийг харах

Merge pull request #8149 from Hex-4/fix-mouse-and-input-coords-page

close #8074, update mouse and input coordinates page
Max Hilbrunner 1 жил өмнө
parent
commit
fd94ebfaab

+ 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_rect().size)
+       print("Viewport Resolution is: ", get_viewport().get_visible_rect())
 
 
  .. 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().Size);
+        GD.Print("Viewport Resolution is: ", GetViewportRect().GetVisibleRect());
     }
     }
 
 
 Alternatively, it's possible to ask the viewport for the mouse position:
 Alternatively, it's possible to ask the viewport for the mouse position: