mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
InventoryView.addGrid semantics changed
This commit is contained in:
parent
9e3c4fb00c
commit
aa93c27159
3 changed files with 8 additions and 12 deletions
|
|
@ -72,7 +72,7 @@ InventoryBuilder::InventoryBuilder()
|
|||
{}
|
||||
|
||||
void InventoryBuilder::addGrid(
|
||||
int cols, int rows,
|
||||
int cols, int count,
|
||||
glm::vec2 coord,
|
||||
int padding,
|
||||
SlotLayout slotLayout)
|
||||
|
|
@ -80,6 +80,8 @@ void InventoryBuilder::addGrid(
|
|||
const int slotSize = InventoryView::SLOT_SIZE;
|
||||
const int interval = InventoryView::SLOT_INTERVAL;
|
||||
|
||||
int rows = ceildiv(count, cols);
|
||||
|
||||
uint width = cols * (slotSize + interval) - interval + padding*2;
|
||||
uint height = rows * (slotSize + interval) - interval + padding*2;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue