abstract SongEventSchema(SongEventSchemaRaw)
package funkin.data.event
Available on all platforms
Static methods
staticinlinearrayWrite(this:SongEventSchemaRaw, k:Int, v:SongEventSchemaField):SongEventSchemaField
Write a field to the schema by numeric index.
Parameters:
k | The index of the field to write. |
|---|---|
v | The new field value to write. |
Returns:
The assigned value.
staticinlineget(this:SongEventSchemaRaw, key:Int):Null<SongEventSchemaField>
Retrieve a field from the schema by numeric index.
Parameters:
key | The index of the field to retrieve. |
|---|
Returns:
The retrieved field.
staticgetByName(this:SongEventSchemaRaw, name:String):Null<SongEventSchemaField>
Retrieve a SongEventSchemaField by name. This works even if the field is inside a Frame.
You can use array access to call this function; schema["field_name"]
Parameters:
name | The name of the field to retreive. |
|---|
Returns:
The retrieved field, or null if not found.
staticgetDefaultFieldValue(this:SongEventSchemaRaw, name:String):Null<Dynamic>
For a given song event field, retrieve its default value.
Parameters:
name | The name of the field to retrieve. |
|---|
Returns:
The default value of the field, or null if not found.
staticgetFirstField(this:SongEventSchemaRaw):Null<SongEventSchemaField>
Retrieve the first field in the schema.
Returns:
The first field.
statichasField(this:SongEventSchemaRaw, name:String):Bool
Return whether the field with the given name exists.
Parameters:
name | The name of the field to check. |
|---|
Returns:
Whether the field exists.
staticlistAllFieldNames(this:SongEventSchemaRaw):Array<String>
Get a list of all the field names in the schema, so they can be iterated over and retrieved.
Returns:
The list of field names.
staticstringifyFieldValue(this:SongEventSchemaRaw, name:String, value:Dynamic, addUnits:Bool = true):String
For a given song event field, convert the value into a string. This is particularly useful for ENUM fields.
Parameters:
name | The name of the field to display. |
|---|---|
value | The value of the field to convert. |
addUnits | Whether to add the units specified by the schema to the resulting string. |
Returns:
The resulting string.