basic flow layout

This commit is contained in:
Dynamitos
2025-01-12 11:26:52 +01:00
parent e487867f96
commit 2915db8898
18 changed files with 415 additions and 172 deletions
+8 -11
View File
@@ -4,16 +4,13 @@
using namespace Seele;
using namespace Seele::UI;
Array<RenderElement> Element::render() {
RenderElement result;
result.position = UVector2(0, 0);
result.size = UVector2(style.width, style.height);
result.backgroundColor = style.backgroundColor;
result.fontSize = style.fontSize;
result.fontFamily = style.fontFamily;
return {result};
Element::Element(Attributes attr, Array<Element*> _children) : attr(attr) {
for (auto c : _children) {
children.add(c);
}
for (auto& child : children) {
child->setParent(this);
}
}
Element::Element(Attributes attr, Array<OElement> children) : attr(attr), children(std::move(children)) {}
Element::~Element() {}
Element::~Element() {}