Skip to main content

EnumMetaField

class EnumMetaFieldT extends MetaFieldT

Represents an enum value stored in a meta file.

Type Parameters

Constructors​

constructor​

public override new EnumMetaFieldTname: stringoptions: MetaOptionT[]initial: T = ...: EnumMetaFieldT

Type Parameters

Parameters

Overwrites MetaField.constructor

Properties​

description​

public description: string = ''
Inherited from MetaField.description

initial​

readonly public initial: T

The initial value of this field.

Inherited from MetaField.initial

name​

readonly public name: string

The name of this field displayed in the editor.

Inherited from MetaField.name

options​

readonly public options: MetaOptionT[]

spacing​

public spacing: boolean = false
Inherited from MetaField.spacing

type​

readonly public type: symbol = EnumMetaField.symbol

The type of this field used by the editor to display the correct input.


symbol​

static readonly public symbol: typeof symbol = ...

Events​

onChanged​

public get onChanged(): SubscribableValueEventTValue

Triggered when the data of this field changes.

Inherited from MetaField.onChanged

onDisabled​

public get onDisabled(): SubscribableValueEventboolean

Triggered when the field becomes disabled or enabled.

Inherited from MetaField.onDisabled

Methods​

clone​

public clone(): EnumMetaFieldT

Create a clone of this field.

Inherited from MetaField.clone

describe​

public describedescription: string: EnumMetaFieldT

Set the description of this field.

Parameters

Inherited from MetaField.describe

disable​

public disablevalue: boolean = true: EnumMetaFieldT

Disable or enable the field in the editor.

Parameters

  • value: boolean = true

    Whether the field should be disabled.

Inherited from MetaField.disable

get​

public get(): T

Get the current value.

Inherited from MetaField.get

getOption​

public getOptionvalue: T: MetaOptionT

Parameters


parse​

public override parsevalue: T: T

Convert a serialized value into a runtime type.

Parameters

Overwrites MetaField.parse

serialize​

public serialize(): T

Serialize the value of this field.

Inherited from MetaField.serialize

set​

public override setvalue: T: void

Set the current value.

Parameters

Overwrites MetaField.set

space​

public spacevalue: boolean = true: EnumMetaFieldT

Add or remove spacing at the beginning of this field.

Parameters

  • value: boolean = true

    Whether to include the spacing.

Inherited from MetaField.space