Class UserSettings
java.lang.Object
com.csse3200.game.components.settingsmenu.UserSettings
Reading, Writing, and applying user settings in the game.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Stores chosen display settings.static class
Stores game settings, can be serialised/deserialised. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
applyDisplayMode
(UserSettings.Settings settings) static void
applySettings
(UserSettings.Settings settings) Apply the given settings without storing them.static UserSettings.Settings
get()
Get the stored user settingsstatic void
Mutes the audio globally, storing the current volume settings and setting them to 0.static void
set
(UserSettings.Settings settings, boolean applyImmediate) Set the stored user settingsstatic void
Toggles between mute and unmute.static void
Unmutes the audio globally, restoring the last saved volume levels.
-
Method Details
-
get
Get the stored user settings- Returns:
- Copy of the current settings
-
muteAudio
public static void muteAudio()Mutes the audio globally, storing the current volume settings and setting them to 0. -
unmuteAudio
public static void unmuteAudio()Unmutes the audio globally, restoring the last saved volume levels. -
toggleMute
public static void toggleMute()Toggles between mute and unmute.
-