diff --git a/Cargo.toml b/Cargo.toml index e5e960d..04b1caf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,11 +11,12 @@ 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" image = "0.25.1" raw-window-handle = "0.6.1" ron = "0.8.1" +serde = { version = "1.0.199", features = ["derive"] } winit = "0.28.7" diff --git a/src/config.rs b/src/config.rs new file mode 100644 index 0000000..18f533b --- /dev/null +++ b/src/config.rs @@ -0,0 +1,205 @@ +/// Configs Module +use gilrs::ev::Button; +/// +/// +use serde::{Deserialize, Serialize}; +#[derive(Deserialize, Serialize)] +pub struct Configs {} + +#[derive(Deserialize, Serialize)] +pub struct DisplayConfigs { + // TODO set Resolutions + //Resolution: + // i think thats it tbqh +} + +#[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, 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