thin_engine

Module input_map_setup

Source
Expand description

imports base roots of input_code options to reduce boilerplate

#[derive(Hash, PartialEq, Eq, Clone, Copy)]
enum Actions { Foo, Bar }
use Actions::*;
let input_map = {
    use thin_engine::input_map_setup::*;
    thin_engine::input_map::input_map!(
        (Foo, Axis(LeftStickX, Pos), MouseMoveX(Pos),  GamepadButton::West),
        (Bar, MouseScroll(Neg),      MouseButton::Left)
    )
};

Re-exports§

  • pub use winit_input_map::GamepadInput::Axis;
  • pub use winit::keyboard::KeyCode::*;
  • pub use gilrs::Axis::*;
  • pub use winit_input_map::DeviceInput::*;
  • pub use winit_input_map::AxisSign::*;

Macros§

  • Creates new input map with inputed input codes bound to the acompaning action. Anything that impliments into<InputCode> can be bound to an action

Structs§

  • A struct that handles all your input needs once you’ve hooked it up to winit and gilrs.

Enums§

Type Aliases§