PokéRogue
    Preparing search index...

    Generic handler for a menu with several options to choose from with a cursor.

    Given the proper OptionSelectModeConfig the handler will:

    • Measure the size of all elements in the menu, including the size of any icon.
    • Apply the required BBCode if an elements asks for a specific color.
    • Create the window of the appropriate size to hold all elements.
    • Handle scrolling through the menu items, resizing as needed.
    • Handle selecting the menu items, or cancelling out of the menu.

    At initialization the size of the first NUM_PRE_COMPUTED_OPTIONS is measured.
    Then the window's size is updated as needed when a non initialized option needs to be displayed.

    Hierarchy (View Summary)

    Index
    active: boolean = false
    awaitingActionInput: boolean
    bgmBar: BgmBar
    blockInput: boolean
    communityConfig: OptionSelectModeConfig
    cursor: number = 0
    cursorObj: Image | null
    dialogueMessageBox: NineSlice

    Message box used by the dialogue test option

    excludedMenus: () => ConditionalMenu[]
    fullyInitialized: boolean
    manageDataConfig: OptionSelectModeConfig
    menuContainer: Container
    menuMessageBox: NineSlice
    menuMessageBoxContainer: Container
    menuOverlay: Rectangle
    message: Text
    mode: UiMode

    Used to set the name of optionSelectContainer

    onActionInput: AnyFn<any> | null
    optionSelectBg: NineSlice
    optionSelectContainer: Container
    optionSelectIcons: Sprite[] = []
    optionSelectText: BBCodeText
    pendingPrompt: boolean = false
    prompt: Sprite
    scale: number = 0.1666666667
    scrollBar: ScrollBar | null
    scrollCursor: number = 0
    textCallbackTimer: TimerEvent | null
    textPadding: 8
    textTimer: TimerEvent | null
    tutorialActive: boolean = false
    tutorialOverlay: Rectangle
    • Parameters

      • text: string
      • Optional_name: string
      • Optionaldelay: number | null
      • Optionalcallback: (() => void) | null
      • OptionalcallbackDelay: number | null
      • Optionalprompt: boolean | null
      • OptionalpromptDelay: number | null

      Returns void

    • Parameters

      • text: string
      • Optionaldelay: number
      • Optionalcallback: () => void
      • OptionalcallbackDelay: number
      • Optionalprompt: boolean
      • OptionalpromptDelay: number

      Returns void

    • Toggles the visibility of the dialogue box used for testing text/translations.

      Parameters

      • show: boolean

        Whether to show the dialogue box

      Returns void

      In "dialog test mode", the window takes the whole width of the screen and the text
      is set up to wrap around the same way as the dialogue during the game