mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
minor refactor
This commit is contained in:
parent
5fcefaf52e
commit
bad871b0a2
8 changed files with 21 additions and 27 deletions
|
|
@ -132,6 +132,16 @@ void UINode::scrolled(int value) {
|
|||
}
|
||||
}
|
||||
|
||||
glm::vec4 UINode::calcColor() const {
|
||||
glm::vec4 color = this->color;
|
||||
if (isEnabled()) {
|
||||
color = (isPressed() ? pressedColor : (hover ? hoverColor : color));
|
||||
} else {
|
||||
color = glm::vec4(color.r, color.g, color.b, color.a * 0.5f);
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
void UINode::setPos(glm::vec2 pos) {
|
||||
this->pos = pos;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue