mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
new content menu (WIP)
This commit is contained in:
parent
690e3f54c9
commit
5915b811f2
27 changed files with 340 additions and 202 deletions
|
|
@ -22,9 +22,13 @@ void Image::draw(const DrawContext* pctx, Assets* assets) {
|
|||
setSize(glm::vec2(texture->getWidth(), texture->getHeight()));
|
||||
}
|
||||
batch->texture(texture);
|
||||
batch->setColor(color);
|
||||
if (enabled) {
|
||||
batch->setColor(isPressed() ? pressedColor : (hover ? hoverColor : color));
|
||||
} else {
|
||||
batch->setColor({color.r, color.g, color.b, color.a * 0.5f});
|
||||
}
|
||||
batch->rect(pos.x, pos.y, size.x, size.y,
|
||||
0, 0, 0, UVRegion(), false, true, color);
|
||||
0, 0, 0, UVRegion(), false, true, batch->getColor());
|
||||
}
|
||||
|
||||
void Image::setAutoResize(bool flag) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue