-
-
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
Window layout, order #4476
Comments
I'd like to challenge this statement to make sure you aren't fighting against a XY Problem.
You could call
There's none presently. I don't think we would do that but one could come with a tool/algorithm that takes newly appearing window at the end of the frame (that didn't have settings), and position them. It would need to jump through some hoops to calculate the next window size ahead of the next-frame Begin(), by extracting some of the calls from Begin(), something like: CalcWindowContentSizes(window, &content_size, &content_size_ideal);
ImVec2 size_auto_fit = CalcWindowAutoFitSize(window, content_size_ideal);
ImVec2 size_expected = CalcWindowSizeAfterConstraint(window, window->SizeFull);
// there we know the size |
In the specific use case, I cannot yet any user-specific data - no config files, no ini files, etc, and if I do they're removed at the end of the session, but only after an unexpected files report gets mailed out and I get nagged :) So I have to make the saves noops :)
Thanks -- I'll close this because the one actionable would be a demo of the relative focus, and you don't need a stand alone ticket for that :) |
"Give a man a fish, feed him for a day; give a man a demo, feed everyone"
-- Albert Einstein, on the Internet
The first thing I run into whenever creating a new imgui-based tool-ui is that windows are a bit messy on first open, and in several of my use cases that means permanently because I try to (have to) avoid creating the .ini files.
I recognize you can do this by setting some windows to NoFocusOnAppearing, but I have use cases where I want to specify one window should usurp all the other windows without having to locate and change every window's flags.
SetForegroundMostWindow(window, ImGuiCond_FirstUseEver)
?The second is if there is a recommended way to encourage windows not to all appear overlapping each other (given enough space).
I've created a complete example under items/focus-window here https://github.com/kfsone/imgui-stuff/blob/main/items/focus-window/main.cpp
The text was updated successfully, but these errors were encountered: