Function translate_winit_input

Source
pub fn translate_winit_input(event: &WindowEvent) -> Option<InputEvent>
Expand description

Translates a winit::event::WindowEvent into Khora’s InputEvent format.

This function acts as an adapter, filtering and converting raw windowing events into a format that the engine’s core systems can understand and process. It ignores events that are not direct user input actions (e.g., window resizing, focus changes).

§Arguments

  • event: A reference to a WindowEvent from the winit library.

§Returns

Returns Some(InputEvent) if the event is a recognized input action, or None otherwise.