Interface ISettingsPropertyGroupBuilder
- Namespace
- MCM.Abstractions.FluentBuilder
- Assembly
- MCMv5.dll
An interface that defines the necessary members for implementing a settings property group builder.
public interface ISettingsPropertyGroupBuilder
Properties
Properties
The actual properties stored in the builder.
Dictionary<string, ISettingsPropertyBuilder> Properties { get; }
Property Value
Methods
AddBool(string, string, IRef, Action<ISettingsPropertyBoolBuilder>?)
Creates a Bool property.
ISettingsPropertyGroupBuilder AddBool(string id, string name, IRef @ref, Action<ISettingsPropertyBoolBuilder>? builder)
Parameters
idstringInternal ID that will be used for serialization.
namestringWill be shown at the setting screen.
refIRefReference to the value used by the property.
builderAction<ISettingsPropertyBoolBuilder>Settings property builder.
Returns
- ISettingsPropertyGroupBuilder
The settings property group builder.
AddButton(string, string, IRef, string, Action<ISettingsPropertyButtonBuilder>?)
Creates an Button property.
ISettingsPropertyGroupBuilder AddButton(string id, string name, IRef @ref, string content, Action<ISettingsPropertyButtonBuilder>? builder)
Parameters
idstringInternal ID that will be used for serialization.
namestringWill be shown at the setting screen.
refIRefReference to the value used by the property.
contentstringButton content.
builderAction<ISettingsPropertyButtonBuilder>Settings property builder.
Returns
- ISettingsPropertyGroupBuilder
The settings property group builder.
AddCustom<TSettingsPropertyBuilder>(ISettingsPropertyBuilder<TSettingsPropertyBuilder>)
Adds 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.
ISettingsPropertyGroupBuilder AddCustom<TSettingsPropertyBuilder>(ISettingsPropertyBuilder<TSettingsPropertyBuilder> builder) where TSettingsPropertyBuilder : ISettingsPropertyBuilder
Parameters
builderISettingsPropertyBuilder<TSettingsPropertyBuilder>Settings property builder.
Returns
- ISettingsPropertyGroupBuilder
The settings property group builder.
Type Parameters
TSettingsPropertyBuilderA derived class of ISettingsPropertyBuilder.
AddDropdown(string, string, int, IRef, Action<ISettingsPropertyDropdownBuilder>?)
Creates a Dropdown property.
ISettingsPropertyGroupBuilder AddDropdown(string id, string name, int selectedIndex, IRef @ref, Action<ISettingsPropertyDropdownBuilder>? builder)
Parameters
idstringInternal ID that will be used for serialization.
namestringWill be shown at the setting screen.
selectedIndexintSee SelectedIndex.
refIRefReference to the value used by the property.
builderAction<ISettingsPropertyDropdownBuilder>Settings property builder.
Returns
- ISettingsPropertyGroupBuilder
The settings property group builder.
AddFloatingInteger(string, string, float, float, IRef, Action<ISettingsPropertyFloatingIntegerBuilder>?)
Creates an Float Slider property.
ISettingsPropertyGroupBuilder AddFloatingInteger(string id, string name, float minValue, float maxValue, IRef @ref, Action<ISettingsPropertyFloatingIntegerBuilder>? builder)
Parameters
idstringInternal ID that will be used for serialization.
namestringWill be shown at the setting screen.
minValuefloatSee MinValue.
maxValuefloatSee MaxValue.
refIRefReference to the value used by the property.
builderAction<ISettingsPropertyFloatingIntegerBuilder>Settings property builder.
Returns
- ISettingsPropertyGroupBuilder
The settings property group builder.
AddInteger(string, string, int, int, IRef, Action<ISettingsPropertyIntegerBuilder>?)
Creates an Integer Slider property.
ISettingsPropertyGroupBuilder AddInteger(string id, string name, int minValue, int maxValue, IRef @ref, Action<ISettingsPropertyIntegerBuilder>? builder)
Parameters
idstringInternal ID that will be used for serialization.
namestringWill be shown at the setting screen.
minValueintmaxValueintrefIRefReference to the value used by the property.
builderAction<ISettingsPropertyIntegerBuilder>Settings property builder.
Returns
- ISettingsPropertyGroupBuilder
The settings property group builder.
AddText(string, string, IRef, Action<ISettingsPropertyTextBuilder>?)
Creates an TextBox property.
ISettingsPropertyGroupBuilder AddText(string id, string name, IRef @ref, Action<ISettingsPropertyTextBuilder>? builder)
Parameters
idstringInternal ID that will be used for serialization.
namestringWill be shown at the setting screen.
refIRefReference to the value used by the property.
builderAction<ISettingsPropertyTextBuilder>Settings property builder.
Returns
- ISettingsPropertyGroupBuilder
The settings property group builder.
AddToggle(string, string, IRef, Action<ISettingsPropertyGroupToggleBuilder>?)
Creates a Toggle(bool) property.
ISettingsPropertyGroupBuilder AddToggle(string id, string name, IRef @ref, Action<ISettingsPropertyGroupToggleBuilder>? builder)
Parameters
idstringInternal ID that will be used for serialization.
namestringWill be shown at the setting screen.
refIRefReference to the value used by the property.
builderAction<ISettingsPropertyGroupToggleBuilder>Settings property builder.
Returns
- ISettingsPropertyGroupBuilder
The settings property group builder.
GetPropertyGroupDefinition()
Gets this property group definition.
IPropertyGroupDefinition GetPropertyGroupDefinition()
Returns
- IPropertyGroupDefinition
A property group definition.
SetGroupOrder(int)
ISettingsPropertyGroupBuilder SetGroupOrder(int value)
Parameters
valueintThe value.
Returns
- ISettingsPropertyGroupBuilder
The settings property group builder.