Skip to content
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

Mouse Dragging #260

Closed
mhalber opened this issue Jul 4, 2015 · 2 comments
Closed

Mouse Dragging #260

mhalber opened this issue Jul 4, 2015 · 2 comments

Comments

@mhalber
Copy link

mhalber commented Jul 4, 2015

Hi,

I am fairly new to imgui, so it is possible that I am missing something, however I believe there is possible bug with ImGui::IsMouseDragging()'s current behavior.
Even after finishing the drag over a window, said function will return true, with drag distance equal to 0.0 in both direction. Is there any reasoning for this function to return true after mouse is released? Only subsequent mouse click will stop the dragging from being reported.

A possible fix to that is to simply reset the g.IO.MouseDragMaxDistanceSqr[i] to 0.0 after the mouse is release in ImGui::NewFrame()

Thanks!

@ocornut
Copy link
Owner

ocornut commented Jul 4, 2015

Sounds like a probable bug. Will look into it in a few hours.

Sent from my fax machine

On 2015/07/04, at 14:28, mhalber notifications@github.com wrote:

Hi,

I am fairly new to imgui, so it is possible that I am missing something, however I believe there is possible bug with ImGui::IsMouseDragging()'s current behavior.
Even after finishing the drag over a window, said function will return true, with drag distance equal to 0.0 in both direction. Is there any reasoning for this function to return true after mouse is released? Only subsequent mouse click will stop the dragging from being reported.

A possible fix to that is to simply reset the g.IO.MouseDragMaxDistanceSqr[i] to 0.0 after the mouse is release in ImGui::NewFrame()

Thanks!


Reply to this email directly or view it on GitHub.

@ocornut ocornut closed this as completed in 18fa8e1 Jul 4, 2015
@ocornut
Copy link
Owner

ocornut commented Jul 4, 2015

Went through logs and can't seem a reason why it was this ever way. Because it was never part of a test perhaps it was always broken and assuming the user would test IsMouseDown() first.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants