add proper padding to HUD

This commit is contained in:
yuni 2024-03-18 00:42:10 +01:00
parent 49414989bd
commit 0cf1c4102f

View file

@ -53,7 +53,7 @@ fn setup(
};
let mut bundle_fps = TextBundle::from_sections([
TextSection::new(
" 帧率 ",
"帧率 ",
TextStyle {
font: asset_server.load(FONT),
font_size: settings.font_size_hud,
@ -71,7 +71,7 @@ fn setup(
}
),
TextSection::new(
"\n 电量 ",
"\n电量 ",
TextStyle {
font: asset_server.load(FONT),
font_size: settings.font_size_hud,
@ -89,7 +89,7 @@ fn setup(
}
),
TextSection::new(
"\n 氧 OXYGEN ",
"\n氧 OXYGEN ",
TextStyle {
font: asset_server.load(FONT),
font_size: settings.font_size_hud,
@ -107,7 +107,7 @@ fn setup(
}
),
TextSection::new(
"\n Adren水平 ",
"\nAdren水平 ",
TextStyle {
font: asset_server.load(FONT),
font_size: settings.font_size_hud,
@ -133,8 +133,7 @@ fn setup(
..default()
}
),
TextSection::new(
"<log>",
TextSection::from_style(
TextStyle {
font: asset_server.load(FONT),
font_size: settings.font_size_hud,
@ -142,7 +141,11 @@ fn setup(
..default()
}
),
]);
]).with_style(Style {
top: Val::VMin(3.0),
left: Val::VMin(3.0),
..default()
});
bundle_fps.visibility = visibility;
commands.spawn((
bundle_fps,