mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
refactor
This commit is contained in:
parent
d189bdc107
commit
e06350915e
9 changed files with 284 additions and 236 deletions
|
|
@ -133,7 +133,7 @@ void SlotView::draw(const GfxContext* pctx, Assets* assets) {
|
|||
}
|
||||
|
||||
auto batch = pctx->getBatch2D();
|
||||
batch->color = color;
|
||||
batch->setColor(color);
|
||||
if (color.a > 0.0) {
|
||||
batch->texture(nullptr);
|
||||
if (highlighted) {
|
||||
|
|
@ -143,7 +143,7 @@ void SlotView::draw(const GfxContext* pctx, Assets* assets) {
|
|||
}
|
||||
}
|
||||
|
||||
batch->color = glm::vec4(1.0f);
|
||||
batch->setColor(glm::vec4(1.0f));
|
||||
|
||||
auto previews = frontend->getBlocksAtlas();
|
||||
auto indices = content->getIndices();
|
||||
|
|
@ -190,9 +190,9 @@ void SlotView::draw(const GfxContext* pctx, Assets* assets) {
|
|||
int x = coord.x+slotSize-text.length()*8;
|
||||
int y = coord.y+slotSize-16;
|
||||
|
||||
batch->color = glm::vec4(0, 0, 0, 1.0f);
|
||||
batch->setColor(glm::vec4(0, 0, 0, 1.0f));
|
||||
font->draw(batch, text, x+1, y+1);
|
||||
batch->color = glm::vec4(1.0f);
|
||||
batch->setColor(glm::vec4(1.0f));
|
||||
font->draw(batch, text, x, y);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue