mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 20:11:50 +00:00
add 'min-size' ui property
This commit is contained in:
parent
0ce5e23a2a
commit
209490192c
4 changed files with 10 additions and 1 deletions
|
|
@ -290,7 +290,11 @@ const std::string& UINode::getId() const {
|
|||
|
||||
void UINode::reposition() {
|
||||
if (sizefunc) {
|
||||
setSize(sizefunc());
|
||||
auto newSize = sizefunc();
|
||||
setSize(
|
||||
{newSize.x < 0 ? size.x : newSize.x,
|
||||
newSize.y < 0 ? size.y : newSize.y}
|
||||
);
|
||||
}
|
||||
if (positionfunc) {
|
||||
setPos(positionfunc());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue