Trait piston::input::TextEvent
[−]
pub trait TextEvent { fn from_text(text: &str, old_event: &Self) -> Option<Self>; fn text<U, F>(&self, f: F) -> Option<U> where F: FnMut(&str) -> U; fn text_args(&self) -> Option<String> { ... } }
When receiving text from user, such as typing a character
Required Methods
fn from_text(text: &str, old_event: &Self) -> Option<Self>
Creates a text event.
fn text<U, F>(&self, f: F) -> Option<U> where F: FnMut(&str) -> U
Calls closure if this is a text event.
Provided Methods
Implementors
impl<T> TextEvent for T where T: GenericEvent