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

Merge pull request #11092 from andrwcnln/mouse-and-input-coordinates-fix

Add curly brackets to mouse and input coordinates C# code
Max Hilbrunner 2 долоо хоног өмнө
parent
commit
42fcf5ca49

+ 4 - 0
tutorials/inputs/mouse_and_input_coordinates.rst

@@ -44,9 +44,13 @@ for example:
     {
         // Mouse in viewport coordinates.
         if (@event is InputEventMouseButton eventMouseButton)
+        {
             GD.Print("Mouse Click/Unclick at: ", eventMouseButton.Position);
+        }
         else if (@event is InputEventMouseMotion eventMouseMotion)
+        {
             GD.Print("Mouse Motion at: ", eventMouseMotion.Position);
+        }
 
         // Print the size of the viewport.
         GD.Print("Viewport Resolution is: ", GetViewport().GetVisibleRect().Size);