Implementing ECS SystemBase and updating slang

This commit is contained in:
Dynamitos
2022-11-15 12:19:11 +01:00
parent 05bc31a2b4
commit f635ee2100
106 changed files with 1083 additions and 1675 deletions
+2 -2
View File
@@ -18,14 +18,14 @@ VerticalLayout::~VerticalLayout()
void VerticalLayout::apply()
{
Array<PElement> children = element->getChildren();
const Rect parent = element->getBoundingBox();
const Math::Rect parent = element->getBoundingBox();
float xOffset = parent.offset.x;
float yOffset = parent.offset.y;
float xSize = parent.size.x;
float ySize = parent.size.y / children.size();
for(uint32 index = 0; index < children.size(); ++index)
{
Rect& child = children[index]->getBoundingBox();
Math::Rect& child = children[index]->getBoundingBox();
child.offset.x = xOffset;
child.offset.y = yOffset + (index * ySize);
child.size.x = xSize;