Abstract class for handling UI elements related to settings.

Hierarchy (view full)

Constructors

Properties

active: boolean = false
cursor: number = 0
cursorObj: NineSlice
localStorageKey: string
mode: number
navigationContainer: default
navigationIcons: InputsIcons
optionCursors: number[]
optionValueLabels: Text[][]
optionsBg: NineSlice
optionsContainer: Container
reloadRequired: boolean
reloadSettings: Setting[]
rowsToDisplay: number
scene: default
scrollCursor: number
settingLabels: Text[]
settings: Setting[]
settingsContainer: Container
title: string

Methods

  • Processes input from a specified button. This method handles navigation through a UI menu, including movement through menu items and handling special actions like cancellation. Each button press may adjust the cursor position or the menu scroll, and plays a sound effect if the action was successful.

    Parameters

    • button: Button

      The button pressed by the user.

    Returns boolean

    true if the action associated with the button was successfully processed, false otherwise.

  • Set the option cursor to the specified position.

    Parameters

    • settingIndex: number

      The index of the setting.

    • cursor: number

      The cursor position to set.

    • Optional save: boolean

      Whether to save the setting to local storage.

    Returns boolean

    true if the option cursor was set successfully.

  • Set the scroll cursor to the specified position.

    Parameters

    • scrollCursor: number

      The scroll cursor position to set.

    Returns boolean

    true if the scroll cursor was set successfully.