Renamed mouse button enum

This commit is contained in:
Lambert Wang 2021-05-07 13:27:59 -07:00
commit 4cc8e79678
3 changed files with 77 additions and 74 deletions

View file

@ -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);

View file

@ -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

View file

@ -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;