From 2d42edb69cd2a9b2c96e764395858f991d17717f Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 13 May 2024 00:59:43 +0200 Subject: [PATCH] move some of var's constants into common --- src/common.rs | 3 +++ src/main.rs | 4 ++-- src/var.rs | 3 --- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common.rs b/src/common.rs index 3e44f06..bedcec5 100644 --- a/src/common.rs +++ b/src/common.rs @@ -14,6 +14,9 @@ use bevy::prelude::*; 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::f64::consts::PI; pub const EPSILON32: f32 = 1e-9; diff --git a/src/main.rs b/src/main.rs index 771b7b8..9814762 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,7 +31,7 @@ pub mod prelude { pub use crate::{actor, audio, camera, chat, cmd, common, game, hud, load, menu, nature, var, visual, world}; pub use crate::common::*; - pub use crate::var::{FONT, Settings}; + pub use crate::var::Settings; pub use crate::load::load_asset; } @@ -161,7 +161,7 @@ fn setup( window.cursor.grab_mode = CursorGrabMode::Locked; window.cursor.visible = false; window.mode = opt.window_mode_initial; - window.title = var::WINDOW_TITLE.to_string(); + window.title = common::WINDOW_TITLE.to_string(); } } diff --git a/src/var.rs b/src/var.rs index 84bf353..f909207 100644 --- a/src/var.rs +++ b/src/var.rs @@ -19,9 +19,6 @@ use toml_edit::DocumentMut; use std::env; use std::fs; -pub const WINDOW_TITLE: &str = "OutFly"; -pub const FONT: &str = "fonts/Yupiter-Regular.ttf"; - pub const SCOPE_SEPARATOR: &str = "$"; pub const TOKEN_EQUALS: &str = "==";