bevy_bc_ime_text_field

Crates.iobevy_bc_ime_text_field
lib.rsbevy_bc_ime_text_field
version0.0.5
created_at2025-07-11 11:33:22.388144+00
updated_at2025-10-23 06:24:59.250839+00
descriptionA simple IME-compatible text field plugin for Bevy (Windows only). Supports both UI and 2D text input.
homepage
repositoryhttps://github.com/SheepBC/bevy_bc_ime_text_field
max_upload_size
id1747806
size183,155
SheepBC (SheepBC)

documentation

https://docs.rs/bevy_bc_ime_text_field

README

Bevy_BC_ime_text_field

A simple IME-compatible text field plugin for Bevy (Windows only).
Supports both UI and 2D text input.

✨ Features

  • IME (Input Method Editor) text input support (Windows)
  • 2D & UI-compatible text fields

📦 Installation

Add this to your Cargo.toml:

[dependencies]
bevy_bc_ime_text_field = "VERSION"
bevy Version bevy_bc_ime_text_field Version
0.16 0.0.1 ~

🚀 Example

use bevy::color::palettes::css::PINK;
use bevy::prelude::*;
use bevy_bc_ime_text_field::*;
use bevy_bc_ime_text_field::text_field::*;
use bevy_bc_ime_text_field::text_field_style::*;

fn main() {
    App::new()
    .add_plugins(DefaultPlugins)
    .add_plugins(ImeTextFieldPlugin)//✅required
    .add_systems(Startup,setup)
    .run();
}

fn setup(
    mut commands: Commands,
    asset_server: Res<AssetServer>
){
    
    commands.spawn(Camera2d);

    //✅collects
    commands.spawn(
        TextField::new2d(true),
    );

    commands.spawn(
        TextField::new(true)
    );

    commands.spawn((
        TextField::new2d(false),
        TextFieldStyle {
            color: PINK.into(),
            ..Default::default()
        }
    ));

    commands.spawn((
        TextField::default(),//✅required
        TextFieldInfo::default(),
        TextFieldStyle::default(),
        TextFieldInput::default(),

        //text
        Text::default(),

        //text2D
        /*
        Text2d::default(), //✅required
        Sprite::default(),
        Pickable::default(),
         */
    ));

    //❌incorrect
    commands.spawn((
        TextField::new(true),
        TextFieldInfo::default(),
    ));

}


Commit count: 0

cargo fmt