NumberMetaField
class
NumberMetaField
extends
MetaField
any
number
Represents a number stored in a meta file.
Constructors
constructor
Parameters
-
name : stringThe name of this field displayed in the editor.
-
initial : numberThe initial value of this field.
MetaField.constructor
Properties
description
public
description
:
string
=
''
MetaField.description
initial
readonly
public
initial
:
number
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
spacing
public
spacing
:
boolean
=
false
MetaField.spacing
type
readonly
public
type
:
NumberConstructor
=
Number
The type of this field used by the editor to display the correct input.
Events
onChanged
public
get
onChanged
():
SubscribableValueEvent
TValue
Triggered when the data of this field changes.
Inherited from
MetaField.onChanged
onDisabled
public
get
onDisabled
():
SubscribableValueEvent
boolean
Triggered when the field becomes disabled or enabled.
Inherited from
MetaField.onDisabled
Methods
clone
public
clone
():
NumberMetaField
Create a clone of this field.
Inherited from
MetaField.clone
describe
public
describe
description
:
string
:
NumberMetaField
Set the description of this field.
Parameters
-
description : stringThe description.
MetaField.describe
disable
public
disable
value
:
boolean
=
true
:
NumberMetaField
Disable or enable the field in the editor.
Parameters
-
value : boolean = trueWhether the field should be disabled.
MetaField.disable
get
public
get
():
number
Get the current value.
Inherited from
MetaField.get
getMax
public
getMax
():
number
getMin
public
getMin
():
number
getPresets
public
getPresets
():
MetaOption
number
[]
parse
public
override
parse
value
:
any
:
number
Convert a serialized value into a runtime type.
Parameters
-
value : anyThe serialized value.
MetaField.parse
serialize
public
serialize
():
any
Serialize the value of this field.
Inherited from
MetaField.serialize
set
public
set
value
:
any
:
void
Set the current value.
Parameters
-
value : anyThe new value.
MetaField.set
setPresets
public
setPresets
options
:
MetaOption
number
[]
:
NumberMetaField
Parameters
-
options : MetaOption number []
setRange
Parameters
space
public
space
value
:
boolean
=
true
:
NumberMetaField
Add or remove spacing at the beginning of this field.
Parameters
-
value : boolean = trueWhether to include the spacing.
MetaField.space