LogoPixi’VN
indexFunctions

Function: newChoiceOption()

> newChoiceOption<T>(text, label, props, options?): ChoiceOptionInterface

Defined in: src/narration/classes/ChoiceMenuOption.ts:29

Function to create a new choice menu option.

Type Parameters

T

T extends StorageObjectType

Parameters

text

string | string[]

The text displayed in the choice menu.

label

string | Label<T> | LabelAbstract<any, T, number>

The label to call when the player selects the option.

props

T

The properties passed to the label. If the label does not require parameters, pass an empty object {}.

options?

ChoiceMenuOptionOptions

An object with the choice's options

Returns

ChoiceOptionInterface

Example

newChoiceOption("Hello", HelloLabel, {})

On this page