Trait egui_bind::BindTarget
source · 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§
sourceconst IS_POINTER: bool
const IS_POINTER: bool
Can accept pointer bind?
Required Methods§
sourcefn set_pointer(&mut self, button: PointerButton, modifiers: Modifiers)
fn set_pointer(&mut self, button: PointerButton, modifiers: Modifiers)
Sets new pointer bind
sourcefn down(&self, input: impl Deref<Target = InputState>) -> bool
fn down(&self, input: impl Deref<Target = InputState>) -> bool
Is bind down?
sourcefn pressed(&self, input: impl Deref<Target = InputState>) -> bool
fn pressed(&self, input: impl Deref<Target = InputState>) -> bool
Was bind pressed this frame?
sourcefn released(&self, input: impl Deref<Target = InputState>) -> bool
fn released(&self, input: impl Deref<Target = InputState>) -> bool
Was bind released this frame?