mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
slot onrightclick event
This commit is contained in:
parent
d8cc810441
commit
8409e0d82e
4 changed files with 23 additions and 12 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue