show the game version in the HUD
This commit is contained in:
parent
5d89043ef2
commit
f169ceac8f
|
@ -204,9 +204,10 @@ fn setup(
|
|||
};
|
||||
|
||||
// Add Statistics HUD
|
||||
let version = &settings.version;
|
||||
let mut bundle_fps = TextBundle::from_sections([
|
||||
TextSection::new("", style.clone()),
|
||||
TextSection::new(" ⚡ ", style.clone()),
|
||||
TextSection::new(format!(" OutFlyOS v{version} ⚡ "), style.clone()),
|
||||
TextSection::new("", style.clone()),
|
||||
TextSection::new(" ☣ ", style.clone()),
|
||||
TextSection::new("", style.clone()),
|
||||
|
|
|
@ -18,6 +18,7 @@ pub const DEFAULT_CHAT_SPEED: f32 = 10.0;
|
|||
pub struct Settings {
|
||||
pub dev_mode: bool,
|
||||
pub god_mode: bool,
|
||||
pub version: String,
|
||||
pub mute_sfx: bool,
|
||||
pub mute_music: bool,
|
||||
pub volume_sfx: u8,
|
||||
|
@ -110,10 +111,16 @@ impl Default for Settings {
|
|||
default_mute_music = false;
|
||||
dev_mode = false;
|
||||
}
|
||||
let version = if let Some(version) = option_env!("CARGO_PKG_VERSION") {
|
||||
version.to_string()
|
||||
} else {
|
||||
"13.37".to_string()
|
||||
};
|
||||
|
||||
Settings {
|
||||
dev_mode,
|
||||
god_mode: false,
|
||||
version,
|
||||
mute_sfx: default_mute_sfx,
|
||||
mute_music: default_mute_music,
|
||||
volume_sfx: 100,
|
||||
|
|
Loading…
Reference in a new issue