Table of Contents

Fluent Builder gives the ability to create Settings at runtime.
This can be useful for mod specific sections that should not be displayed if the mod is not loaded.

MCM provides the builder interface ISettingsBuilder and a default implementation @"MCM.Abstractions.FluentBuilder.Implementation.DefaultSettingsBuilder?text=DefaultSettingsBuilder".

Any property is set by a Set%PropertyName% method.

CreateGroup creates a property group where you can define your properties. The default Group name is 'Misc'. Use teh action delegate to configure the property group.

AddBool creates a Bool property.
AddInteger creates an Integer Slider property.
AddFloatingInteger creates an Float Slider property.
AddText creates an Textbox property.
AddDropdown creates a Dropdown property.
AddCustom can add a custom property. The custom property should implement one of the interfaces defined in @"MCM.Abstractions.Settings.Definitions" namespace. Currently there is no way of defining a custom UI Control. One of the possible fixes would be to use UIExtender library.

BuildAsGlobal returns a Global setting instance. Use Register and Unregister for MCM to use it.
BuildAsPerCharacter returns a PerCharacter setting instance. Use Register and Unregister for MCM to use it. The registered settings will be cleared before and after player joins the campaign, so do the register thing when the campaign was already joined in.


This page was last modified at 10/16/2020 14:06:34 +03:00 (UTC).

Commit Message
Author:    aragas
Commit:    64b2ab1aaf1252d94c61b9754e41af517991ea47
Started work on documentation articles