//! Convenience accessors that resolve to the primary input state.

use crate::ecs::input::resources::{Keyboard, Mouse};
use crate::ecs::world::World;

/// Returns the mouse state from the window currently receiving user
/// input.
pub fn mouse_for_active(world: &World) -> &Mouse {
    &world.resources.input.mouse
}

/// Returns the keyboard state from the window currently receiving user
/// input.
pub fn keyboard_for_active(world: &World) -> &Keyboard {
    &world.resources.input.keyboard
}
