[][src]Trait romy_core::input::InputConvert

pub trait InputConvert {
    fn affinity(&self, device_type: InputDeviceType) -> Option<i32>;
fn convert(&self, device_type: InputDeviceType) -> Option<InputDevice>; }

Trait for converting from one input type to another

Required methods

fn affinity(&self, device_type: InputDeviceType) -> Option<i32>

Returns how closely this device matches the type of another, for example a standard controller is closely to a NES style controller than a keyboard is. Lower values are closer fits. None = cant be converted at all.

fn convert(&self, device_type: InputDeviceType) -> Option<InputDevice>

Loading content...

Implementors

impl InputConvert for InputDevice[src]

impl InputConvert for Controller[src]

impl InputConvert for InputCollection[src]

impl InputConvert for Keyboard[src]

impl InputConvert for Nes[src]

Loading content...