Added extra Traits and Added input manager module
parent
bee9ae2a41
commit
26e63c769d
|
@ -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<ControllerConfig>,
|
||||
}
|
||||
|
||||
#[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,
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
use super::config::InputConfigs;
|
||||
|
||||
struct InputInterpreter {
|
||||
input_config: InputConfigs,
|
||||
}
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue