-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Check if window is visible #1365
Comments
Why not using the
Avoid using the 5 argument version of |
@haferburg Any news on that problem you had? If you are still interested in this, could you post more context and intent. What are you trying to solve by not calling |
@ocornut Hi Omar, To be honest, it was probably not the best idea. A dialog should be able to display information properly without the need to be resized. I'll close this for now. Thank you for checking back. |
This is a follow up to #1061.
Here is the code I would like to be able to write, which is currently not possible:
So I want to compute the size of the window, but only if I need to, i. e. if the window wasn't visible before.
I could compute the preferred size, then pass it in as the third parameter to
Begin()
, but that only works the first time the window.The other option would be to call
SetNextWindowSize()
, which is only possible before callingBegin()
. But in order to check whether or not the window was already visible, I can only callIsWindowAppearing()
after callingBegin()
. So I can't use that either.The documentation says
SetWindowSize()
is not recommended, but it's the only way I got this to work without modifying imgui. And it causes the window to jump after the first frame, which is not pretty.The text was updated successfully, but these errors were encountered: