-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Capture mouse wheel event #4303
Comments
The easiest solution would probably be to add an There are some examples for using it this way in the examples. In particular the clipping sample and the canvas sample. |
In addition, note that by default mouse wheel will trigger scrolling. InvisibleButton(...)
SetItemUsingMouseWheel(....)
if (ImGui::IsItemHovered())
{
// use io.MouseWheel
} |
Thank you so much. It worked. |
Wouldn't it be better to use ImGui::IsMouseHoveringRect()? |
Hi,
I want to capture the event when mouse is hovered and mouse wheel is scrolled on a rectangle in a window. Based on the mouse wheel event, I have to increment or decrement text value.
The red circled portion in the below image is the rectangle. When the user moves mouse wheel over that rectangle, I want to increment or decrement the value '1150' depending upon direction of wheel movement.
I am developing this on Windows 10 and using v1.82 of Dear ImGUI.
P.S. : I am new to c++ and ImGUI.
// Here's the code snippet
The text was updated successfully, but these errors were encountered: