use of eidolons.libgdx.gui.panels.dc.inventory.datasource.InventoryTableDataSource in project Eidolons by IDemiurge.
the class InventorySlotsPanel method afterUpdateAct.
@Override
public void afterUpdateAct(float delta) {
if (getUserObject() == null)
return;
clear();
super.afterUpdateAct(delta);
final List<InventoryValueContainer> inventorySlots = ((InventoryTableDataSource) getUserObject()).getInventorySlots();
for (int i = 0; i < SIZE; i++) {
ValueContainer valueContainer = inventorySlots.get(i);
if (valueContainer == null) {
valueContainer = new ValueContainer(getOrCreateR("UI/empty_pack.jpg"));
}
add(valueContainer).expand(0, 0);
if ((i + 1) % COLUMNS == 0) {
row();
}
}
}
Aggregations