InventoryView.unbind()
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "../content/Content.h"
|
||||
#include "../items/ItemDef.h"
|
||||
#include "../items/Inventory.h"
|
||||
#include "../items/Inventories.h"
|
||||
#include "../maths/voxmaths.h"
|
||||
#include "../objects/Player.h"
|
||||
#include "../voxels/Block.h"
|
||||
@@ -337,6 +338,12 @@ void InventoryView::bind(
|
||||
}
|
||||
}
|
||||
|
||||
void InventoryView::unbind() {
|
||||
if (inventory->isVirtual()) {
|
||||
frontend->getLevel()->inventories->remove(inventory->getId());
|
||||
}
|
||||
}
|
||||
|
||||
void InventoryView::setSelected(int index) {
|
||||
for (int i = 0; i < int(slots.size()); i++) {
|
||||
auto slot = slots[i];
|
||||
|
||||
Reference in New Issue
Block a user