minor refactor

This commit is contained in:
MihailRis
2024-05-05 17:02:11 +03:00
parent 5fcefaf52e
commit bad871b0a2
8 changed files with 21 additions and 27 deletions
+10
View File
@@ -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;
}