Move GetMouseWheelMove out of rcore
This commit is contained in:
parent
ea71464653
commit
959a466b37
13
src/rcore.c
13
src/rcore.c
|
|
@ -2099,19 +2099,6 @@ void SetMouseScale(float scaleX, float scaleY)
|
||||||
CORE.Input.Mouse.scale = (Vector2){ scaleX, scaleY };
|
CORE.Input.Mouse.scale = (Vector2){ scaleX, scaleY };
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get mouse wheel movement Y
|
|
||||||
float GetMouseWheelMove(void)
|
|
||||||
{
|
|
||||||
float result = 0.0f;
|
|
||||||
|
|
||||||
#if !defined(PLATFORM_ANDROID)
|
|
||||||
if (fabsf(CORE.Input.Mouse.currentWheelMove.x) > fabsf(CORE.Input.Mouse.currentWheelMove.y)) result = (float)CORE.Input.Mouse.currentWheelMove.x;
|
|
||||||
else result = (float)CORE.Input.Mouse.currentWheelMove.y;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get mouse wheel movement X/Y as a vector
|
// Get mouse wheel movement X/Y as a vector
|
||||||
Vector2 GetMouseWheelMoveV(void)
|
Vector2 GetMouseWheelMoveV(void)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1676,3 +1676,10 @@ void SetMousePosition(int x, int y)
|
||||||
CORE.Input.Mouse.currentPosition = (Vector2){ (float)x, (float)y };
|
CORE.Input.Mouse.currentPosition = (Vector2){ (float)x, (float)y };
|
||||||
CORE.Input.Mouse.previousPosition = CORE.Input.Mouse.currentPosition;
|
CORE.Input.Mouse.previousPosition = CORE.Input.Mouse.currentPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Get mouse wheel movement Y
|
||||||
|
float GetMouseWheelMove(void)
|
||||||
|
{
|
||||||
|
return 0.0f;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1568,3 +1568,15 @@ void SetMousePosition(int x, int y)
|
||||||
// NOTE: emscripten not implemented
|
// NOTE: emscripten not implemented
|
||||||
glfwSetCursorPos(CORE.Window.handle, CORE.Input.Mouse.currentPosition.x, CORE.Input.Mouse.currentPosition.y);
|
glfwSetCursorPos(CORE.Window.handle, CORE.Input.Mouse.currentPosition.x, CORE.Input.Mouse.currentPosition.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Get mouse wheel movement Y
|
||||||
|
float GetMouseWheelMove(void)
|
||||||
|
{
|
||||||
|
float result = 0.0f;
|
||||||
|
|
||||||
|
if (fabsf(CORE.Input.Mouse.currentWheelMove.x) > fabsf(CORE.Input.Mouse.currentWheelMove.y)) result = (float)CORE.Input.Mouse.currentWheelMove.x;
|
||||||
|
else result = (float)CORE.Input.Mouse.currentWheelMove.y;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1005,4 +1005,17 @@ void SetMousePosition(int x, int y)
|
||||||
{
|
{
|
||||||
CORE.Input.Mouse.currentPosition = (Vector2){ (float)x, (float)y };
|
CORE.Input.Mouse.currentPosition = (Vector2){ (float)x, (float)y };
|
||||||
CORE.Input.Mouse.previousPosition = CORE.Input.Mouse.currentPosition;
|
CORE.Input.Mouse.previousPosition = CORE.Input.Mouse.currentPosition;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Get mouse wheel movement Y
|
||||||
|
float GetMouseWheelMove(void)
|
||||||
|
{
|
||||||
|
float result = 0.0f;
|
||||||
|
|
||||||
|
if (fabsf(CORE.Input.Mouse.currentWheelMove.x) > fabsf(CORE.Input.Mouse.currentWheelMove.y)) result = (float)CORE.Input.Mouse.currentWheelMove.x;
|
||||||
|
else result = (float)CORE.Input.Mouse.currentWheelMove.y;
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1609,3 +1609,15 @@ void SetMousePosition(int x, int y)
|
||||||
// NOTE: emscripten not implemented
|
// NOTE: emscripten not implemented
|
||||||
glfwSetCursorPos(CORE.Window.handle, CORE.Input.Mouse.currentPosition.x, CORE.Input.Mouse.currentPosition.y);
|
glfwSetCursorPos(CORE.Window.handle, CORE.Input.Mouse.currentPosition.x, CORE.Input.Mouse.currentPosition.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Get mouse wheel movement Y
|
||||||
|
float GetMouseWheelMove(void)
|
||||||
|
{
|
||||||
|
float result = 0.0f;
|
||||||
|
|
||||||
|
if (fabsf(CORE.Input.Mouse.currentWheelMove.x) > fabsf(CORE.Input.Mouse.currentWheelMove.y)) result = (float)CORE.Input.Mouse.currentWheelMove.x;
|
||||||
|
else result = (float)CORE.Input.Mouse.currentWheelMove.y;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user