ULimenSelectionSetting
Overview
ULimenSelectionSetting is an abstract base class that extends ULimenSetting, implementing interfaces for editable and readable settings. It manages a list of possible selections, a current selection, and an applied selection. The class provides functionality to get and set the current value, check if a value is valid, and apply the current setting.
Properties
Type | Name | Access | Description |
|---|---|---|---|
| PossibleSelections | EditAnywhere | List of possible selections for this setting. |
| DefaultSelection | EditAnywhere | The default selection value. |
| CurrentSelection | Private | The current selected value. |
| PreviousSelection | Private | The previous selected value. |
| AppliedSelection | SaveGame | The applied selected value, saved across sessions. |
Functions
Return Type | Signature | Description |
|---|---|---|
| GetSettingValues() const | Returns the list of possible selections. |
| GetCurrentValue() const | Returns the current selected value. |
| GetPreviousValue() const | Returns the previous selected value. |
| GetAppliedValue() const | Returns the applied selected value. |
| IsValueValid(const FString& Test) | Checks if a given selection is valid. |
| CanEdit() const | Determines if the setting can be edited. |
| SetNewValue(const FString& NewSelection) | Sets a new selection and updates the state accordingly. |
| SetDefaults() | Resets the settings to their default values. |
| PostDataLoaded() | Called after data is loaded, setting up initial states. |
| IsEnabled() const | Checks if the current selection is enabled. |
| ApplyCurrentSetting(bool bUserRequest) | Applies the current selected value and updates the applied state. |
Usage & Implementation Notes
The class uses a
TArray<FString>to store possible selections, ensuring that only valid values can be set.It maintains
CurrentSelection,PreviousSelection, andAppliedSelectionto track changes and apply settings across sessions.Error handling is included in the
SetNewValuefunction to log errors when setting an invalid value.