Enum MenuClick
#[non_exhaustive]pub enum MenuClick {
Pickup {
slot: Option<usize>,
button: MouseButton,
},
QuickMove {
slot: usize,
},
Swap {
slot: usize,
with: SwapWith,
},
Clone {
slot: usize,
},
Throw {
slot: usize,
whole_stack: bool,
},
Drag {
kind: DragKind,
slots: Vec<usize>,
},
PickupAll {
slot: usize,
},
}Expand description
One click on the local player’s open menu, submitted with MenuRef::click.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Pickup
Pick up, place or drop the carried stack; None means outside.
QuickMove
Shift-click a menu-order slot into the opposite inventory.
Swap
Exchange a menu-order slot with a hotbar slot or the offhand.
Clone
Clone a menu-order slot in creative mode.
Throw
Drop one item or the whole stack from a menu-order slot.
Drag
Distribute the carried stack across menu-order slots as one complete gesture.
PickupAll
Collect matching stacks into the carried stack.
Trait Implementations§
impl Eq for MenuClick
impl StructuralPartialEq for MenuClick
Auto Trait Implementations§
impl Freeze for MenuClick
impl RefUnwindSafe for MenuClick
impl Send for MenuClick
impl Sync for MenuClick
impl Unpin for MenuClick
impl UnsafeUnpin for MenuClick
impl UnwindSafe for MenuClick
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more