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/text | |
| 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/text')
| -rw-r--r-- | examples/text/text_draw_3d.c | 2 | ||||
| -rw-r--r-- | examples/text/text_rectangle_bounds.c | 4 | ||||
| -rw-r--r-- | examples/text/text_unicode.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/examples/text/text_draw_3d.c b/examples/text/text_draw_3d.c index 4a385f7a..bc4c5529 100644 --- a/examples/text/text_draw_3d.c +++ b/examples/text/text_draw_3d.c @@ -186,7 +186,7 @@ int main(void) } // Handle clicking the cube - if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON)) + if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT)) { Ray ray = GetMouseRay(GetMousePosition(), camera); diff --git a/examples/text/text_rectangle_bounds.c b/examples/text/text_rectangle_bounds.c index cb246955..9754cd45 100644 --- a/examples/text/text_rectangle_bounds.c +++ b/examples/text/text_rectangle_bounds.c @@ -61,7 +61,7 @@ tempor incididunt ut labore et dolore magna aliqua. Nec ullamcorper sit amet ris // Container resizing logic if (resizing) { - if (IsMouseButtonReleased(MOUSE_LEFT_BUTTON)) resizing = false; + if (IsMouseButtonReleased(MOUSE_BUTTON_LEFT)) resizing = false; float width = container.width + (mouse.x - lastMouse.x); container.width = (width > minWidth)? ((width < maxWidth)? width : maxWidth) : minWidth; @@ -72,7 +72,7 @@ tempor incididunt ut labore et dolore magna aliqua. Nec ullamcorper sit amet ris else { // Check if we're resizing - if (IsMouseButtonDown(MOUSE_LEFT_BUTTON) && CheckCollisionPointRec(mouse, resizer)) resizing = true; + if (IsMouseButtonDown(MOUSE_BUTTON_LEFT) && CheckCollisionPointRec(mouse, resizer)) resizing = true; } // Move resizer rectangle properly diff --git a/examples/text/text_unicode.c b/examples/text/text_unicode.c index f481cb2d..fa336de7 100644 --- a/examples/text/text_unicode.c +++ b/examples/text/text_unicode.c @@ -180,7 +180,7 @@ int main(int argc, char **argv) if (IsKeyPressed(KEY_SPACE)) RandomizeEmoji(); // Set the selected emoji and copy its text to clipboard - if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON) && (hovered != -1) && (hovered != selected)) + if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT) && (hovered != -1) && (hovered != selected)) { selected = hovered; selectedPos = hoveredPos; |
