Class ModSettings
Provides a read-only access to mod settings.
Namespace: DaggerfallWorkshop.Game.Utility.ModSupport.ModSettings
Assembly: Assembly-CSharp.dll
Syntax
public class ModSettings
Methods
| Improve this Doc View SourceDeserialize<T>(String, ref T, Boolean)
Deserialize a section of settings in a class.
Declaration
public void Deserialize<T>(string sectionName, ref T instance, bool includeProperties = false)
where T : class
Parameters
Type | Name | Description |
---|---|---|
String | sectionName | Name of section. |
T | instance | Instance of class with keys as public fields or properties. |
Boolean | includeProperties |
Type Parameters
Name | Description |
---|---|
T | Type of class. |
GetBool(String, String)
Get bool from user settings or, as fallback, from default settings.
Declaration
public bool GetBool(string section, string name)
Parameters
Type | Name | Description |
---|---|---|
String | section | Name of section. |
String | name | Name of key. |
Returns
Type | Description |
---|---|
Boolean |
GetColor(String, String)
Get color from user settings or, as fallback, from default settings.
Declaration
public Color32 GetColor(string section, string name)
Parameters
Type | Name | Description |
---|---|---|
String | section | Name of section. |
String | name | Name of key. |
Returns
Type | Description |
---|---|
Color32 |
GetFloat(String, String)
Get float from user settings or, as fallback, from default settings.
Declaration
public float GetFloat(string section, string name)
Parameters
Type | Name | Description |
---|---|---|
String | section | Name of section. |
String | name | Name of key. |
Returns
Type | Description |
---|---|
Single |
GetInt(String, String)
Get integer from user settings or, as fallback, from default settings.
Declaration
public int GetInt(string section, string name)
Parameters
Type | Name | Description |
---|---|---|
String | section | Name of section. |
String | name | Name of key. |
Returns
Type | Description |
---|---|
Int32 |
GetString(String, String)
Get string from user settings or, as fallback, from default settings.
Declaration
public string GetString(string section, string name)
Parameters
Type | Name | Description |
---|---|---|
String | section | Name of section. |
String | name | Name of key. |
Returns
Type | Description |
---|---|
String |
GetTupleFloat(String, String)
Get Tuple from user settings or, as fallback, from default settings.
Declaration
public Tuple<float, float> GetTupleFloat(string section, string name)
Parameters
Type | Name | Description |
---|---|---|
String | section | Name of section. |
String | name | Name of key. |
Returns
Type | Description |
---|---|
Tuple<Single, Single> |
GetTupleInt(String, String)
Get Tuple from user settings or, as fallback, from default settings.
Declaration
public Tuple<int, int> GetTupleInt(string section, string name)
Parameters
Type | Name | Description |
---|---|---|
String | section | Name of section. |
String | name | Name of key. |
Returns
Type | Description |
---|---|
Tuple<Int32, Int32> |
GetValue<T>(String, String)
Get a value from user settings or, as fallback, from default settings.
Declaration
public T GetValue<T>(string sectionName, string keyName)
Parameters
Type | Name | Description |
---|---|---|
String | sectionName | Name of section. |
String | keyName | Name of key. |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T | Type of value. |