IModGlobalSettings
The root of a mod's global settings: the tabs, and operations across the whole tree.
public interface IModGlobalSettingsThe root of a mod's global settings: the tabs, and operations across the whole tree. Handed to IGearsModApi.OnGlobalSettingsLoaded; also IGearsMod.GlobalSettings.
Methods
GetTab(String)
IGlobalModSettingsTab GetTab(string name);Returns the IGlobalModSettingsTab named name, or null.
CreateTab(String)
IGlobalModSettingsTab CreateTab(string name);Creates a tab whose display key is its name. Throws ArgumentException if a tab with that name exists.
CreateTab(String, String)
IGlobalModSettingsTab CreateTab(string name, string displayNameKey);Creates a tab with the given name and display key. Throws ArgumentException on a duplicate name.
GetOrCreateTab(String)
IGlobalModSettingsTab GetOrCreateTab(string name);Returns the existing tab named name, or creates it with its name as display key.
GetOrCreateTab(String, String)
IGlobalModSettingsTab GetOrCreateTab(string name, string displayNameKey);Returns the existing tab named name, or creates it with the given display key.
GetTabs()
List<IGlobalModSettingsTab> GetTabs();Returns every tab as a List<IGlobalModSettingsTab>.
GetAllGlobalSettings()
List<IGlobalModSetting> GetAllGlobalSettings();Returns every setting in every category of every tab, categories included, as a List<IGlobalModSetting>.
BindSettingsClass(Type)
void BindSettingsClass(Type settingsType);Binds a settings class. A type is bound once; later calls for it do nothing.
SyncSettingsToClass(Type)
void SyncSettingsToClass(Type settingsType);Calls the opted-in value listeners on an already-bound class with the values their settings hold now.
SaveSettings()
void SaveSettings();Writes the player-level saved settings file now.