-
-
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
DockSpaceOverViewport with BeginMainMenuBar? #2889
Comments
The comment for
For now you'll probably want to create your own window hosting the dockspace by essentially replicating the code in
Ideally we need another solution such as main menu bar communicating their need to take space from the main work area (which would also have the effect that, e.g. you can't lose a thin window under a menu bar). |
Thanks for the rapid response. I was afraid you'd say that... I had considered the first point there but was worried I'd be going down a rabbit hole. Sobeit, it will give me the opportunity to learn more about OpenGL and this library. If I find a worthy solution, I'll post it here. |
I'm not sure what this has to do with "OpenGL" ? I gave you a solution above, copy |
Apologies, I must have misunderstood. I have very little graphics experience, and no 3D experience. I was under the impression that it would be more difficult to draw in an ImGui window than in the default viewport, but if that's not the case then disregard my comment. |
…-bars. Fixed DocksapceOverViewport() and demo code (overlay etc) (#3035, #2889, #2474, #1542, #2109) Clarified that BeginMenuMainBar() had an incorrect knowledge of its height (which was previously harmless). Designed to easily allow for status bars although we don't have/use them yet, but custom code could use them.
Update: this is now fixed by 75de34e ! |
Version/Branch of Dear ImGui:
Version: 1.74 WIP (17301)
Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_sdl.cpp + imgui_impl_opengl3.cpp
Compiler: g++
Operating System: linux
My Issue/Question:
Hey all,
What a wonderful and useful library! There is however an issue I've been fighting with.
Whenever using the dockspace over viewport feature, use of the main menu bar draws over the tab bar / window decoration. I know there's mention in the code that DockSpaceOverViewport() would prevent the use of BeginMainMenuBar(), however this would seem to be common use so it would be nice if it was implemented. Something such as padding to the top of the viewport for docking would do the trick, however I don't know where to begin to implement such a thing!
Thanks,
Phil.
Screenshots/Video
Note that window decorations and tab bars work for other windows:
Standalone, minimal, complete and verifiable example:
The text was updated successfully, but these errors were encountered: