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
[Demo] Selectable covering Button on the same line, is this by design? #6574
Comments
Hard to say without any code, but it seems you have Edit: ah, those leaves are selectables in the demo code. But in the demo code they just have text after them, in that case an expanded selectable would be desired. The buttons are your addition, you would have to adjust the selectables accordingly. |
You need to call IE: static bool selected[3] = { false, false, false };
ImGui::SetNextItemAllowOverlap();
ImGui::Selectable("main.c", &selected[0]);
ImGui::SameLine();
ImGui::Button("Link 1");
ImGui::SetNextItemAllowOverlap();
ImGui::Selectable("Hello.cpp", &selected[1]);
ImGui::SameLine();
ImGui::Button("Link 2");
ImGui::SetNextItemAllowOverlap();
ImGui::Selectable("Hello.h", &selected[2]);
ImGui::SameLine();
ImGui::Button("Link 3"); |
Thank you for pointing this out. |
I have pushed 9a15730 with some use of SetNextItemAllowOverlap() in the demo. |
Version/Branch of Dear ImGui:
Version: 1.89.7
Branch: features/range_select
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_win32.cpp + imgui_impl_dx11.cpp
Compiler: MSVC 19.36.32535
Operating System: Windows 11 22H2
My Issue/Question:
Is this by design?
EX: I didn't find any API that can change the z-order of widgets, maybe some related APIs should be added
Screenshots/Video
Standalone, minimal, complete and verifiable example:
The text was updated successfully, but these errors were encountered: