mirror of
https://github.com/raysan5/raylib.git
synced 2026-02-03 04:39:18 -05:00
Review mouse inputs
This commit is contained in:
@ -2479,8 +2479,8 @@ bool IsMouseButtonPressed(int button)
|
|||||||
if (IsGestureDetected(GESTURE_TAP)) pressed = true;
|
if (IsGestureDetected(GESTURE_TAP)) pressed = true;
|
||||||
#else
|
#else
|
||||||
// NOTE: On PLATFORM_DESKTOP and PLATFORM_WEB IsMouseButtonPressed() is equivalent to GESTURE_TAP
|
// NOTE: On PLATFORM_DESKTOP and PLATFORM_WEB IsMouseButtonPressed() is equivalent to GESTURE_TAP
|
||||||
if (((CORE.Input.Mouse.currentButtonState[button] != CORE.Input.Mouse.previousButtonState[button]) &&
|
if ((CORE.Input.Mouse.currentButtonState[button] != CORE.Input.Mouse.previousButtonState[button]) &&
|
||||||
(CORE.Input.Mouse.currentButtonState[button] == 1)) || IsGestureDetected(GESTURE_TAP)) pressed = true;
|
(GetMouseButtonStatus(button) == 1)) pressed = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return pressed;
|
return pressed;
|
||||||
@ -2495,7 +2495,8 @@ bool IsMouseButtonDown(int button)
|
|||||||
if (IsGestureDetected(GESTURE_HOLD)) down = true;
|
if (IsGestureDetected(GESTURE_HOLD)) down = true;
|
||||||
#else
|
#else
|
||||||
// NOTE: On PLATFORM_DESKTOP and PLATFORM_WEB IsMouseButtonDown() is equivalent to GESTURE_HOLD or GESTURE_DRAG
|
// NOTE: On PLATFORM_DESKTOP and PLATFORM_WEB IsMouseButtonDown() is equivalent to GESTURE_HOLD or GESTURE_DRAG
|
||||||
if ((GetMouseButtonStatus(button) == 1) || IsGestureDetected(GESTURE_HOLD) || IsGestureDetected(GESTURE_DRAG)) down = true;
|
if (GetMouseButtonStatus(button) == 1) down = true;
|
||||||
|
// || IsGestureDetected(GESTURE_HOLD) || IsGestureDetected(GESTURE_DRAG)) down = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return down;
|
return down;
|
||||||
@ -2508,7 +2509,7 @@ bool IsMouseButtonReleased(int button)
|
|||||||
|
|
||||||
#if !defined(PLATFORM_ANDROID)
|
#if !defined(PLATFORM_ANDROID)
|
||||||
if ((CORE.Input.Mouse.currentButtonState[button] != CORE.Input.Mouse.previousButtonState[button]) &&
|
if ((CORE.Input.Mouse.currentButtonState[button] != CORE.Input.Mouse.previousButtonState[button]) &&
|
||||||
(CORE.Input.Mouse.currentButtonState[button] == 0)) released = true;
|
(GetMouseButtonStatus(button) == 0)) released = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return released;
|
return released;
|
||||||
|
|||||||
Reference in New Issue
Block a user