tweak default values for preferences
This commit is contained in:
parent
4af88bab15
commit
b5105ff4c5
|
@ -467,7 +467,9 @@ pub struct Preferences {
|
||||||
pub third_person: bool,
|
pub third_person: bool,
|
||||||
pub shadows_sun: bool,
|
pub shadows_sun: bool,
|
||||||
pub avatar: usize,
|
pub avatar: usize,
|
||||||
|
#[serde(default = "Preferences::default_light_amp")]
|
||||||
pub light_amp: usize, // 0-3
|
pub light_amp: usize, // 0-3
|
||||||
|
#[serde(default = "Preferences::default_flashlight_power")]
|
||||||
pub flashlight_power: usize, // 0-2
|
pub flashlight_power: usize, // 0-2
|
||||||
pub thruster_boost: usize, // 0-2
|
pub thruster_boost: usize, // 0-2
|
||||||
|
|
||||||
|
@ -476,6 +478,13 @@ pub struct Preferences {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Preferences {
|
impl Preferences {
|
||||||
|
pub fn default_light_amp() -> usize {
|
||||||
|
1
|
||||||
|
}
|
||||||
|
pub fn default_flashlight_power() -> usize {
|
||||||
|
2
|
||||||
|
}
|
||||||
|
|
||||||
pub fn get_fullscreen_mode(&self) -> WindowMode {
|
pub fn get_fullscreen_mode(&self) -> WindowMode {
|
||||||
match self.fullscreen_mode.as_str() {
|
match self.fullscreen_mode.as_str() {
|
||||||
"legacy" => WindowMode::Fullscreen,
|
"legacy" => WindowMode::Fullscreen,
|
||||||
|
|
Loading…
Reference in a new issue