mirror of
https://github.com/bevyengine/bevy
synced 2024-11-21 20:23:28 +00:00
Just spawn one CameraUiBundle (not 4) (#1047)
This commit is contained in:
parent
9239621ffc
commit
fd3706b8de
1 changed files with 4 additions and 4 deletions
|
@ -21,7 +21,8 @@ struct TextChanges;
|
|||
|
||||
fn infotext_system(commands: &mut Commands, asset_server: Res<AssetServer>) {
|
||||
let font = asset_server.load("fonts/FiraSans-Bold.ttf");
|
||||
commands.spawn(CameraUiBundle::default()).spawn(TextBundle {
|
||||
commands.spawn(CameraUiBundle::default());
|
||||
commands.spawn(TextBundle {
|
||||
style: Style {
|
||||
align_self: AlignSelf::FlexEnd,
|
||||
position_type: PositionType::Absolute,
|
||||
|
@ -43,7 +44,7 @@ fn infotext_system(commands: &mut Commands, asset_server: Res<AssetServer>) {
|
|||
},
|
||||
..Default::default()
|
||||
});
|
||||
commands.spawn(CameraUiBundle::default()).spawn(TextBundle {
|
||||
commands.spawn(TextBundle {
|
||||
style: Style {
|
||||
align_self: AlignSelf::FlexEnd,
|
||||
position_type: PositionType::Absolute,
|
||||
|
@ -74,7 +75,6 @@ fn infotext_system(commands: &mut Commands, asset_server: Res<AssetServer>) {
|
|||
..Default::default()
|
||||
});
|
||||
commands
|
||||
.spawn(CameraUiBundle::default())
|
||||
.spawn(TextBundle {
|
||||
style: Style {
|
||||
align_self: AlignSelf::FlexEnd,
|
||||
|
@ -98,7 +98,7 @@ fn infotext_system(commands: &mut Commands, asset_server: Res<AssetServer>) {
|
|||
..Default::default()
|
||||
})
|
||||
.with(TextChanges);
|
||||
commands.spawn(CameraUiBundle::default()).spawn(TextBundle {
|
||||
commands.spawn(TextBundle {
|
||||
style: Style {
|
||||
align_self: AlignSelf::FlexEnd,
|
||||
position_type: PositionType::Absolute,
|
||||
|
|
Loading…
Reference in a new issue