Skip to content
Snippets Groups Projects
user avatar
sam authored
* add TODOs

* separate CosmicEdit from display

breaks loads of stuff: sizing, click functions, cursor hovering just a few

Only tested on login example

not optimized; spams handle weak clones to ensure got correct handle (will be fixed by new handle swapping routine)

not sure about the API changes but might just need to get used to it, is much more extensible

* break render function apart

centered padding now broken, not tested other text positions

* reshape earlier in render to fix padding issue

* move image creation to own system

* resize internal sprite to computed UI size

* prevent panic on zero size UI elements

* clicks + editor-display one-to-many relationships

* add render systemset

* fix hoverable invisible sprites

* update examples

* fix auto-height bugs

* clippy
0bb15dea

bevy_cosmic_edit

This bevy plugin provides multiline text editing for bevy apps, thanks to cosmic_text crate!

Emoji, ligatures, and other fancy stuff is supported!

bevy_cosmic_edit

Usage

⚠️ Warning: This plugin is currently in early development, and its API is subject to change.

Explore examples folder for basic usage.

Native:

cargo r --example text_input

Wasm:

cargo install wasm-server-runner
RUSTFLAGS=--cfg=web_sys_unstable_apis cargo r --target wasm32-unknown-unknown --example text_input

Compatibility

bevy bevy_cosmic_edit
0.11 0.8 - latest

License

MIT or Apache-2.0