Imgui: Can I avoid the IsMouseDragging() event when I click on a button of overlapping window?

Created on 25 Mar 2019  路  4Comments  路  Source: ocornut/imgui

Most helpful comment

You've completely ignored any part of what the issue template was asking you to do and report about.

All 4 comments

I have a window in which I detect dragging with ImGui::IsMouseDragging( 0, 0.0f ) in order to create a selection rectangle. It works as expected. I then open an overlapping window with a button, to record the coordinates of such selection box, but when I click on the button there is a mini-dragging event registered on the underlying window, which ruins my already defined selection rectangle.

Any suggestions?

You've completely ignored any part of what the issue template was asking you to do and report about.

when I click on the button there is a mini-dragging event registered on the underlying window

This is the expected behavior if you call ImGui::IsMouseDragging(0, 0.0f), the zero threshold will start reporting a drag from the initial click. You probably need to be checking your window focus with IsWindowFocused etc. either way.

Closing as you have ignored the issue template.

Thanks. I will look into.
PS: You guys are very sensitive. I was on phone and could not see the whole thing. Geez.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spaderthomas picture spaderthomas  路  3Comments

bizehao picture bizehao  路  3Comments

ILoveImgui picture ILoveImgui  路  3Comments

namuda picture namuda  路  3Comments

ghost picture ghost  路  3Comments