Class UserSettings

java.lang.Object
com.csse3200.game.components.settingsmenu.UserSettings

public class UserSettings extends Object
Reading, Writing, and applying user settings in the game.
  • Method Details

    • get

      public static UserSettings.Settings get()
      Get the stored user settings
      Returns:
      Copy of the current settings
    • set

      public static void set(UserSettings.Settings settings, boolean applyImmediate)
      Set the stored user settings
      Parameters:
      settings - New settings to store
      applyImmediate - true to immediately apply new settings.
    • applySettings

      public static void applySettings(UserSettings.Settings settings)
      Apply the given settings without storing them.
      Parameters:
      settings - Settings to apply
    • applyDisplayMode

      public static void applyDisplayMode(UserSettings.Settings 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.