bevy_ui_builders/text_input/
plugin.rs1use bevy::prelude::*;
4use bevy_plugin_builder::define_plugin;
5use super::native_input::*;
6use super::systems::handle_clear_button_clicks;
7
8define_plugin!(TextInputPlugin {
10 events: [
11 TextInputSubmitEvent,
12 TextInputChangeEvent
13 ],
14 custom_init: |app: &mut App| {
15 app.add_observer(init_text_input);
16 },
17 update: [
18 sync_initial_text_content,
20
21 handle_keyboard_input,
23 handle_tab_navigation,
24 handle_click_outside, handle_mouse_input, handle_mouse_drag,
27 update_cursor_blink,
28 update_focus_visual, render_text,
30 render_selection,
31
32 handle_clear_button_clicks
34 ]
35});