瀏覽代碼

[2025-07-07] Add curly brackets to mouse and input coordinates C# code

Andrew Conlin 2 周之前
父節點
當前提交
f4b57a9456
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      tutorials/inputs/mouse_and_input_coordinates.rst

+ 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);