Trait input::PressEvent
[−]
[src]
pub trait PressEvent: Sized { fn from_button(button: Button, old_event: &Self) -> Option<Self>; fn press<U, F>(&self, f: F) -> Option<U>
where
F: FnMut(Button) -> U; fn press_args(&self) -> Option<Button> { ... } }
The press of a button
Required Methods
Creates a press event.
fn press<U, F>(&self, f: F) -> Option<U> where
F: FnMut(Button) -> U,
F: FnMut(Button) -> U,
Calls closure if this is a press event.
Provided Methods
fn press_args(&self) -> Option<Button>
Returns press arguments.
Implementors
impl PressEvent for Input