From 2545f62565fd246d1c59bf9a6bcf4942f4ad12ad Mon Sep 17 00:00:00 2001 From: Lambert Wang <77245864+lambert-wang@users.noreply.github.com> Date: Sat, 8 May 2021 09:26:24 -0700 Subject: Added support for additional mouse buttons (#1753) * Added support for additional mouse buttons * Renamed mouse button enum Co-authored-by: Lambert Wang --- examples/physics/physics_demo.c | 4 ++-- examples/physics/physics_shatter.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/physics') diff --git a/examples/physics/physics_demo.c b/examples/physics/physics_demo.c index 1acb0d13..fd4c1d25 100644 --- a/examples/physics/physics_demo.c +++ b/examples/physics/physics_demo.c @@ -63,8 +63,8 @@ int main(void) } // Physics body creation inputs - if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON)) CreatePhysicsBodyPolygon(GetMousePosition(), GetRandomValue(20, 80), GetRandomValue(3, 8), 10); - else if (IsMouseButtonPressed(MOUSE_RIGHT_BUTTON)) CreatePhysicsBodyCircle(GetMousePosition(), GetRandomValue(10, 45), 10); + if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT)) CreatePhysicsBodyPolygon(GetMousePosition(), GetRandomValue(20, 80), GetRandomValue(3, 8), 10); + else if (IsMouseButtonPressed(MOUSE_BUTTON_RIGHT)) CreatePhysicsBodyCircle(GetMousePosition(), GetRandomValue(10, 45), 10); // Destroy falling physics bodies int bodiesCount = GetPhysicsBodiesCount(); diff --git a/examples/physics/physics_shatter.c b/examples/physics/physics_shatter.c index d14e9ba6..6c5bebfd 100644 --- a/examples/physics/physics_shatter.c +++ b/examples/physics/physics_shatter.c @@ -53,7 +53,7 @@ int main(void) CreatePhysicsBodyPolygon((Vector2){ screenWidth/2.0f, screenHeight/2.0f }, GetRandomValue(80, 200), GetRandomValue(3, 8), 10); } - if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON)) // Physics shatter input + if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT)) // Physics shatter input { int count = GetPhysicsBodiesCount(); for (int i = count - 1; i >= 0; i--) -- cgit v1.2.3