SettingsUI

ClubCrawler.DOMUserInterface. SettingsUI

Presents an expandable menu(s) for the user to change game settings. Creates a new instance of SettingsUI for each nested non-input nested object (category) inside the object which it models and creates inputs for each inputConfig object which it finds nested in its modeled object.

Constructor

new SettingsUI(element)

Source:
Parameters:
Name Type Description
element HTMLElement

The container element.

Members

children :Array

Source:

The child settingsUIs and InputComponents created

Type:
  • Array
Source:

The drop down button with the category title. When clicked, it will toggle showing of SettingsUI.inputContainer.

Type:
  • HTMLElement

element :HTMLElement

Source:

The container element.

Type:
  • HTMLElement

inputContainer :HTMLElement

Source:

The element containing the options, which will toggle visibility when DebugUI.dropDownElement is clicked.

Type:
  • HTMLElement

settingsObject :Object

Source:

The object whose properties to display as inputs and categories.

Type:
  • Object

uiManager :ClubCrawler.UserInterface.DOMUIManager

Source:

The ui manager

Type:
  • ClubCrawler.UserInterface.DOMUIManager

Methods

addDropDownListener()

Source:

Adds a click listener to SettingsUI.dropDownElement

loadManager(uiManager)

Source:

load the UI manager into this and all children objects

Parameters:
Name Type Description
uiManager ClubCrawler.DOMUserInterface.DOMUIManager

The manager

loadSettingsObject(settingsObject, nameopt)

Source:

Creates an input component for each settings in the settings object. Creates a new SettingsUI for each non input (category) in the settings object.

Parameters:
Name Type Attributes Default Description
settingsObject Object

The object to load and create interfaces for.

name string <optional>
"settings"

The name for the drop down button.