small fix for handling hotbar hotkeys (fixes #687)

Send an 'ChangeHotbarState' event when a hotbar slot is assigned via
hotkey in the inventory.
This commit is contained in:
termac 2020-08-29 18:38:55 +02:00
parent 92d9a51071
commit 76df71ed3d

View File

@ -2296,6 +2296,7 @@ impl Hud {
) {
if let Some(slots::SlotKind::Inventory(i)) = slot_manager.selected() {
hotbar.add_inventory_link(slot, i.0);
events.push(Event::ChangeHotbarState(Box::new(hotbar.to_owned())));
slot_manager.idle();
} else {
let just_pressed = hotbar.process_input(slot, state);