InventoryView.addGrid semantics changed

This commit is contained in:
MihailRis
2024-01-21 19:21:18 +03:00
parent 9e3c4fb00c
commit aa93c27159
3 changed files with 8 additions and 12 deletions
+3 -1
View File
@@ -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;