Added support for additional mouse buttons (#1753)
* Added support for additional mouse buttons * Renamed mouse button enum Co-authored-by: Lambert Wang <lambert.ww@gmail.com>
This commit is contained in:
parent
2565c01158
commit
2545f62565
27 changed files with 81 additions and 65 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue