bevy_input_bindings 0.0.2

High level, flexible and shareable input binding library for the Bevy game engine
Documentation
use bevy::ecs::component::Component;

use crate::controller_layout::ControllerLayout;

/// Component to identify controllers.
#[derive(Component)]
pub struct ControllerInterface {
    controller_layout: ControllerLayout,
}

impl ControllerInterface {
    pub(crate) fn new(controller_type: ControllerLayout) -> Self {
        Self {
            controller_layout: controller_type,
        }
    }

    /// Get the detected controller type
    pub fn layout<'a>(&'a self) -> &'a ControllerLayout {
        &self.controller_layout
    }
}