pub enum HintDevice {
KeyboardMouse,
Gamepad,
Touch,
}Expand description
Device family used to select binding hints. Keyboard and mouse share a family because a player commonly uses both together. Controller and touch labels use the host’s channel numbers, not guessed hardware glyphs.
use ferravex_render::input::PlayerInput;
let input = PlayerInput::transient("hint-device");
let device = input.current_device();
assert_eq!(format!("{device:?}"), "KeyboardMouse");Variants§
Trait Implementations§
Source§impl Clone for HintDevice
impl Clone for HintDevice
Source§fn clone(&self) -> HintDevice
fn clone(&self) -> HintDevice
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HintDevice
impl Debug for HintDevice
Source§impl PartialEq for HintDevice
impl PartialEq for HintDevice
impl Copy for HintDevice
impl Eq for HintDevice
impl StructuralPartialEq for HintDevice
Auto Trait Implementations§
impl Freeze for HintDevice
impl RefUnwindSafe for HintDevice
impl Send for HintDevice
impl Sync for HintDevice
impl Unpin for HintDevice
impl UnwindSafe for HintDevice
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