forked from Dynamitos/Seele
Implementing ECS SystemBase and updating slang
This commit is contained in:
1 parent
05bc31a2b4
commit
f635ee2100
106 files changed
+1083
-1675
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user