Implementing ECS SystemBase and updating slang

This commit is contained in:
Dynamitos committed 2022-11-15 12:19:11 +01:00
1 parent 05bc31a2b4
commit f635ee2100
106 files changed
+1083 -1675

No files matched your search

+2 -2
View File
@@ -18,14 +18,14 @@ HorizontalLayout::~HorizontalLayout()
void HorizontalLayout::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 / children.size();
float ySize = parent.size.y;
for(uint32 index = 0; index < children.size(); ++index)
{
Rect& child = children[index]->getBoundingBox();
Math::Rect& child = children[index]->getBoundingBox();
child.offset.x = xOffset + (index * xSize);
child.offset.y = yOffset;
child.size.x = xSize;