Just spawn one CameraUiBundle (not 4) (#1047)
This commit is contained in:
parent
9239621ffc
commit
fd3706b8de
@ -21,7 +21,8 @@ struct TextChanges;
|
|||||||
|
|
||||||
fn infotext_system(commands: &mut Commands, asset_server: Res<AssetServer>) {
|
fn infotext_system(commands: &mut Commands, asset_server: Res<AssetServer>) {
|
||||||
let font = asset_server.load("fonts/FiraSans-Bold.ttf");
|
let font = asset_server.load("fonts/FiraSans-Bold.ttf");
|
||||||
commands.spawn(CameraUiBundle::default()).spawn(TextBundle {
|
commands.spawn(CameraUiBundle::default());
|
||||||
|
commands.spawn(TextBundle {
|
||||||
style: Style {
|
style: Style {
|
||||||
align_self: AlignSelf::FlexEnd,
|
align_self: AlignSelf::FlexEnd,
|
||||||
position_type: PositionType::Absolute,
|
position_type: PositionType::Absolute,
|
||||||
@ -43,7 +44,7 @@ fn infotext_system(commands: &mut Commands, asset_server: Res<AssetServer>) {
|
|||||||
},
|
},
|
||||||
..Default::default()
|
..Default::default()
|
||||||
});
|
});
|
||||||
commands.spawn(CameraUiBundle::default()).spawn(TextBundle {
|
commands.spawn(TextBundle {
|
||||||
style: Style {
|
style: Style {
|
||||||
align_self: AlignSelf::FlexEnd,
|
align_self: AlignSelf::FlexEnd,
|
||||||
position_type: PositionType::Absolute,
|
position_type: PositionType::Absolute,
|
||||||
@ -74,7 +75,6 @@ fn infotext_system(commands: &mut Commands, asset_server: Res<AssetServer>) {
|
|||||||
..Default::default()
|
..Default::default()
|
||||||
});
|
});
|
||||||
commands
|
commands
|
||||||
.spawn(CameraUiBundle::default())
|
|
||||||
.spawn(TextBundle {
|
.spawn(TextBundle {
|
||||||
style: Style {
|
style: Style {
|
||||||
align_self: AlignSelf::FlexEnd,
|
align_self: AlignSelf::FlexEnd,
|
||||||
@ -98,7 +98,7 @@ fn infotext_system(commands: &mut Commands, asset_server: Res<AssetServer>) {
|
|||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
.with(TextChanges);
|
.with(TextChanges);
|
||||||
commands.spawn(CameraUiBundle::default()).spawn(TextBundle {
|
commands.spawn(TextBundle {
|
||||||
style: Style {
|
style: Style {
|
||||||
align_self: AlignSelf::FlexEnd,
|
align_self: AlignSelf::FlexEnd,
|
||||||
position_type: PositionType::Absolute,
|
position_type: PositionType::Absolute,
|
||||||
|
Loading…
Reference in New Issue
Block a user