dorkhub

bevy_simple_text_input

Bevy plugin for a simple single-line text input widget.

rparrett
Rust12228 forksupdated 1 month ago
git clone https://github.com/rparrett/bevy_simple_text_input.gitrparrett/bevy_simple_text_input

bevy_simple_text_input

crates.io docs Following released Bevy versions

An unambitious single-line text input widget for bevy_ui.

animated screenshot of text input widget gaining focus and text typed and submitted

Deprecated

Bevy 0.19 now has a built-in EditableText component. It is better and has more features overall, and you should probably use it instead of this.

I am not planning on any more non-bugfix releases and will archive the project when Bevy 0.20 is released.

Usage

Important

Code and examples in the main branch are under development and may not be compatible with the released version on crates.io. The latest branch will contain the code from the most recent release.

See examples/basic.rs.

Features

I am not trying to build and maintain an enterprise-grade text input, just something that is good enough to be useful in small projects.

  • Scrolling
  • Keyboard cursor movement (char, word, start/end)
  • Disable / focus
  • Placeholders
  • Doesn't completely choke on unicode
  • Password masking
  • "Submit" events
  • Max length

Maybe

  • Input filtering
  • Mouse cursor movement
  • Proper unicode grapheme support
  • IME support

Probably not

I might consider very high quality contributions in these areas, but probably won't be working on them myself. These would likely involve adding dependencies or adding lots of code that I don't want to commit to maintaining.

  • Multi-line
  • Copy / paste
  • Selection
  • Mobile

Definitely not

  • Rich text

Compatibility

bevy_simple_text_input bevy
0.15 0.19
0.13-0.14 0.18
0.12 0.17
0.11 0.16
0.10 0.15
0.8-0.9 0.14
0.4-0.7 0.13
0.3 0.12
0.1-0.2 0.11

Contributing

Please feel free to open a PR!

The code should be simple enough for users to quickly understand and modify for their own purposes. Any new dependencies must not also depend on Bevy. Ideally, we should not add any new dependencies.

Please keep PRs small and scoped to a single feature or fix.

more like this

anne-key

Firmware for Anne Pro Keyboard written in Rust

Rust572

TachiSnap

TachiSnap — Pixel Snapper for animation pixel artists. Rust + WebAssembly client-side tool for cleaning up AI-generated…

HTML50

bit_gossip

Pathfinding library for calculating all node pairs' shortest paths in an unweighted undirected graph.

Rust50

search

search projects, people, and tags