-
Notifications
You must be signed in to change notification settings - Fork 4
MCM_Collection
Inherits: MCM_Value < MCM_Type
Inherited By: MCM_Array, MCM_Dictionary
The base type for MCM values that hold a collection of inputs
| Type | Name |
|---|---|
| MCM_Collection_Types | ValueType |
| Variant | DefaultItemValue |
| int | MaxItems |
| bool | Expanded |
| bool | CanDeleteAndAdd |
| Variant | MinRange |
| Variant | MaxRange |
| Variant | Step |
| Dictionary | AcceptedNumberValueTypes |
| Return Value | Name and Parameters |
|---|---|
| MCM_Collection | MCM_Collection(section: String, id: String, name: String, tooltip: String, default: Variant, valueType: MCM_Collection_Types, defaultItemValue: Variant) |
| Return Value | Name and Parameters |
|---|---|
| MCM_Collection | setMaxItems(maxItems: int) |
| MCM_Collection | setExpanded(expanded: bool) |
| MCM_Collection | setCanDeleteAndAdd(canDeleteAndAdd: bool) |
| MCM_Collection | setMinRange(minRange: Variant) |
| MCM_Collection | setMaxRange(maxRange: Variant) |
| MCM_Collection | setStep(step: Variant) |
| Dictionary | createConfigObject() const |
MCM_Collection_Types ValueType
Sets the type of inputs to be displayed to the player when adding items to the array.
Variant DefaultItemValue
The default value assigned when the player creates a new item in the collection.
int MaxItems
How many items the player is able to add to the array. If this property is not set it allows the player to add as many as they wish.
Anything less than or equal to zero = infinite entries
bool Expanded
Sets if the Collection is expanded by default or not
bool CanDeleteAndAdd
Sets if the player can add and delete items from the collection
Variant MinRange
The minimum value the player is able to set the value to in the configuration menu.
Only used if the ValueType inherits MCM_Number
Variant MaxRange
The maximum value the player is able to set the value to in the configuration menu.
Only used if the ValueType inherits MCM_Number
Variant Step
How much is added per step in both the Slider and SpinBox input. Also controls how many decimal places are allowed if it accepts floating point numbers
Only used if the ValueType inherits MCM_Number
Dictionary AcceptedNumberValueTypes
The accepted variable types a collection accepts
This property is for internal use only. Do not attempt to change this property.
MCM_Collection MCM_Collection(section: String, id: String, name: String, tooltip: String, default: Variant, valueType: MCM_Collection_Types, defaultItemValue: Variant)
Constructs an MCM_Collection and sets the ValueType and DefaultItemValue properties. And then sends section, id, name, tooltip, and default parameters to the inherited MCM_Value constructor.
MCM_Collection setMaxItems(maxItems: int)
Set how many items the player is allowed to enter into the collection.
MCM_Collection setExpanded(expanded: bool)
Set if the collection should be default expanded in the MCM
MCM_Collection setCanDeleteAndAdd(canDeleteAndAdd: bool)
Sets if the player can add and delete items from the collection
MCM_Collection setMinRange(minRange: Variant)
Set the minimum value this value can be set to
MCM_Collection setMaxRange(maxRange: Variant)
Set the maximum value this value can be set to
MCM_Collection setStep(step: Variant)
Set how much the UI SpinBox/Slider increments/decrements the value.