diff options
| author | Lambert Wang <[email protected]> | 2021-05-08 09:26:24 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-05-08 18:26:24 +0200 |
| commit | 2545f62565fd246d1c59bf9a6bcf4942f4ad12ad (patch) | |
| tree | 817bd3580c3b7c4037a545d552d90f699be879b3 /examples/shapes | |
| parent | 2565c011580fda074e0f3dceacd5e6a1476b3284 (diff) | |
| download | raylib-2545f62565fd246d1c59bf9a6bcf4942f4ad12ad.tar.gz raylib-2545f62565fd246d1c59bf9a6bcf4942f4ad12ad.zip | |
Added support for additional mouse buttons (#1753)
* Added support for additional mouse buttons
* Renamed mouse button enum
Co-authored-by: Lambert Wang <[email protected]>
Diffstat (limited to 'examples/shapes')
| -rw-r--r-- | examples/shapes/shapes_lines_bezier.c | 4 | ||||
| -rw-r--r-- | examples/shapes/shapes_rectangle_scaling.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/shapes/shapes_lines_bezier.c b/examples/shapes/shapes_lines_bezier.c index 00b68c9f..634eb284 100644 --- a/examples/shapes/shapes_lines_bezier.c +++ b/examples/shapes/shapes_lines_bezier.c @@ -32,8 +32,8 @@ int main(void) { // Update //---------------------------------------------------------------------------------- - if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) start = GetMousePosition(); - else if (IsMouseButtonDown(MOUSE_RIGHT_BUTTON)) end = GetMousePosition(); + if (IsMouseButtonDown(MOUSE_BUTTON_LEFT)) start = GetMousePosition(); + else if (IsMouseButtonDown(MOUSE_BUTTON_RIGHT)) end = GetMousePosition(); //---------------------------------------------------------------------------------- // Draw diff --git a/examples/shapes/shapes_rectangle_scaling.c b/examples/shapes/shapes_rectangle_scaling.c index 6940cbcd..bd1f0648 100644 --- a/examples/shapes/shapes_rectangle_scaling.c +++ b/examples/shapes/shapes_rectangle_scaling.c @@ -45,7 +45,7 @@ int main(void) CheckCollisionPointRec(mousePosition, (Rectangle){ rec.x + rec.width - MOUSE_SCALE_MARK_SIZE, rec.y + rec.height - MOUSE_SCALE_MARK_SIZE, MOUSE_SCALE_MARK_SIZE, MOUSE_SCALE_MARK_SIZE })) { mouseScaleReady = true; - if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON)) mouseScaleMode = true; + if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT)) mouseScaleMode = true; } else mouseScaleReady = false; @@ -59,7 +59,7 @@ int main(void) if (rec.width < MOUSE_SCALE_MARK_SIZE) rec.width = MOUSE_SCALE_MARK_SIZE; if (rec.height < MOUSE_SCALE_MARK_SIZE) rec.height = MOUSE_SCALE_MARK_SIZE; - if (IsMouseButtonReleased(MOUSE_LEFT_BUTTON)) mouseScaleMode = false; + if (IsMouseButtonReleased(MOUSE_BUTTON_LEFT)) mouseScaleMode = false; } //---------------------------------------------------------------------------------- |
