PokéRogue
    Preparing search index...

    Interface OptionSelectItem

    Configuration for an option in the menu

    interface OptionSelectItem {
        color?: TextStyle;
        handler: () => boolean;
        iconsConfig?: OptionSelectIconConfig[];
        keepOpen?: boolean;
        label: string;
        noSoundEffects?: boolean;
        onHover?: () => void;
        selectable?: boolean;
    }

    Hierarchy (View Summary)

    Index
    color?: TextStyle

    Optional TextStyle to give the item a custom color.

    TextStyle.WINDOW

    handler: () => boolean

    Handler called when that option is selected.

    Type Declaration

      • (): boolean
      • Returns boolean

        true to play the "success" sfx, false for the "error" sfx

    iconsConfig?: OptionSelectIconConfig[]

    Optional configuration to display icon(s) before the label's text.
    If multiple icons are given they will be overlayed.

    keepOpen?: boolean

    Whether to keep the menu open after this option was selected.

    label: string

    Text that will be shown in the menu for this option.
    Can only be on a single line, can use BBCode.

    noSoundEffects?: boolean

    Whether to prevent the default menu sound effects from playing.

    onHover?: () => void

    Optional handler for when the cursor is moved to that option.

    selectable?: boolean

    Whether to allow selecting the item

    true