move some of var's constants into common

This commit is contained in:
yuni 2024-05-13 00:59:43 +02:00
parent 7f3770cf49
commit 2d42edb69c
3 changed files with 5 additions and 5 deletions

View file

@ -14,6 +14,9 @@ use bevy::prelude::*;
pub use bevy::math::{DVec3, DQuat}; pub use bevy::math::{DVec3, DQuat};
pub const WINDOW_TITLE: &str = "OutFly";
pub const FONT: &str = "fonts/Yupiter-Regular.ttf";
pub use std::f32::consts::PI as PI32; pub use std::f32::consts::PI as PI32;
pub use std::f64::consts::PI; pub use std::f64::consts::PI;
pub const EPSILON32: f32 = 1e-9; pub const EPSILON32: f32 = 1e-9;

View file

@ -31,7 +31,7 @@ pub mod prelude {
pub use crate::{actor, audio, camera, chat, cmd, common, game, hud, pub use crate::{actor, audio, camera, chat, cmd, common, game, hud,
load, menu, nature, var, visual, world}; load, menu, nature, var, visual, world};
pub use crate::common::*; pub use crate::common::*;
pub use crate::var::{FONT, Settings}; pub use crate::var::Settings;
pub use crate::load::load_asset; pub use crate::load::load_asset;
} }
@ -161,7 +161,7 @@ fn setup(
window.cursor.grab_mode = CursorGrabMode::Locked; window.cursor.grab_mode = CursorGrabMode::Locked;
window.cursor.visible = false; window.cursor.visible = false;
window.mode = opt.window_mode_initial; window.mode = opt.window_mode_initial;
window.title = var::WINDOW_TITLE.to_string(); window.title = common::WINDOW_TITLE.to_string();
} }
} }

View file

@ -19,9 +19,6 @@ use toml_edit::DocumentMut;
use std::env; use std::env;
use std::fs; use std::fs;
pub const WINDOW_TITLE: &str = "OutFly";
pub const FONT: &str = "fonts/Yupiter-Regular.ttf";
pub const SCOPE_SEPARATOR: &str = "$"; pub const SCOPE_SEPARATOR: &str = "$";
pub const TOKEN_EQUALS: &str = "=="; pub const TOKEN_EQUALS: &str = "==";