-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Transparency of Modal Windows #470
Comments
There is an inconsistency discussed in #337, you could alter the "style.WindowFillAlphaDefault" field and set it to 1.0. This field may be removed and instead the value flattened across the different WindowBg colors. |
Thanks! It works but i need to restore back the global Alpha Default otherwise all windows in rendering loop get this value. Thanks for you support! I do something like this |
Yes this should be the correct workaround. I am hesitating to add an enum for PushStyleVar() because this value should be removed eventually. See the update I just made to #337. |
Hi i checked the update. Wouldn't be easier just to allow the ImGui::BeginPopupModal to accept arguments like the ImGui::Begin("Grid Properties", opened, ImVec2(0, 0), 0.90f, ImGuiWindowFlags_NoScrollbar) ? |
No because that 'alpha' parameter is part of an obsolete Begin() entry point and is very rarely used. For a rarely used parameter it would make more sense to have a PushStyleVar(WindowFillAlpha, 1.0f) thing rather than bloating entry points. |
@nikmes Btw I realized this issue has been fixed a while ago (1.60) with the addition of |
Is there a way to control transparency of a modal window? Looks like below dose not allow to pass ALPHA value as an argument.
if (ImGui::BeginPopupModal("File Operations", NULL, ImGuiWindowFlags_HorizontalScrollbar))
I tried to play with below:
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, 0.f);
But didnt get desired results. Instead i got Modal window on a GREY background.
Thanks!
The text was updated successfully, but these errors were encountered: