From f51c77dd7f15b204f1cce81b7ce86ada705b4a09 Mon Sep 17 00:00:00 2001 From: Rudi Date: Sat, 28 Jan 2023 11:38:23 -0800 Subject: [PATCH] Replace `ButtonList` enum with `MouseButton` (#6334) Replace `ButtonList` enum with `MouseButton` Switched `ButtonList` enum to `MouseButton` since `MouseButton` is defined in `InputEventMouse`, while `ButtonList` was undefined in `Godot` namespace. --- tutorials/inputs/input_examples.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tutorials/inputs/input_examples.rst b/tutorials/inputs/input_examples.rst index 237ab0c8e..30e426560 100644 --- a/tutorials/inputs/input_examples.rst +++ b/tutorials/inputs/input_examples.rst @@ -296,12 +296,12 @@ also counts as a button - two buttons, to be precise, with both { if (inputEvent is InputEventMouseButton mouseEvent && mouseEvent.Pressed) { - switch ((ButtonList)mouseEvent.ButtonIndex) + switch (mouseEvent.ButtonIndex) { - case ButtonList.Left: - GD.Print("Left button was clicked at ", {mouseEvent.Position}); + case MouseButton.Left: + GD.Print($"Left button was clicked at {mouseEvent.Position}"); break; - case ButtonList.WheelUp: + case MouseButton.WheelUp: GD.Print("Wheel up"); break; }