remove more redundancy (add "color scheme")

This commit is contained in:
yuni 2024-05-14 23:00:55 +02:00
parent ff610d4000
commit d1a906b487
2 changed files with 24 additions and 16 deletions

View file

@ -24,6 +24,14 @@ pub const FONT: &str = "fonts/Yupiter-Regular.ttf";
pub const EPSILON32: f32 = 1e-9;
pub const EPSILON: f64 = 1e-9;
pub const COLOR_BODY: &str = "#888888"; // For simple text
pub const COLOR_DIM: &str = "#666666"; // For darker, less important text
pub const COLOR_PRIMARY: &str = "#BE1251"; // The "branding" color
pub const COLOR_SECONDARY: &str = "#CCCCCC"; // For accents
pub const COLOR_SUCCESS: &str = "#F0D50C"; // For positive outcomes
pub const COLOR_DANGER: &str = "#CCCCCC"; // For critical situations
pub const COLOR_WARNING: &str = "#F0D50C"; // For warnings
#[inline]
pub fn bool2vis(boolean: bool) -> Visibility {
if boolean {

View file

@ -187,24 +187,24 @@ impl Default for Settings {
font_size_achievement_header: 32.0,
font_size_keybindings: 20.0,
font_size_version: 20.0,
hud_color: Color::hex("#BE1251").unwrap(),
hud_color: Color::hex(COLOR_PRIMARY).unwrap(),
hud_color_fps: Color::hex("#181818").unwrap(),
hud_color_console: Color::hex("#BE1251").unwrap(),
hud_color_console_achievement: Color::hex("#F0D50C").unwrap(),
hud_color_console_warn: Color::hex("#CCCCCC").unwrap(),
hud_color_console_system: Color::hex("#7F7F7F").unwrap(),
hud_color_alert: Color::hex("#CCCCCC").unwrap(),
hud_color_subtitles: Color::hex("#CCCCCC").unwrap(),
hud_color_choices: Color::hex("#727272").unwrap(),
hud_color_speedometer: Color::hex("#BE1251").unwrap(),
hud_color_console: Color::hex(COLOR_PRIMARY).unwrap(),
hud_color_console_achievement: Color::hex(COLOR_SUCCESS).unwrap(),
hud_color_console_warn: Color::hex(COLOR_WARNING).unwrap(),
hud_color_console_system: Color::hex(COLOR_SECONDARY).unwrap(),
hud_color_alert: Color::hex(COLOR_SECONDARY).unwrap(),
hud_color_subtitles: Color::hex(COLOR_SECONDARY).unwrap(),
hud_color_choices: Color::hex(COLOR_BODY).unwrap(),
hud_color_speedometer: Color::hex(COLOR_PRIMARY).unwrap(),
hud_color_deathpoem: Color::hex("#CC2200").unwrap(),
hud_color_achievement: Color::hex("#666666").unwrap(),
hud_color_achievement_accomplished: Color::hex("#F0D50C").unwrap(),
hud_color_achievement_header: Color::hex("#BE1251").unwrap(),
hud_color_death: Color::hex("#CCCCCC").unwrap(),
hud_color_death_achievements: Color::hex("#CCCCCC").unwrap(),
hud_color_keybindings: Color::hex("#666666").unwrap(),
hud_color_version: Color::hex("#BE1251").unwrap(),
hud_color_achievement: Color::hex(COLOR_DIM).unwrap(),
hud_color_achievement_accomplished: Color::hex(COLOR_SUCCESS).unwrap(),
hud_color_achievement_header: Color::hex(COLOR_PRIMARY).unwrap(),
hud_color_death: Color::hex(COLOR_SECONDARY).unwrap(),
hud_color_death_achievements: Color::hex(COLOR_SECONDARY).unwrap(),
hud_color_keybindings: Color::hex(COLOR_DIM).unwrap(),
hud_color_version: Color::hex(COLOR_PRIMARY).unwrap(),
chat_speed: DEFAULT_CHAT_SPEED * if dev_mode { 2.5 } else { 1.0 },
flashlight_active: false,
hud_active: true,