-
-
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
How to draw a vertical dividing line? #5448
Comments
It is unclear what you are trying to achieve and why |
It looks like you want to create a custom widget. Look into |
@Boglon333 You should clarify your actual problems rather than focus on what you think is a possible workaround otherwise you are falling into XY Problem (https://xyproblem.info). You are not explaining why Tables or Columns are not working for you, you should focus on that. Should you actually need a custom widget there is a SplitterBehavior() helper in imgui_internal (see #319) |
Version/Branch of Dear ImGui:
Version: 1.88
Branch: master
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Operating System: XXX
My Issue/Question:
I want to draw a vertical line that can divide a window as two part. It works like the function
ImGui::Columns()
. I have drawn a left window and a right window (the code is below) , but I need a vertical line. In picture two, when mouse clicks on the vertical line it turns dark blue, it also turns dark blue when mouse moves hover the line. In picture three and four, I can drag the vertical line from left to right or from right to left so that I will change the size of left window and right window. I think it works like the column in the table, but I can't fulfill my demands withImGui::Columns()
.Screenshots/Video
picture onepicture twopicture three
picture four
Standalone, minimal, complete and verifiable example: (see #2261)
The text was updated successfully, but these errors were encountered: