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 aWindowEvent
from thewinit
library.
§Returns
Returns Some(InputEvent)
if the event is a recognized input action, or None
otherwise.