Expand description
Systems for translating Bevy input events into Egui input.
Structs§
- Egui
Context ImeState - Indicates whether IME is enabled or disabled to avoid sending event duplicates.
- Egui
Context Pointer Position - Cached pointer position, used to populate
egui::Event::PointerButton
events. - Egui
Context Pointer Touch Id - Stores an active touch id.
- Egui
File Drag AndDrop Event - Wraps
bevy::FileDragAndDrop
events emitted bycrate::EguiInputSet
systems. - Egui
Input Event - Wraps Egui events emitted by
crate::EguiInputSet
systems. - Egui
Wants Input - Stores whether there’s an Egui context using pointer or keyboard.
- Focused
NonWindow Egui Context - Stores an entity of a focused non-window context (to push keyboard events to).
- Hovered
NonWindow Egui Context - Insert this resource when a pointer hovers over a non-window (e.g. world-space)
EguiContext
entity. Also, make sure to update anEguiContextPointerPosition
component of a hovered entity. Both updates should happen duringcrate::EguiInputSet::InitReading
. - Modifier
Keys State - 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 thewrite_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
andEguiInputEvent
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 intoEguiFileDragAndDropEvent
, can redirect events toFocusedNonWindowEguiContext
. - write_
ime_ events_ system - Reads
Ime
events and wraps them intoEguiInputEvent
, can redirect events toFocusedNonWindowEguiContext
. - write_
keyboard_ input_ events_ system - Reads
KeyboardInput
events and wraps them intoEguiInputEvent
, can redirect events toFocusedNonWindowEguiContext
. - write_
modifiers_ keys_ state_ system - Reads
KeyboardInput
events to update theModifierKeysState
resource. - write_
mouse_ wheel_ events_ system - Reads
MouseWheel
events and wraps them intoEguiInputEvent
, can redirect events toHoveredNonWindowEguiContext
. - write_
non_ window_ pointer_ moved_ events_ system - Reads
CursorMoved
events and wraps them intoEguiInputEvent
for aHoveredNonWindowEguiContext
context (if one exists). - write_
non_ window_ touch_ events_ system - Reads
TouchInput
events and wraps them intoEguiInputEvent
for aHoveredNonWindowEguiContext
context (if one exists). - write_
pointer_ button_ events_ system - Reads
MouseButtonInput
events and wraps them intoEguiInputEvent
, can redirect events toHoveredNonWindowEguiContext
, inserts, updates or removes theFocusedNonWindowEguiContext
resource based on a hovered context. - write_
window_ pointer_ moved_ events_ system - Reads
MouseButtonInput
events and wraps them intoEguiInputEvent
(only for window contexts). - write_
window_ touch_ events_ system - Reads
TouchInput
events and wraps them intoEguiInputEvent
.