mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
[2025-07-07] Add curly brackets to mouse and input coordinates C# code
This commit is contained in:
@@ -44,9 +44,13 @@ for example:
|
|||||||
{
|
{
|
||||||
// Mouse in viewport coordinates.
|
// Mouse in viewport coordinates.
|
||||||
if (@event is InputEventMouseButton eventMouseButton)
|
if (@event is InputEventMouseButton eventMouseButton)
|
||||||
|
{
|
||||||
GD.Print("Mouse Click/Unclick at: ", eventMouseButton.Position);
|
GD.Print("Mouse Click/Unclick at: ", eventMouseButton.Position);
|
||||||
|
}
|
||||||
else if (@event is InputEventMouseMotion eventMouseMotion)
|
else if (@event is InputEventMouseMotion eventMouseMotion)
|
||||||
|
{
|
||||||
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: ", GetViewport().GetVisibleRect().Size);
|
GD.Print("Viewport Resolution is: ", GetViewport().GetVisibleRect().Size);
|
||||||
|
|||||||
Reference in New Issue
Block a user