-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Allow SplitContainer to have more than 2 children #9666
Comments
Seems like there's already a PR for this: |
I've always just nested them. But it would be nice to not have to do that. |
Haha, verbatim. No idea how I missed this, thank you. |
@nofacer Please don't bump issues without contributing significant new information. Use the 👍 reaction button on the first post instead. |
Describe the project you are working on
I'm working on an application that is able to recursively divide its viewports the way Blender is able to.
Describe the problem or limitation you are having in your project
For this, the built in SplitContainer class is almost perfect, except for the fact that it limits its children to a max of 2. I'm having a hard time understanding why this is so, and working with BoxContainer is proving a little clunky since setting the minimum size for a child being manipulated isn't always predictable, and adjusting size directly doesn't affect a sibling.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
If SplitContainer was able to accept arbitrary amounts of children, with with the stretch ratio of the child determining space allotment on resizing the container (for instance, 1:3:1 for Godot's left sidebar, middle viewport and right sidebar), I feel like it would be a big improvement on the current behavior. This would also allow the application I'm making to scale well to ultrawide displays.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Horizontal splitcontainer children in blue, vertical in red.

If this enhancement will not be used often, can it be worked around with a few lines of script?
I'm sure it can work as a custom type, I just felt it worthwhile to propose this since I didn't understand the reason for the limitation. If someone could let me know, or tell me what kind of container Godot uses for its three (upto five?) main horizontal panes, that would help me as well. I appreciate it.
Is there a reason why this should be core and not an add-on in the asset library?
See above.
The text was updated successfully, but these errors were encountered: