mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
small fixes
This commit is contained in:
parent
9a01b5ad2d
commit
4c9019e03c
8 changed files with 21 additions and 9 deletions
|
|
@ -301,9 +301,13 @@ const std::string& UINode::getId() const {
|
|||
void UINode::reposition() {
|
||||
if (sizefunc) {
|
||||
auto newSize = sizefunc();
|
||||
auto defsize = newSize;
|
||||
if (parent) {
|
||||
defsize = parent->getSize();
|
||||
}
|
||||
setSize(
|
||||
{newSize.x < 0 ? size.x : newSize.x,
|
||||
newSize.y < 0 ? size.y : newSize.y}
|
||||
{newSize.x < 0 ? defsize.x : newSize.x,
|
||||
newSize.y < 0 ? defsize.y : newSize.y}
|
||||
);
|
||||
}
|
||||
if (positionfunc) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue