diff --git a/Cargo.toml b/Cargo.toml index 5128077..04b1caf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ cgmath = "0.18.0" egui = "0.23.0" egui-winit = "0.23.0" egui_glow = { version = "0.23.0", features = ["winit"] } -gilrs = "0.10.7" +gilrs = { version = "0.10.7", features = ["serde-serialize"] } glow = "0.12.3" glutin = "0.30.10" glutin-winit = "0.3.0" diff --git a/src/config.rs b/src/config.rs index c21126f..18f533b 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,9 +1,8 @@ /// Configs Module -use ron; +use gilrs::ev::Button; /// /// use serde::{Deserialize, Serialize}; - #[derive(Deserialize, Serialize)] pub struct Configs {} @@ -14,10 +13,63 @@ pub struct DisplayConfigs { // i think thats it tbqh } -#[derive(Deserialize, Serialize)] -pub struct InputConfigs {} +#[derive(Deserialize, Serialize, Debug, Default)] +pub struct InputConfigs { + keyboard_single: KeyboardConfig, + //Keyboard_duo_1: KeyboardConfig, + // keyboard_duo_2: KeyboardConfig + Controller1: Option, + Controller2: Option, + Controller3: Option, + Controller4: Option, + Controller5: Option, +} -#[derive(Deserialize, Serialize)] +#[derive(Deserialize, Serialize, Debug)] +pub struct ControllerConfig { + // directionals + Up: Button, + Down: Button, + Right: Button, + Left: Button, + + // the punches + LightPunch: Button, + MediumPunch: Button, + HeavyPunch: Button, + + // the kicks + LightKick: Button, + MediumKick: Button, + HeavyKick: Button, + + // Macros + PunchMacro: Option