You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello I am trying to create modal popup that disable interaction with the rest of the application elements but keep them perfectly visible for preview purposes. My first idea was to use following code:
ImGui::PushStyleColor(ImGuiCol_ModalWindowDimBg, ImVec4(0, 0, 0, 0));
if (ImGui::BeginPopupModal("MyPopup", nullptr) {
ImGui::Text("Hello");
if (ImGui::Button("OK")) {
ImGui::CloseCurrentPopup();
}
ImGui::EndPopup();
}
ImGui::PopStyleColor();
But it seems that dimmed background is drawn outside of popup's begin-end and not affected by this PushStyleColor.
If I change color in style globally it does work but I want to other popups to have dimmed background.
Currently those would be rendered in EndFrame().
I think we should record this value at the time of Begin(), the same way we record some color properties for docked window, and use it later.
Version/Branch of Dear ImGui:
v1.90.2 WIP
Back-ends:
imgui_impl_win32.cpp + imgui_impl_opengl3.cpp
Compiler, OS:
Windows 10
Full config/build information:
No response
Details:
Hello I am trying to create modal popup that disable interaction with the rest of the application elements but keep them perfectly visible for preview purposes. My first idea was to use following code:
But it seems that dimmed background is drawn outside of popup's begin-end and not affected by this PushStyleColor.
If I change color in style globally it does work but I want to other popups to have dimmed background.
So the question is how to change ImGuiCol_ModalWindowDimBg only for one popup?
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
No response
The text was updated successfully, but these errors were encountered: