Show / Hide Table of Contents

Class ModSettings

Provides a read-only access to mod settings.

Inheritance
Object
ModSettings
Namespace: DaggerfallWorkshop.Game.Utility.ModSupport.ModSettings
Assembly: Assembly-CSharp.dll
Syntax
public class ModSettings

Methods

| Improve this Doc View Source

Deserialize<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.

| Improve this Doc View Source

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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>
| Improve this Doc View Source

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>
| Improve this Doc View Source

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.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX