Expand description
Systems for translating Bevy input messages into Egui input.
Structs§
- Egui
Context ImeState - Indicates whether IME is enabled or disabled to avoid sending message duplicates.
- Egui
Context Message Reader - A helper system param to iterate over pairs of messages and Egui contexts, see
EguiContextsMessageIterator. - Egui
Context Pointer Position - Cached pointer position, used to populate
egui::Event::PointerButtonmessages. - Egui
Context Pointer Touch Id - Stores an active touch id.
- Egui
Contexts Message Iterator - Iterates over pairs of
(Message, Entity), where the entity points to the context that the message is related to. - Egui
File Drag AndDrop Message - Wraps
bevy::FileDragAndDropmessages emitted bycrate::EguiInputSetsystems. - Egui
Input Event - Wraps Egui messages emitted by
crate::EguiInputSetsystems. - 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 messages to).
- Hovered
NonWindow Egui Context - Insert this resource when a pointer hovers over a non-window (e.g. world-space)
EguiContextentity. Also, make sure to update anEguiContextPointerPositioncomponent of a hovered entity. Both updates should happen duringcrate::EguiInputSet::InitReading. - Modifier
Keys State - Stores “pressed” state of modifier keys.
- Window
ToEgui Context Map - A bidirectional map between
WindowandEguiContextentities. Multiple contexts may belong to a single window.
Functions§
- absorb_
bevy_ input_ system - Clears Bevy input message buffers and resets
ButtonInputresources if Egui is using pointer or keyboard (see thewrite_egui_wants_input_systemrun condition). - egui_
wants_ any_ input - Returns
trueif any of the following is true:EguiWantsInput::wants_any_pointer_input,EguiWantsInput::wants_any_keyboard_input. - egui_
wants_ any_ keyboard_ input - Returns
trueif any of the following is true:EguiWantsInput::wants_keyboard_input,EguiWantsInput::is_context_menu_open. - egui_
wants_ any_ pointer_ input - Returns
trueif any of the following is true:EguiWantsInput::is_pointer_over_area,EguiWantsInput::wants_pointer_input,EguiWantsInput::is_using_pointer,EguiWantsInput::is_context_menu_open. - process_
ime_ system - Show the virtual keyboard when a text input is focused.
Works by reading
EguiOutputand callingWindow::set_ime_allowedif theimefield is set. - write_
egui_ input_ system - Reads both
EguiFileDragAndDropMessageandEguiInputEventmessages and feeds them to Egui. - write_
egui_ wants_ input_ system - Updates the
EguiWantsInputresource. - write_
file_ dnd_ messages_ system - Reads
FileDragAndDropmessages and wraps them intoEguiFileDragAndDropMessage, can redirect messages toHoveredNonWindowEguiContext. - write_
ime_ messages_ system - Reads
Imemessages and wraps them intoEguiInputEvent, can redirect messages toFocusedNonWindowEguiContext. - write_
keyboard_ input_ messages_ system - Reads
KeyboardInputmessages and wraps them intoEguiInputEvent, can redirect messages toFocusedNonWindowEguiContext. - write_
modifiers_ keys_ state_ system - Reads
KeyboardInputmessages to update theModifierKeysStateresource. - write_
mouse_ wheel_ messages_ system - Reads
MouseWheelmessages and wraps them intoEguiInputEvent, can redirect messages toHoveredNonWindowEguiContext. - write_
non_ window_ pointer_ moved_ messages_ system - Reads
CursorMovedmessages and wraps them intoEguiInputEventfor aHoveredNonWindowEguiContextcontext (if one exists). - write_
non_ window_ touch_ messages_ system - Reads
TouchInputmessages and wraps them intoEguiInputEventfor aHoveredNonWindowEguiContextcontext (if one exists). - write_
pointer_ button_ messages_ system - Reads
MouseButtonInputmessages and wraps them intoEguiInputEvent, can redirect messages toHoveredNonWindowEguiContext, inserts, updates or removes theFocusedNonWindowEguiContextresource based on a hovered context. - write_
window_ pointer_ moved_ messages_ system - Reads
MouseButtonInputmessages and wraps them intoEguiInputEvent(only for window contexts). - write_
window_ touch_ messages_ system - Reads
TouchInputmessages and wraps them intoEguiInputEvent.