-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Suggestion: Extend demo with full screen window / docking examples #7955
Comments
The DockSpace demo already has a fullscreen demo but because it does quite more things it may be a little unobvious. You basically need to do: const ImGuiViewport* viewport = ImGui::GetMainViewport();
ImGui::SetNextWindowPos(viewport->WorkPos);
ImGui::SetNextWindowSize(viewport->WorkSize);
ImGui::SetNextWindowViewport(viewport->ID); // in docking branch
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f);
ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f);
ImGuiWindowFlags flags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoBringToFrontOnFocus;
ImGui::Begin(...., ..., flags);
ImGui::PopStyleVar(); |
Err, I just realized there IS such demo. But if you mean adding a "Maximize" button to every window, that's another topic. I presume we might support it at some point. Linking to #2104 and #3486.
There is a Dockspace demo but that's more advanced. You can already dock and drag anything into anything by default. |
Ah, well, I didn't find that example, despite it being under the examples drop down. Yeah it might be better if it's related to minimizing/maximizing/restoring type buttons, or just better placement. I'd almost suggest putting it underneath the dropdowns. I'm realizing now why it's strange, that demo opens another window, where you might expect it to impact the demo window. |
The existing open issues are here to track when this will be implemented.
We have many many features to demo they cannot all be packed at the beginning of the main demo window. |
Call me crazy, would it not be possible to add it to the front/main window? I mean it seems like you're referencing static variables to do similar things for other features. |
I don't understand what you are saying. Please be more explicit. Maybe https://github.com/ocornut/imgui/wiki/Glossary can help. |
I thought you were referring to adding code to demonstrate the feature on the demo window itself, it seems like it'd be doable towards the start of the demo window function. |
@ocornut I'm not sure because it seems like from the links you referenced that someone started on this project quite a while ago, is there a commit already being considered? I took a couple minutes and I've got a minimize/maximize/restore button in the title bar using flags. The only remaining part is what the behavior exactly is. Edit: Maximize/Restores fairly clear, I'm not 100% on how "minimize" should act. A thought I had was that it could "collapse" and move the collapsed window handle to a particular position. There's also the idea like w/ OS's where minimizing is associated w/ a button-like icon somewhere else. |
I think this discussion may be moved to #2104. If that issue is open it means that the work hasn't been done. |
Version/Branch of Dear ImGui:
Any
Back-ends:
Any
Compiler, OS:
Any
Full config/build information:
No response
Details:
I just figured I'd point out that while:
is an excellent resource for the basics, this function doesn't show off how to make a window "maximized" or fit to the screen, which is one of the first things a person would like to do.
I figure there's probably a good place to add a toggle button in the demo to do just that, and similarly, for builds with the dock enabled there should probably maybe there's there's a variation of "ShowDemoWindow" called "ShowDemoDock" that allows shuffling around some child windows.
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
No response
The text was updated successfully, but these errors were encountered: