mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-27 21:48:31 +00:00
REVIEWED: Support mouse wheel on x-axis #1948
This commit is contained in:
@@ -5059,7 +5059,8 @@ static void MouseCursorPosCallback(GLFWwindow *window, double x, double y)
|
|||||||
// GLFW3 Srolling Callback, runs on mouse wheel
|
// GLFW3 Srolling Callback, runs on mouse wheel
|
||||||
static void MouseScrollCallback(GLFWwindow *window, double xoffset, double yoffset)
|
static void MouseScrollCallback(GLFWwindow *window, double xoffset, double yoffset)
|
||||||
{
|
{
|
||||||
CORE.Input.Mouse.currentWheelMove = (float)yoffset;
|
if (xoffset != 0.0) CORE.Input.Mouse.currentWheelMove = (float)xoffset;
|
||||||
|
else CORE.Input.Mouse.currentWheelMove = (float)yoffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GLFW3 CursorEnter Callback, when cursor enters the window
|
// GLFW3 CursorEnter Callback, when cursor enters the window
|
||||||
|
Reference in New Issue
Block a user