mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
minor refactor
This commit is contained in:
parent
5fcefaf52e
commit
bad871b0a2
8 changed files with 21 additions and 27 deletions
|
|
@ -92,12 +92,7 @@ void Container::draw(const DrawContext* pctx, Assets* assets) {
|
|||
}
|
||||
|
||||
void Container::drawBackground(const DrawContext* pctx, Assets* assets) {
|
||||
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);
|
||||
}
|
||||
glm::vec4 color = calcColor();
|
||||
if (color.a <= 0.001f)
|
||||
return;
|
||||
glm::vec2 pos = calcPos();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue