mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
fix gui alert window size
This commit is contained in:
parent
dece2e25bc
commit
756ff4a2c7
7 changed files with 49 additions and 18 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue