Skip to main content

StringMetaField

                            
                              
                                class 
                                StringMetaField
                                
                                  
                                    
                                      T
                                       extends 
                                      string
                                       = 
                                      string
                                    
                                  
                                
                                extends 
                                
                                  
                                    
                                      MetaField
                                      
                                        
                                          
                                            T
                                          
                                        
                                      
                                    
                                  
                                
                              
                              

Represents a string stored in a meta file.

Type Parameters

  • T extends string = string

Constructors

constructor

                            
                              
                                public 
                                new
                                StringMetaField
                                
                                  
                                    
                                      T
                                       extends 
                                      string
                                       = 
                                      string
                                    
                                  
                                
                                
                                  
                                    
                                      name
                                      : 
                                      string
                                    
                                    
                                      initial
                                      : 
                                      T
                                    
                                  
                                
                                : 
                                StringMetaField
                                
                                  
                                    
                                      T
                                    
                                  
                                
                              
                              

Type Parameters

  • T extends string = string

Parameters

  • name : string

    The name of this field displayed in the editor.

  • initial : T

    The initial value of this field.

Inherited from 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

spacing

                            
                              
                                public 
                                spacing
                                : 
                                boolean
                                 = 
                                false
                              
                              
Inherited from MetaField.spacing

type

                            
                              
                                readonly 
                                public 
                                type
                                : 
                                StringConstructor
                                 = 
                                String
                              
                              

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
                                (): 
                                StringMetaField
                                
                                  
                                    
                                      T
                                    
                                  
                                
                              
                              

Create a clone of this field.

Inherited from MetaField.clone

describe

                            
                              
                                public 
                                describe
                                
                                  
                                    
                                      description
                                      : 
                                      string
                                    
                                  
                                
                                : 
                                StringMetaField
                                
                                  
                                    
                                      T
                                    
                                  
                                
                              
                              

Set the description of this field.

Parameters

Inherited from MetaField.describe

disable

                            
                              
                                public 
                                disable
                                
                                  
                                    
                                      value
                                      : 
                                      boolean
                                       = 
                                      true
                                    
                                  
                                
                                : 
                                StringMetaField
                                
                                  
                                    
                                      T
                                    
                                  
                                
                              
                              

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

getPresets

                            
                              
                                public 
                                getPresets
                                (): 
                                MetaOption
                                
                                  
                                    
                                      T
                                    
                                  
                                
                                []
                              
                              

parse

                            
                              
                                public 
                                parse
                                
                                  
                                    
                                      value
                                      : 
                                      T
                                    
                                  
                                
                                : 
                                T
                              
                              

Convert a serialized value into a runtime type.

Parameters

  • value : T

    The serialized value.

Inherited from MetaField.parse

serialize

                            
                              
                                public 
                                serialize
                                (): 
                                T
                              
                              

Serialize the value of this field.

Inherited from MetaField.serialize

set

                            
                              
                                public 
                                set
                                
                                  
                                    
                                      value
                                      : 
                                      T
                                    
                                  
                                
                                : 
                                void
                              
                              

Set the current value.

Parameters

  • value : T

    The new value.

Inherited from MetaField.set

setPresets

                            
                              
                                public 
                                setPresets
                                
                                  
                                    
                                      options
                                      : 
                                      MetaOption
                                      
                                        
                                          
                                            T
                                          
                                        
                                      
                                      []
                                    
                                  
                                
                                : 
                                StringMetaField
                                
                                  
                                    
                                      T
                                    
                                  
                                
                              
                              

Parameters


space

                            
                              
                                public 
                                space
                                
                                  
                                    
                                      value
                                      : 
                                      boolean
                                       = 
                                      true
                                    
                                  
                                
                                : 
                                StringMetaField
                                
                                  
                                    
                                      T
                                    
                                  
                                
                              
                              

Add or remove spacing at the beginning of this field.

Parameters

  • value : boolean = true

    Whether to include the spacing.

Inherited from MetaField.space