pub struct NameBox { /* private fields */ }Expand description
The name being typed on the keyboard.
Implementations§
Source§impl NameBox
impl NameBox
Sourcepub fn new(name: &str, rules: NameRules) -> Self
pub fn new(name: &str, rules: NameRules) -> Self
The box for name, which the player types on from.
Sourcepub fn handle<G: GameData>(
&mut self,
input: &FrameInput<G::Action>,
ctx: &mut Ctx<G>,
) -> NameEvent
pub fn handle<G: GameData>( &mut self, input: &FrameInput<G::Action>, ctx: &mut Ctx<G>, ) -> NameEvent
One frame: the characters typed, then the text box’s keys. Actions are ignored. A character the rules refuse sounds denied; typing makes no sound. Cancel makes none either: it is the screen’s.
Trait Implementations§
impl Eq for NameBox
impl StructuralPartialEq for NameBox
Auto Trait Implementations§
impl Freeze for NameBox
impl RefUnwindSafe for NameBox
impl Send for NameBox
impl Sync for NameBox
impl Unpin for NameBox
impl UnsafeUnpin for NameBox
impl UnwindSafe for NameBox
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