Add event handler methods to the engine structure

This commit is contained in:
reo 2025-09-18 00:32:12 +03:00
parent c32a452f17
commit 9905ffd26b
5 changed files with 29 additions and 25 deletions

View file

@ -66,6 +66,10 @@ impl<E: EngineTrait> Platform<E> for GliumPlatform<E> {
.systems
.values_mut()
.for_each(|system| system.handle_event(&mut self.window, event.clone()));
let mut ctx2 = ctx.clone();
ctx2.current_event = event.clone();
self.engine.handle_event(ctx2);
match event {
Event::WindowEvent { event, .. } => match event {