Merge branch 'ifreund-drop-items' into 'master'

Allow dropping items

See merge request veloren/veloren!615
This commit is contained in:
Justin Shipsey 2019-10-22 01:22:50 +00:00
commit 4815a096fd

View File

@ -248,6 +248,13 @@ impl<'a> Widget for Bag<'a> {
}
}
// Drop selected item
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)));
}
}
// Close button
if Button::image(self.imgs.close_button)
.w_h(28.0, 28.0)