Config Controller
Introduction
The Config Controller provides a great way of saving easily editable and viewable files. It is great for user preferences and server configurations.
Formatting
Here's an example of how config files are structured:
#This is a comment
key1: value1
#User settings example:
vsync: false
fullscreen: true
#Server configuration example:
max-players: 4
port: 7777
Methods
caution
In the next version Create Option List
will be marked as obselete and will be replaced by lists of KeyValuePair
.
Method | Description |
---|---|
GetSettingFromFile | Returns the value of a setting in the specified path. |
GetSetting | Returns the value of a setting from content. |
TryGettingSettingFromFile | Returns true if it manages to get the value of a setting in the specified path. |
TryGettingSetting | Returns true if it manages to get the value of a setting from content. |
SetSetting | Changes the value of a setting in content. |
SetSettingFromFile | Changes the value of a setting in the specified path. |
Repair | Creates a file according to the template. |
CreateOptionList | Creates a list of settings and values separated with ':'. |