imgui
imgui copied to clipboard
Mouse action functions (IsItemHovered, IsMouseClicked,IsMouseDown,IsMouseReleased, etc.) always return false for overlapped item.
Version/Branch of Dear ImGui:
Version 1.90.8, Branch: master
Back-ends:
imgui_impl_XXX.cpp + imgui_impl_XXX.cpp
Compiler, OS:
Windows 11
Full config/build information:
Dear ImGui 1.90.8 (19080)
--------------------------------
sizeof(size_t): 8, sizeof(ImDrawIdx): 2, sizeof(ImDrawVert): 20
define: __cplusplus=202101
define: _WIN32
define: _WIN64
define: _MSC_VER=1936
define: _MSVC_LANG=202004
define: __clang_version__=15.0.1
--------------------------------
io.BackendPlatformName: NULL
io.BackendRendererName: NULL
io.ConfigFlags: 0x00000020
NoMouseCursorChange
io.ConfigInputTextCursorBlink
io.ConfigMemoryCompactTimer = 60.0
io.BackendFlags: 0x00000000
--------------------------------
io.Fonts: 1 fonts, Flags: 0x00000000, TexSize: 2048,4096
io.DisplaySize: 3440.00,1369.00
io.DisplayFramebufferScale: 1.00,1.00
--------------------------------
style.WindowPadding: 8.00,8.00
style.WindowBorderSize: 0.00
style.FramePadding: 4.00,0.00
style.FrameRounding: 3.00
style.FrameBorderSize: 0.00
style.ItemSpacing: 8.00,2.00
style.ItemInnerSpacing: 4.00,4.00
Details:
My Issue/Question:
We just updated an ancient version of IMGui to 1.90.8. Some of our code relied on SetItemAllowOverlap(), so we changed it to use the new SetNextItemAllowOverlap() function instead. Our code is written in LUA, so the order of calls is:
GUI:SetNextItemAllowOverlap() GUI:Selectable(...,GUI.SelectableFlags_SpanAllColumns + GUI.SelectableFlags_AllowOverlap) GUI:SameLine() -- draw the overlapped item GUI:IsMouseClicked(0) -- this now always returns false (as do any of the other similar functions)
In the previous version, that last mouse action function worked as expected - when the cursor was positioned over the overlapped item, it would return true as expected. Now it always returns false.
Please let me know what I am missing for this to once again work as I described. Because the code snippet shown above is called by a much more complex framework that simulates tables using the Column widget (that code is drawing a single cell of a table), and it is all written in LUA, I didn't feel it would be useful at this point to try to include all that detail as well here.
Thanks for any guidance you can provide.
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
No response