Closed Friz64 closed 5 years ago
I've been working on this and unfortunately i dont think its gonna be completely possible due to different behaviours based on different types and rust being a statically typed languange, i got the option part automated tho, so thats a plus. I'm gonna clean the code up, test everything, commit and carry on with other stuff.
closing with https://github.com/Friz64/ecsvulk/commit/3c501fb61ea174db791197b4875a77de7d37906a
i am quite satisfied with the end result, it's definitely a lot cleaner than the old version, although not perfect
I'm not really satisfied with the hack after all, there must be a better way to do this
impl UpdateConfigHack for bool {
fn update_key(&mut self, _: Option<VirtualKeyCode>, _: ElementState) {}
fn update_mouse(&mut self, _: MouseButton, _: ElementState) {}
fn update_scroll(&mut self, _: f32) {}
fn update_status(&mut self) {}
}
it now became another macro
ignore!(f32, i32, String, bool);
i am repeating myself frequently in config.rs, in theory everything could be replaced with a single macro
maybe it'll look something like this: