pub struct GameConfig {Show 17 fields
pub difficulty_preset: DifficultyPreset,
pub difficulty_params: DifficultyParams,
pub target_fps: u32,
pub fullscreen: bool,
pub vsync: bool,
pub master_volume: f32,
pub music_volume: f32,
pub sfx_volume: f32,
pub voice_volume: f32,
pub show_fps: bool,
pub show_damage_numbers: bool,
pub screen_shake: bool,
pub colorblind_mode: bool,
pub high_contrast: bool,
pub reduce_motion: bool,
pub large_text: bool,
pub subtitles: bool,
}Fields§
§difficulty_preset: DifficultyPreset§difficulty_params: DifficultyParams§target_fps: u32§fullscreen: bool§vsync: bool§master_volume: f32§music_volume: f32§sfx_volume: f32§voice_volume: f32§show_fps: bool§show_damage_numbers: bool§screen_shake: bool§colorblind_mode: bool§high_contrast: bool§reduce_motion: bool§large_text: bool§subtitles: boolImplementations§
Source§impl GameConfig
impl GameConfig
pub fn set_difficulty(&mut self, preset: DifficultyPreset)
pub fn effective_volume(&self, channel: VolumeChannel) -> f32
Trait Implementations§
Source§impl Clone for GameConfig
impl Clone for GameConfig
Source§fn clone(&self) -> GameConfig
fn clone(&self) -> GameConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GameConfig
impl Debug for GameConfig
Auto Trait Implementations§
impl Freeze for GameConfig
impl RefUnwindSafe for GameConfig
impl Send for GameConfig
impl Sync for GameConfig
impl Unpin for GameConfig
impl UnsafeUnpin for GameConfig
impl UnwindSafe for GameConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.