#How do you make `TextBundle` a fixed width with wrapping?
16 messages · Page 1 of 1 (latest)
There's no public way to make single blocks auto format
but you can format it yourself like this
if you want auto wrapping, rustfmt has you by default in visual studio code
just check save on format in settings
huh, but what if the text is dynamic?
like, isn't the whole point of a layout system to have things auto-wrap? like there's flexbox that's responsive and all that, but text can't wrap to fit its parent?
it has a max_width setting which is 100 characters long
i'm not sure i understand your question
I don't see a max_width on TextStyle or TextSection or TextBundle or any of the related types, and it doesn't seem to wrap based on the width of the max_width of its parent
ah you're talking about text bundle 
it's 3am here i should sleep
i thought you meant wrapping in your editor
you probably wanna use some egui or something more sophisticated
ah okay, I already have egui in my project so it'll be easy 😩
max_size is on Style. There's some wrapping text (pink) in this example: https://bevyengine.org/examples/ui/text-debug/
Note that wrapping doesn't work with Val::Percent: https://github.com/bevyengine/bevy/issues/1490