summaryrefslogtreecommitdiff
path: root/scene/gui/flow_container.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/flow_container.cpp')
-rw-r--r--scene/gui/flow_container.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/scene/gui/flow_container.cpp b/scene/gui/flow_container.cpp
index d1ac60b325..ba487b2905 100644
--- a/scene/gui/flow_container.cpp
+++ b/scene/gui/flow_container.cpp
@@ -223,6 +223,30 @@ Size2 FlowContainer::get_minimum_size() const {
return minimum;
}
+Vector<int> FlowContainer::get_allowed_size_flags_horizontal() const {
+ Vector<int> flags;
+ flags.append(SIZE_FILL);
+ if (!vertical) {
+ flags.append(SIZE_EXPAND);
+ }
+ flags.append(SIZE_SHRINK_BEGIN);
+ flags.append(SIZE_SHRINK_CENTER);
+ flags.append(SIZE_SHRINK_END);
+ return flags;
+}
+
+Vector<int> FlowContainer::get_allowed_size_flags_vertical() const {
+ Vector<int> flags;
+ flags.append(SIZE_FILL);
+ if (vertical) {
+ flags.append(SIZE_EXPAND);
+ }
+ flags.append(SIZE_SHRINK_BEGIN);
+ flags.append(SIZE_SHRINK_CENTER);
+ flags.append(SIZE_SHRINK_END);
+ return flags;
+}
+
void FlowContainer::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_SORT_CHILDREN: {