-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Description
Version/Branch of Dear ImGui:
Version 1.92.4, Branch: docking
Back-ends:
imgui.cpp
Compiler, OS:
Win10, MSVC 2022
Full config/build information:
No response
Details:
Hi! I'm using imgui-node-editor and BeginCombo is rendered in the wrong position within the editor (see the first screenshot). And I found out that it's because fallback login inside in the end of FindBestWindowPosForPopupEx() (see the second screenshot). It tries to keep the position within bounds, but in the editor, coords can go out of the bounds. If I remove these two lines, it works as expected.
Is it possible to add an API to disable this fallback logic and make it return ref_pos without the clamp? I can implement it in my ImGui fork, but it'd be nice if it was official, hence the question if you think it's reasonable. I could probably prepare a PR myself, but I'm not sure how the API should look like.
Maybe something like?
ImGui::SetPopupSizeClampingEnabled(false); // Temporarily disable clamp within the editor
ImGui::BeginCombo();
ImGui::SetPopupSizeClampingEnabled(true); // Enable back
Screenshots/Video:
BeginCombo being rendered in the wrong position
