Abstract class for handling UI elements related to settings.

Hierarchy (view full)

Constructors

Properties

active: boolean = false
awaitingActionInput: boolean
cursor: number = 0
localStorageKey: string
message: Text
mode: null | number
navigationIcons: InputsIcons
onActionInput: null | Function
pendingPrompt: boolean
prompt: Sprite
rowsToDisplay: number
scene: default
settings: Setting[]
textCallbackTimer: null | TimerEvent
textTimer: null | TimerEvent
title: string
tutorialActive: boolean = false
tutorialOverlay: Rectangle

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 or -1 to change the current 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.

  • Parameters

    • text: string
    • Optionalname: string
    • Optionaldelay: null | number
    • Optionalcallback: null | Function
    • OptionalcallbackDelay: null | number
    • Optionalprompt: null | boolean
    • OptionalpromptDelay: null | number

    Returns void