1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
#![allow(dead_code)] pub mod keyboard; // pub mod mouse; use self::keyboard::Keyboard; /// All of the input states #[derive(Debug, Clone)] pub struct Input { pub kbd: Keyboard, // pub mouse: Mouse, } impl Input { pub fn new() -> Self { Self { kbd: Keyboard::default(), } } /// Resets all the states pub fn clear(&mut self) { self.kbd.clear(); // self.mouse.clear(); } }