Skip to content
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

Open
vaner-org opened this issue May 3, 2024 · 4 comments · May be fixed by godotengine/godot#90411
Open

Allow SplitContainer to have more than 2 children #9666

vaner-org opened this issue May 3, 2024 · 4 comments · May be fixed by godotengine/godot#90411

Comments

@vaner-org
Copy link

vaner-org commented May 3, 2024

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.
godot splitcontainer proposal

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.

@kleonc
Copy link
Member

kleonc commented May 3, 2024

Seems like there's already a PR for this:

@redsett
Copy link

redsett commented May 4, 2024

I've always just nested them. But it would be nice to not have to do that.

@vaner-org
Copy link
Author

vaner-org commented May 6, 2024

Seems like there's already a PR for this:

Allow SplitContainer to have more than two children godot#90411.

Haha, verbatim. No idea how I missed this, thank you.

@Calinou
Copy link
Member

Calinou commented Nov 26, 2024

@nofacer Please don't bump issues without contributing significant new information. Use the 👍 reaction button on the first post instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants