The Config Class

The Config class can load data from and save data to a config file.

Config files usually contain data to configure the parameters and initial settings for your app.

The Config class can also be used for serialisation.

Serialization is the process of translating data structures or object state into a format that the Config class can load or save.

An example of a config file structure:

Alpha=.8
Blue=80
Count=12
Green=160
Height=32
Name=Jack
Red=255
ScaleX=8
ScaleY=8
Width=32

The code to fetch the data:

Local c:=New Config( "asset::settings.ini" )

Print "Alpha="+c.ReadFloat( "Alpha" ) Print "Height="+c.ReadInt( "Height" ) Print "Name="+c.ReadString( "Name" )

Ordering and fetching the data in alphabetical order benefits performance considerably!

Example(s) can be found in the bananas folder!