set inputs as scancodes instead of u32
parent
0028bd31c3
commit
71add6cfc6
|
@ -20,24 +20,24 @@ pub struct InputConfigs {}
|
||||||
#[derive(Deserialize, Serialize)]
|
#[derive(Deserialize, Serialize)]
|
||||||
pub struct KeyboardConfig {
|
pub struct KeyboardConfig {
|
||||||
// directionals
|
// directionals
|
||||||
Up: u32,
|
Up: ScanCodes,
|
||||||
Down: u32,
|
Down: ScanCodes,
|
||||||
Right: u32,
|
Right: ScanCodes,
|
||||||
Left: u32,
|
Left: ScanCodes,
|
||||||
|
|
||||||
// the punches
|
// the punches
|
||||||
LightPunch: u32,
|
LightPunch: ScanCodes,
|
||||||
MediumPunch: u32,
|
MediumPunch: ScanCodes,
|
||||||
HeavyPunch: u32,
|
HeavyPunch: ScanCodes,
|
||||||
|
|
||||||
// the kicks
|
// the kicks
|
||||||
LightKick: u32,
|
LightKick: ScanCodes,
|
||||||
MediumKick: u32,
|
MediumKick: ScanCodes,
|
||||||
HeavyKick: u32,
|
HeavyKick: ScanCodes,
|
||||||
|
|
||||||
// Macros
|
// Macros
|
||||||
PunchMacro: u32,
|
PunchMacro: ScanCodes,
|
||||||
KickMacro: u32,
|
KickMacro: ScanCodes,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for KeyboardConfig {
|
impl Default for KeyboardConfig {
|
||||||
|
@ -64,6 +64,7 @@ impl Default for KeyboardConfig {
|
||||||
/// TODO finish this
|
/// TODO finish this
|
||||||
/// UNTESTED AND UNFINISHED
|
/// UNTESTED AND UNFINISHED
|
||||||
#[repr(u32)]
|
#[repr(u32)]
|
||||||
|
#[derive(Serialize, Deserialize)]
|
||||||
pub enum ScanCodes {
|
pub enum ScanCodes {
|
||||||
Escape = 0x01,
|
Escape = 0x01,
|
||||||
Key1 = 0x02,
|
Key1 = 0x02,
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
use std::rc::Rc;
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::thread;
|
use std::thread;
|
||||||
use std::time::{Duration, Instant};
|
use std::time::{Duration, Instant};
|
||||||
|
@ -18,6 +17,7 @@ use glutin::{context::Version, prelude::*};
|
||||||
use glutin_winit::DisplayBuilder;
|
use glutin_winit::DisplayBuilder;
|
||||||
use glutin_winit::{self, GlWindow};
|
use glutin_winit::{self, GlWindow};
|
||||||
|
|
||||||
|
pub mod config;
|
||||||
pub mod gui;
|
pub mod gui;
|
||||||
pub mod renderer;
|
pub mod renderer;
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
Loading…
Reference in New Issue