Deselect the inventory slot after dropping an item.

This commit is contained in:
Shane Handley 2020-03-05 16:11:45 +09:00
parent 7478d1a063
commit 9d8d61736b

View File

@ -258,6 +258,7 @@ impl<'a> Widget for Bag<'a> {
if let Some(to_drop) = state.selected_slot {
if ui.widget_input(ui.window).clicks().left().next().is_some() {
event = Some(Event::HudEvent(HudEvent::DropInventorySlot(to_drop)));
state.update(|s| s.selected_slot = None);
}
}