Closed masterghui closed 2 years ago
This sort of behavior is typically the result of calling CreateContext in the your update loop instead of during initialization. Are you by chance making that mistake?
If not can you tell me what ImGui version you're on. Thanks!
I think I might have a similar problem. I am running ImPlot at the top of master
and ImGui at the top o docking
.
With the rect demo, I can drag the corners ok, but I can't drag the centre.
This sort of behavior is typically the result of calling CreateContext in the your update loop instead of during initialization. Are you by chance making that mistake?
I double checked, and I am indeed creating the context only once
This sort of behavior is typically the result of calling CreateContext in the your update loop instead of during initialization. Are you by chance making that mistake?
If not can you tell me what ImGui version you're on. Thanks!
I checked it, only called ImGui::CreateContext and ImPlot::CreateContext() during initialization. My ImGui on commit eda7792b151d138e15df951578253b821ceed5a3
Hi, there does seem to be an issue with the latest ImGui. I am investigating.
It appears that several things are not working at the moment:
Each of these make use of ImGui::ButtonBehavior
. @ocornut, any guesses on what caused the regression?
@masterghui , @paolotherocker -- please pull master and let me know if https://github.com/epezent/implot/commit/32a4617cd67354c57f2738c01f72392eac8605c1 resolves the issue.
@ocornut -- FYI, the fix was calling ImGui::KeepAliveID
just before ImGui::ButtonBehavior
. This was not necessary in the past, but seems to be now. TBD if this causes any issues; hopefully not.
EDIT: Possibly related to https://github.com/ocornut/imgui/commit/6d15a506faade602f70833898853aab8876c7270 or https://github.com/ocornut/imgui/commit/90386780e3071cfd73837070b34b23e2f62a2cec
@epezent It does resolve the issue, thanks for sorting this out
@epezent I pull master code and it works! Thanks for your work!
The commit is https://github.com/ocornut/imgui/commit/90386780e3071cfd73837070b34b23e2f62a2cec (if you want to add a version number to your changelog or comments)
I will amend the changelog to surface this issue better for people using internals.
KeepAliveID was moved from GetID() to ItemAdd(), were you calling ButtonBehavior() without ItemAdd() ? (That’s a bit unusual but also perfectly fine, some internal code doss it)
When I drag DragPoint or DragLine, It never moved. I tried in imgui sdl and glfw demo on my macos, but nothing different.