Class UserSettings

java.lang.Object
com.deco2800.game.files.UserSettings

public class UserSettings
extends java.lang.Object
Reading, Writing, and applying user settings in the game.
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  UserSettings.DisplaySettings
    Stores chosen display settings.
    static class  UserSettings.Settings
    Stores game settings, can be serialised/deserialised.
  • Method Summary

    Modifier and Type Method Description
    static void applySettings​(UserSettings.Settings settings)
    Apply the given settings without storing them.
    static UserSettings.Settings get()
    Get the stored user settings
    static void set​(UserSettings.Settings settings, boolean applyImmediate)
    Set the stored user settings

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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