slot onrightclick event

This commit is contained in:
MihailRis
2024-02-19 00:18:08 +03:00
parent d8cc810441
commit 8409e0d82e
4 changed files with 23 additions and 12 deletions
+2 -1
View File
@@ -223,7 +223,7 @@ std::shared_ptr<InventoryView> Hud::createContentAccess() {
auto copy = ItemStack(item);
inventory->move(copy, indices);
},
[=](ItemStack& item, ItemStack& grabbed) {
[=](uint, ItemStack& item) {
inventory->getSlot(player->getChosenSlot()).set(item);
});
@@ -263,6 +263,7 @@ Hud::Hud(Engine* engine, LevelFrontend* frontend)
SlotLayout(-1, glm::vec2(), false, false, nullptr, nullptr)
);
grabbedItemView->bind(
0,
interaction->getGrabbedItem(),
frontend,
interaction.get()