pub struct MenuItemView {
pub label: Label,
pub suffix: Option<(String, SuffixKind)>,
pub note: Option<String>,
pub enabled: bool,
pub focused: bool,
}Expand description
One item of a menu.
Fields§
§label: LabelIts text, as the menu holds it: the skin puts a key in the player’s
language when it paints (Ctx::label).
suffix: Option<(String, SuffixKind)>Text that follows the label (e.g. why it can’t be chosen) and what it is.
note: Option<String>What it does, shown under the list while it has the focus.
enabled: boolWhether it can be chosen: a disabled item is dimmed (and skipped by the cursor, unless the menu browses disabled items).
focused: boolWhether the cursor is on it.
Trait Implementations§
Source§impl Clone for MenuItemView
impl Clone for MenuItemView
Source§fn clone(&self) -> MenuItemView
fn clone(&self) -> MenuItemView
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MenuItemView
impl Debug for MenuItemView
impl Eq for MenuItemView
Source§impl PartialEq for MenuItemView
impl PartialEq for MenuItemView
impl StructuralPartialEq for MenuItemView
Auto Trait Implementations§
impl Freeze for MenuItemView
impl RefUnwindSafe for MenuItemView
impl Send for MenuItemView
impl Sync for MenuItemView
impl Unpin for MenuItemView
impl UnsafeUnpin for MenuItemView
impl UnwindSafe for MenuItemView
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