pub trait BindTarget: Clone {
    const IS_KEY: bool;
    const IS_POINTER: bool;
    const CLEARABLE: bool;

    fn set_key(&mut self, key: Key, modifiers: Modifiers);
    fn set_pointer(&mut self, button: PointerButton, modifiers: Modifiers);
    fn clear(&mut self);
    fn format(&self) -> String;
    fn down(&self, input: impl Deref<Target = InputState>) -> bool;
    fn pressed(&self, input: impl Deref<Target = InputState>) -> bool;
    fn released(&self, input: impl Deref<Target = InputState>) -> bool;
}
Expand description

Type that can be used as a bind target

Required Associated Constants

Can accept key bind?

Can accept pointer bind?

Can be cleared?

Required Methods

Sets new key bind

Sets new pointer bind

Clears the bind

Formats a bind to a string

Is bind down?

Was bind pressed this frame?

Was bind released this frame?

Implementations on Foreign Types

Implementors