mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
Fixed block preview texture selection
This commit is contained in:
parent
81d246f3d0
commit
bb7c63394b
2 changed files with 5 additions and 4 deletions
|
|
@ -132,10 +132,12 @@ void draw_hud(Player* player, Assets* assets, bool devdata, int fps){
|
|||
batch->render();
|
||||
|
||||
// choosen block preview
|
||||
Texture* blocks = assets->getTexture("block_select");
|
||||
Texture* blocks = assets->getTexture("block");
|
||||
batch->texture(blocks);
|
||||
batch->sprite(14, 278, 68, 68, 16, player->choosenBlock, vec4(0.0f, 0.0f, 0.0f, 1.0f));
|
||||
batch->sprite(16, 280, 64, 64, 16, player->choosenBlock, vec4(1.0f));
|
||||
|
||||
int texid = Block::blocks[player->choosenBlock]->textureFaces[3]; // face-3 is top face of block
|
||||
batch->sprite(14, 278, 68, 68, 16, texid, vec4(0.0f, 0.0f, 0.0f, 1.0f));
|
||||
batch->sprite(16, 280, 64, 64, 16, texid, vec4(1.0f));
|
||||
batch->render();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue