Crate bevy_simple_text_input

Source
Expand description

A Bevy plugin the provides a simple single-line text input widget.

§Examples

See the examples folder.

use bevy::prelude::*;
use bevy_simple_text_input::{TextInput, TextInputPlugin};

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_plugins(TextInputPlugin)
        .add_systems(Startup, setup)
        .run();
}

fn setup(mut commands: Commands) {
    commands.spawn(Camera2d);
    commands.spawn((NodeBundle::default(), TextInput));
}

Structs§

  • Marker component for a Text Input entity.
  • A combination of a key and required modifier keys that might trigger a TextInputAction.
  • A component containing the current text cursor position.
  • A component that manages the cursor’s blinking.
  • If true, the text input does not respond to keyboard events and the cursor is hidden.
  • A resource in which key bindings can be specified. Bindings are given as a tuple of (TextInputAction, TextInputBinding).
  • A component containing the placeholder text that is displayed when the text input is empty and not focused.
  • A Bevy Plugin providing the systems and assets required to make a TextInput work.
  • A component containing the text input’s settings.
  • An event that is fired when the user presses the enter key.
  • Label for systems that update text inputs.
  • The Bevy TextColor that will be used when creating the text input’s inner Bevy TextBundle.
  • The Bevy TextColor that will be used when creating the text input’s inner Bevy TextBundle.
  • A component containing the current value of the text input.

Enums§

  • Text navigation actions that can be bound via TextInputNavigationBindings.