summaryrefslogtreecommitdiff
path: root/scene/gui/graph_node.cpp
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2021-11-08 23:53:41 +0300
committerYuri Sizov <yuris@humnom.net>2022-02-10 20:29:34 +0300
commit107b6f299cda3f8b63432930f19cdd9bc24fb6dc (patch)
tree24026b11ed93dea43d86c16544e2ac40ec030517 /scene/gui/graph_node.cpp
parent242c636a63ac2d8b002ace37388dce9273a9048a (diff)
Reorganize inspector layout workflow for Control nodes
Diffstat (limited to 'scene/gui/graph_node.cpp')
-rw-r--r--scene/gui/graph_node.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp
index 30f6cf4a14..e0c59dd1bf 100644
--- a/scene/gui/graph_node.cpp
+++ b/scene/gui/graph_node.cpp
@@ -959,6 +959,25 @@ bool GraphNode::is_resizable() const {
return resizable;
}
+Vector<int> GraphNode::get_allowed_size_flags_horizontal() const {
+ Vector<int> flags;
+ flags.append(SIZE_FILL);
+ flags.append(SIZE_SHRINK_BEGIN);
+ flags.append(SIZE_SHRINK_CENTER);
+ flags.append(SIZE_SHRINK_END);
+ return flags;
+}
+
+Vector<int> GraphNode::get_allowed_size_flags_vertical() const {
+ Vector<int> flags;
+ flags.append(SIZE_FILL);
+ flags.append(SIZE_EXPAND);
+ flags.append(SIZE_SHRINK_BEGIN);
+ flags.append(SIZE_SHRINK_CENTER);
+ flags.append(SIZE_SHRINK_END);
+ return flags;
+}
+
void GraphNode::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_title", "title"), &GraphNode::set_title);
ClassDB::bind_method(D_METHOD("get_title"), &GraphNode::get_title);