UINode size-func
This commit is contained in:
@@ -233,6 +233,14 @@ void UINode::setPositionFunc(vec2supplier func) {
|
||||
positionfunc = func;
|
||||
}
|
||||
|
||||
vec2supplier UINode::getSizeFunc() const {
|
||||
return sizefunc;
|
||||
}
|
||||
|
||||
void UINode::setSizeFunc(vec2supplier func) {
|
||||
sizefunc = func;
|
||||
}
|
||||
|
||||
void UINode::setId(const std::string& id) {
|
||||
this->id = id;
|
||||
}
|
||||
@@ -245,6 +253,9 @@ void UINode::reposition() {
|
||||
if (positionfunc) {
|
||||
setPos(positionfunc());
|
||||
}
|
||||
if (sizefunc) {
|
||||
setSize(sizefunc());
|
||||
}
|
||||
}
|
||||
|
||||
void UINode::setGravity(Gravity gravity) {
|
||||
|
||||
Reference in New Issue
Block a user