-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
Rework oriented containers #64724
Rework oriented containers #64724
Conversation
Love the icons 😄 Personally, I like the approach here, with keeping the variations available and making them non-mutable. But I suspect not everyone will like that. |
I love it! It keeps the dimensions appropriately when flipping coordinates, it's very clever. Probably the more expected behaviour that can be easily overridden by flipping x and y back in script. |
I don't get it. Why keep the |
Because |
To me it's useful to be able to look in the SceneTree dock and see the orientation and how containers differ, rather than a soup of diagonal containers that doesn't tell much. There is no way to change the icon based on a property atm, the technology isn't there yet Edit: But to be honest, I would only use BoxContainer if displaying a different icon based on orientation ever becomes possible. |
Then I just don't see the point of this PR. If anything, it would just make things confusing. |
The PR doesn't change much. Users can still use H/VBoxContainers, advanced users can use BoxContainer. The only difference is that BoxContainer is no longer grayed-out and you can click it. Maybe the intended usage could be better clarified in the docs, but other than that it's fine IMO. |
@@ -73,7 +79,7 @@ class HBoxContainer : public BoxContainer { | |||
|
|||
public: | |||
HBoxContainer() : | |||
BoxContainer(false) {} | |||
BoxContainer(false) { is_fixed = true; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BoxContainer(false) { is_fixed = true; } | |
BoxContainer(false), | |
is_fixed(true) {} |
Same for others.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not work, I get C2614 illegal member initialization: 'is_fixed' is not a base or member
error :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah that's weird. I guess it's fine as is then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, up to others in @godotengine/gui-nodes to approve the concept.
2b6134e
to
1e8aa99
Compare
1e8aa99
to
73929be
Compare
Thanks! |
What about other H/V classes? |
They are not container. |
This PR makes BoxContainer, SplitContainer and FlowContainer non-abstract, so you can change the orientation on the fly using a

vertical
property:The property is not available in the specialized classes and trying to change it from code in these classes results in an error:


Related to godotengine/godot-proposals#3558
Helps #36040