diff --git a/src/config.rs b/src/config.rs index 6666839..e476648 100644 --- a/src/config.rs +++ b/src/config.rs @@ -15,7 +15,7 @@ pub struct DisplayConfigs { // i think thats it tbqh } -#[derive(Deserialize, Serialize, Debug, Default)] +#[derive(Deserialize, Serialize, Debug, Default, Clone)] pub struct InputConfigs { keyboard_single: KeyboardConfig, //Keyboard_duo_1: KeyboardConfig, @@ -27,7 +27,7 @@ pub struct InputConfigs { pub Controller5: Option, } -#[derive(Deserialize, Serialize, Debug)] +#[derive(Deserialize, Serialize, Debug, Clone)] pub struct ControllerConfig { // directionals pub Up: Button, @@ -71,7 +71,7 @@ impl Default for ControllerConfig { } } } -#[derive(Deserialize, Serialize, Debug)] +#[derive(Deserialize, Serialize, Debug, Clone)] pub struct KeyboardConfig { // directionals pub Up: ScanCodes, @@ -118,7 +118,7 @@ impl Default for KeyboardConfig { /// TODO finish this /// UNTESTED AND UNFINISHED #[repr(u32)] -#[derive(Serialize, Deserialize, Debug)] +#[derive(Serialize, Deserialize, Debug, Clone)] pub enum ScanCodes { Escape = 0x01, Key1 = 0x02, diff --git a/src/input.rs b/src/input.rs new file mode 100644 index 0000000..f51b337 --- /dev/null +++ b/src/input.rs @@ -0,0 +1,5 @@ +use super::config::InputConfigs; + +struct InputInterpreter { + input_config: InputConfigs, +} diff --git a/src/main.rs b/src/main.rs index 67bd662..2bacb6c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,6 +21,7 @@ use glutin_winit::{self, GlWindow}; pub mod config; pub mod gui; +pub mod input; pub mod renderer; fn main() { // NOTE initialization code here