better cursor management

This commit is contained in:
2025-04-27 13:19:52 +02:00
parent fdc923621e
commit a3fa7eb9d2
4 changed files with 414 additions and 205 deletions

View File

@@ -58,9 +58,10 @@ impl winit::application::ApplicationHandler for Application {
event,
is_synthetic: _,
} => {
if event.state.is_pressed() {
state.handle_keyboard_input(&event);
}
state.handle_keyboard_input(&event);
}
WindowEvent::ModifiersChanged(modifiers) => {
state.update_modifiers(modifiers.state());
}
WindowEvent::CloseRequested => event_loop.exit(),
_ => {}