mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Allow dropping items
Items can now be dropped by clicking to select the item then clicking outside of the bag.
This commit is contained in:
parent
baf04e75d9
commit
355c7666b9
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user