File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
examples/container_layout Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,23 @@ class MyNode : public Node {
6262 }
6363 vbox_container->set_size ({200 , 300 });
6464
65+ // BoxContainer alignment.
66+ {
67+ auto box_container = std::make_shared<VBoxContainer>();
68+ box_container->set_separation (8 );
69+ box_container->set_position ({350 , 250 });
70+ box_container->theme_override_bg = StyleBox ();
71+ box_container->set_alignment (BoxContainerAlignment::End);
72+ add_child (box_container);
73+
74+ for (int i = 0 ; i < 3 ; i++) {
75+ auto label = std::make_shared<Label>();
76+ box_container->add_child (label);
77+ label->set_text (" Label " + std::to_string (i));
78+ }
79+ box_container->set_size ({100 , 200 });
80+ }
81+
6582 auto grid_container = std::make_shared<GridContainer>();
6683 grid_container->set_separation (8 );
6784 grid_container->set_position ({600 , 400 });
You can’t perform that action at this time.
0 commit comments