mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-21 18:58:14 +00:00
Support any mouse button for gesture detection
This commit is contained in:
@@ -4021,8 +4021,8 @@ static void MouseButtonCallback(GLFWwindow *window, int button, int action, int
|
|||||||
GestureEvent gestureEvent = { 0 };
|
GestureEvent gestureEvent = { 0 };
|
||||||
|
|
||||||
// Register touch actions
|
// Register touch actions
|
||||||
if ((CORE.Input.Mouse.currentButtonState[MOUSE_LEFT_BUTTON] != CORE.Input.Mouse.previousButtonState[MOUSE_LEFT_BUTTON]) &&
|
if ((CORE.Input.Mouse.currentButtonState[button] != CORE.Input.Mouse.previousButtonState[button]) &&
|
||||||
(CORE.Input.Mouse.currentButtonState[MOUSE_LEFT_BUTTON] == 1)) gestureEvent.touchAction = TOUCH_DOWN;
|
(CORE.Input.Mouse.currentButtonState[button] == 1)) gestureEvent.touchAction = TOUCH_DOWN;
|
||||||
else if ((CORE.Input.Mouse.currentButtonState[button] != CORE.Input.Mouse.previousButtonState[button]) &&
|
else if ((CORE.Input.Mouse.currentButtonState[button] != CORE.Input.Mouse.previousButtonState[button]) &&
|
||||||
(CORE.Input.Mouse.currentButtonState[button] == 0)) gestureEvent.touchAction = TOUCH_UP;
|
(CORE.Input.Mouse.currentButtonState[button] == 0)) gestureEvent.touchAction = TOUCH_UP;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user