User Tools

Site Tools


docs:options

The Global Options menu allows the player to make some choices about controls and accessibility options before and during gameplay.

Class References

GlobalOptions

Constants

  • THEME_NODES
    • List of node types that apply_options() will apply color and font settings to
  • DEFAULTS
    • Default values for various options takes the following format:
      {
        "font": {"type": 0, "size": 32, "color": "#ffffff"},
        "movement": {"ui_up": KEY_W, "ui_left": KEY_A, "ui_down": KEY_S, "ui_right": KEY_D},
        "audio": {"volume": 0}
      }
  • FONTS
    • Array of font resources to use in the list
  • FONT_SIZE_RANGE
    • Number of pts by which the user selected font size may deviate from the default font size

Properties

  • options
    • Contains ConfigFile object that options file is loaded into
  • global_theme
    • Contains a reference to the menu theme Resource
  • hotkeys_vboxcontainer
    • Contains a reference to the hotkeys VBoxContainer in the UI

Methods

  • set_section(section: String, dict) → void
    • Set a section of the internal options value variable
  • get_section(section: String) → Dictionary
    • Get a section of the internal options value variable
  • set_key_value(section, key, value) → void
    • Set a value in the internal options value variable
  • get_key_value(section, key)
    • Get a value in the internal options value variable
  • back() → void
    • Saved options and returns to Main Menu scene
  • reset() → void
    • Resets all options to defaults
  • load_file() → void
    • Load from the user stored options file, or fallback to our default
  • load_options() → void
    • Copy values from `options` to internal variables
  • save_options() → void
    • Copy values from internal variables to options
  • apply_options() → void
    • Update the scene's theme and force update the controls. Note only controls listed in THEME_NODES will be updated.
  • init_control() → void
    • Initialize hotkeys_vboxcontainer with movement values
  • show_options() → void
    • Show the options on the options page as selected

AudioButton

Properties

  • bus_idx
    • A reference to Godot's AudioServer's Master bus index

Methods

  • reset() → void
    • Sets the Master bus volume to 0
  • get_value() → float
    • Returns the current volume level
  • init(volume_db) → void
    • Sets the Master bus volume to volume_db and sets the UI to match
docs/options.txt · Last modified: 2021/02/16 23:35 by 89.45.224.37