Abstract class for handling UI elements related to settings.

Hierarchy (view full)

Constructors

Properties

active: boolean = false
cursor: number = 0
localStorageKey: string
mode: null | number
navigationIcons: InputsIcons
rowsToDisplay: number
scene: default
settings: Setting[]
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.

    • Optionalsave: 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.