remove top-left HUD entirely, apart of a very dim FPS display
This commit is contained in:
parent
db083e0638
commit
2f0c84c691
|
@ -74,10 +74,6 @@
|
|||
- Micros? What's that?:
|
||||
- Micrometeorites. Those tiny 混蛋 that fly right through you, leaving holes in your suit. And your body.
|
||||
- goto: help
|
||||
- What year is this?:
|
||||
- Oh, is your Augmented Reality deactivated?
|
||||
- Push the TAB button, your space suit's AR will show you the date and time.
|
||||
- goto: help
|
||||
- Why am I here?:
|
||||
- That's a very philosophical question.
|
||||
- I don't know.
|
||||
|
@ -309,10 +305,6 @@
|
|||
- We're about 150,000km away from the gas giant.
|
||||
- This region is called Serenity by its inhabitants, due to the relative safety from Jupiter's magnetic field and the micros.
|
||||
- goto: generic_questions
|
||||
- What time is it?:
|
||||
- Oh, is your Augmented Reality deactivated?
|
||||
- Push the TAB button, your space suit's AR will show you the date and time.
|
||||
- goto: generic_questions
|
||||
- I think I'm good for now.: []
|
||||
|
||||
|
||||
|
|
25
src/hud.rs
25
src/hud.rs
|
@ -230,6 +230,12 @@ pub fn setup(
|
|||
color: settings.hud_color_subtitles,
|
||||
..default()
|
||||
};
|
||||
let style_fps = TextStyle {
|
||||
font: font_handle.clone(),
|
||||
font_size: settings.font_size_fps,
|
||||
color: settings.hud_color_fps,
|
||||
..default()
|
||||
};
|
||||
let style_console = TextStyle {
|
||||
font: font_handle.clone(),
|
||||
font_size: settings.font_size_console,
|
||||
|
@ -256,13 +262,9 @@ pub fn setup(
|
|||
};
|
||||
|
||||
// Add Statistics HUD
|
||||
let version = &settings.version;
|
||||
let mut bundle_fps = TextBundle::from_sections([
|
||||
TextSection::new("", style.clone()),
|
||||
TextSection::new(format!(" OutFlyOS v{version} ☣"), style.clone()),
|
||||
TextSection::new("", style.clone()),
|
||||
TextSection::new("", style.clone()), // Speed
|
||||
TextSection::new("", style.clone()), // Target
|
||||
TextSection::new("", style), // Target
|
||||
TextSection::new("", style_fps), // Frames per second
|
||||
]).with_style(Style {
|
||||
position_type: PositionType::Absolute,
|
||||
top: Val::VMin(2.0),
|
||||
|
@ -756,11 +758,10 @@ fn update_hud(
|
|||
if settings.hud_active && q_camera_result.is_ok() {
|
||||
let (pos, _) = q_camera_result.unwrap();
|
||||
for mut text in &mut q_node_hud {
|
||||
text.sections[0].value = format!("2524-03-12 03:02");
|
||||
if let Some(fps) = diagnostics.get(&FrameTimeDiagnosticsPlugin::FPS) {
|
||||
if let Some(value) = fps.smoothed() {
|
||||
// Update the value of the second section
|
||||
text.sections[2].value = format!("{value:.0}");
|
||||
text.sections[1].value = format!("{value:.0}");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -797,10 +798,10 @@ fn update_hud(
|
|||
}
|
||||
|
||||
if target_multiple {
|
||||
text.sections[4].value = "\n\nERROR: MULTIPLE TARGETS".to_string();
|
||||
text.sections[0].value = "ERROR: MULTIPLE TARGETS\n\n".to_string();
|
||||
}
|
||||
else if target_error {
|
||||
text.sections[4].value = "\n\nERROR: FAILED TO AQUIRE TARGET".to_string();
|
||||
text.sections[0].value = "ERROR: FAILED TO AQUIRE TARGET\n\n".to_string();
|
||||
}
|
||||
else if let Ok((clickable, _, _)) = q_target.get_single() {
|
||||
let distance = if dist_scalar.is_nan() {
|
||||
|
@ -816,10 +817,10 @@ fn update_hud(
|
|||
} else {
|
||||
"".to_string()
|
||||
};
|
||||
text.sections[4].value = format!("\n\nTarget: {target_name}\n{pronoun}Distance: {distance}");
|
||||
text.sections[0].value = format!("Target: {target_name}\n{pronoun}Distance: {distance}\n\n");
|
||||
}
|
||||
else {
|
||||
text.sections[4].value = "".to_string();
|
||||
text.sections[0].value = "".to_string();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,6 +49,7 @@ pub struct Settings {
|
|||
pub zoom_fov: f32,
|
||||
pub zoom_sensitivity_factor: f32,
|
||||
pub font_size_hud: f32,
|
||||
pub font_size_fps: f32,
|
||||
pub font_size_conversations: f32,
|
||||
pub font_size_choices: f32,
|
||||
pub font_size_console: f32,
|
||||
|
@ -56,6 +57,7 @@ pub struct Settings {
|
|||
pub font_size_deathtext: f32,
|
||||
pub font_size_deathsubtext: f32,
|
||||
pub hud_color: Color,
|
||||
pub hud_color_fps: Color,
|
||||
pub hud_color_console: Color,
|
||||
pub hud_color_console_warn: Color,
|
||||
pub hud_color_console_system: Color,
|
||||
|
@ -160,6 +162,7 @@ impl Default for Settings {
|
|||
zoom_fov: 15.0,
|
||||
zoom_sensitivity_factor: 0.25,
|
||||
font_size_hud: 24.0,
|
||||
font_size_fps: 14.0,
|
||||
font_size_conversations: 32.0,
|
||||
font_size_choices: 28.0,
|
||||
font_size_console: 20.0,
|
||||
|
@ -167,6 +170,7 @@ impl Default for Settings {
|
|||
font_size_deathtext: 64.0,
|
||||
font_size_deathsubtext: 32.0,
|
||||
hud_color: Color::hex("#BE1251").unwrap(),
|
||||
hud_color_fps: Color::hex("#181818").unwrap(),
|
||||
hud_color_console: Color::hex("#BE1251").unwrap(),
|
||||
hud_color_console_warn: Color::hex("#CCCCCC").unwrap(),
|
||||
hud_color_console_system: Color::hex("#7F7F7F").unwrap(),
|
||||
|
|
Loading…
Reference in a new issue