You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use bevy::prelude::*;fnmain(){App::new().add_plugins(DefaultPlugins).add_systems(Startup, hello_world_system).run();}fnhello_world_system(mutcommands:Commands){
commands.spawn(Camera2dBundle::default());
commands.spawn(NodeBundle{style:Style{min_width:Val::Px(500.),min_height:Val::Px(500.),border:UiRect::all(Val::Px(20.)),
..Style::default()},background_color:BackgroundColor(Color::BLUE),border_color:BorderColor(Color::YELLOW_GREEN),
..NodeBundle::default()});
commands.spawn((TextBundle{text:Text::from_section("Hi",TextStyle{font_size:100.,
..TextStyle::default()},),style:Style{min_width:Val::Px(500.),min_height:Val::Px(500.),left:Val::Px(600.),// Here we asked for border.border:UiRect::all(Val::Px(5.)),
..Style::default()},background_color:BackgroundColor(Color::VIOLET),
..TextBundle::default()},BorderColor(Color::ORANGE_RED),));}
What went wrong
There's no border around text node, even if border size is specified explicitly in TextBundle.
What is expected
Border
Or an error
Or at least a warning
Or at least mention in documentation
The text was updated successfully, but these errors were encountered:
Bevy version
main
What you did
What went wrong
There's no border around text node, even if border size is specified explicitly in
TextBundle
.What is expected
The text was updated successfully, but these errors were encountered: