summaryrefslogtreecommitdiff
path: root/scene/gui/split_container.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/split_container.cpp')
-rw-r--r--scene/gui/split_container.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp
index 874e5868b6..b56326088d 100644
--- a/scene/gui/split_container.cpp
+++ b/scene/gui/split_container.cpp
@@ -336,6 +336,30 @@ bool SplitContainer::is_collapsed() const {
return collapsed;
}
+Vector<int> SplitContainer::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> SplitContainer::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 SplitContainer::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_split_offset", "offset"), &SplitContainer::set_split_offset);
ClassDB::bind_method(D_METHOD("get_split_offset"), &SplitContainer::get_split_offset);