pub struct NameEntry { /* private fields */ }Expand description
The name grid (a controller, or a device with no keyboard).
Implementations§
Source§impl NameEntry
impl NameEntry
Sourcepub const ACTIONS: &'static [UiAction] = crate::input::NAVIGATION
pub const ACTIONS: &'static [UiAction] = crate::input::NAVIGATION
What the grid reacts to (handle), for the screen
that shows it to declare
(Screen::actions).
Sourcepub fn handle<G: GameData>(
&mut self,
action: G::Action,
ctx: &mut Ctx<G>,
) -> NameEvent
pub fn handle<G: GameData>( &mut self, action: G::Action, ctx: &mut Ctx<G>, ) -> NameEvent
Handles action: the cursor keys move over the grid (wrapping along
a row, keeping to the last cell of a shorter row), Confirm uses the
focused cell, Cancel deletes the last character (on an empty name it
asks to close the grid). Plays the menu sounds, but not Cancel’s
closing one: that is the screen’s.
Trait Implementations§
impl Eq for NameEntry
impl StructuralPartialEq for NameEntry
Auto Trait Implementations§
impl Freeze for NameEntry
impl RefUnwindSafe for NameEntry
impl Send for NameEntry
impl Sync for NameEntry
impl Unpin for NameEntry
impl UnsafeUnpin for NameEntry
impl UnwindSafe for NameEntry
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