From 54ea49520723c5fe562ecd82c2a947b9bf741a7d Mon Sep 17 00:00:00 2001 From: Mikko Mononen Date: Sun, 30 Nov 2014 12:24:27 +0200 Subject: [PATCH] Updated example code. --- examples/opengl_example/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/opengl_example/main.cpp b/examples/opengl_example/main.cpp index 8b7cc3904..ff46b5382 100644 --- a/examples/opengl_example/main.cpp +++ b/examples/opengl_example/main.cpp @@ -131,7 +131,7 @@ static void glfw_mouse_button_callback(GLFWwindow* window, int button, int actio static void glfw_scroll_callback(GLFWwindow* window, double xoffset, double yoffset) { ImGuiIO& io = ImGui::GetIO(); - io.MouseWheel = (yoffset != 0.0f) ? yoffset > 0.0f ? 1 : - 1 : 0; // Mouse wheel: -1,0,+1 + io.MouseWheel = yoffset; // Use fractional mouse wheel, 1.0 unit 3 lines. } static void glfw_key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)