Module input

Source
Expand description

Systems for translating Bevy input events into Egui input.

Structs§

EguiContextImeState
Indicates whether IME is enabled or disabled to avoid sending event duplicates.
EguiContextPointerPosition
Cached pointer position, used to populate egui::Event::PointerButton events.
EguiContextPointerTouchId
Stores an active touch id.
EguiFileDragAndDropEvent
Wraps bevy::FileDragAndDrop events emitted by crate::EguiInputSet systems.
EguiInputEvent
Wraps Egui events emitted by crate::EguiInputSet systems.
EguiWantsInput
Stores whether there’s an Egui context using pointer or keyboard.
FocusedNonWindowEguiContext
Stores an entity of a focused non-window context (to push keyboard events to).
HoveredNonWindowEguiContext
Insert this resource when a pointer hovers over a non-window (e.g. world-space) EguiContext entity. Also, make sure to update an EguiContextPointerPosition component of a hovered entity. Both updates should happen during crate::EguiInputSet::InitReading.
ModifierKeysState
Stores “pressed” state of modifier keys.

Functions§

absorb_bevy_input_system
Clears Bevy input event buffers and resets ButtonInput resources if Egui is using pointer or keyboard (see the write_egui_wants_input_system run condition).
egui_wants_any_input
Returns true if any of the following is true: EguiWantsInput::wants_any_pointer_input, EguiWantsInput::wants_any_keyboard_input.
egui_wants_any_keyboard_input
Returns true if any of the following is true: EguiWantsInput::wants_keyboard_input, EguiWantsInput::is_context_menu_open.
egui_wants_any_pointer_input
Returns true if any of the following is true: EguiWantsInput::is_pointer_over_area, EguiWantsInput::wants_pointer_input, EguiWantsInput::is_using_pointer, EguiWantsInput::is_context_menu_open.
write_egui_input_system
Reads both EguiFileDragAndDropEvent and EguiInputEvent events and feeds them to Egui.
write_egui_wants_input_system
Updates the EguiWantsInput resource.
write_file_dnd_events_system
Reads FileDragAndDrop events and wraps them into EguiFileDragAndDropEvent, can redirect events to FocusedNonWindowEguiContext.
write_ime_events_system
Reads Ime events and wraps them into EguiInputEvent, can redirect events to FocusedNonWindowEguiContext.
write_keyboard_input_events_system
Reads KeyboardInput events and wraps them into EguiInputEvent, can redirect events to FocusedNonWindowEguiContext.
write_modifiers_keys_state_system
Reads KeyboardInput events to update the ModifierKeysState resource.
write_mouse_wheel_events_system
Reads MouseWheel events and wraps them into EguiInputEvent, can redirect events to HoveredNonWindowEguiContext.
write_non_window_pointer_moved_events_system
Reads CursorMoved events and wraps them into EguiInputEvent for a HoveredNonWindowEguiContext context (if one exists).
write_non_window_touch_events_system
Reads TouchInput events and wraps them into EguiInputEvent for a HoveredNonWindowEguiContext context (if one exists).
write_pointer_button_events_system
Reads MouseButtonInput events and wraps them into EguiInputEvent, can redirect events to HoveredNonWindowEguiContext, inserts, updates or removes the FocusedNonWindowEguiContext resource based on a hovered context.
write_window_pointer_moved_events_system
Reads MouseButtonInput events and wraps them into EguiInputEvent (only for window contexts).
write_window_touch_events_system
Reads TouchInput events and wraps them into EguiInputEvent.