fix gui alert window size
This commit is contained in:
@@ -195,7 +195,8 @@ glm::vec2 UINode::getSize() const {
|
||||
|
||||
void UINode::setSize(glm::vec2 size) {
|
||||
this->size = glm::vec2(
|
||||
glm::max(minSize.x, size.x), glm::max(minSize.y, size.y)
|
||||
glm::max(minSize.x, glm::min(maxSize.x, size.x)),
|
||||
glm::max(minSize.y, glm::min(maxSize.y, size.y))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -208,6 +209,15 @@ void UINode::setMinSize(glm::vec2 minSize) {
|
||||
setSize(getSize());
|
||||
}
|
||||
|
||||
glm::vec2 UINode::getMaxSize() const {
|
||||
return maxSize;
|
||||
}
|
||||
|
||||
void UINode::setMaxSize(glm::vec2 maxSize) {
|
||||
this->maxSize = maxSize;
|
||||
setSize(getSize());
|
||||
}
|
||||
|
||||
void UINode::setColor(glm::vec4 color) {
|
||||
this->color = color;
|
||||
this->hoverColor = color;
|
||||
|
||||
Reference in New Issue
Block a user