use bevy::prelude::*; #[derive(Resource)] pub struct Settings { pub mute_sfx: bool, pub mute_music: bool, pub volume_sfx: u8, pub volume_music: u8, pub font_size_hud: f32, pub font_size_conversations: f32, pub key_togglehud: KeyCode, pub ar_active: bool, } impl Default for Settings { fn default() -> Self { Settings { mute_sfx: false, mute_music: false, volume_sfx: 100, volume_music: 100, font_size_hud: 32.0, font_size_conversations: 32.0, key_togglehud: KeyCode::Tab, ar_active: true, } } } impl Settings { pub fn reset(&mut self) { println!("Resetting settings!"); *self = Self::default(); } }