Skip to content

Class USFSettingEntryWidget_Rotator

ClassList > USFSettingEntryWidget_Rotator

The native base class for a setting entry widget for a discrete setting, represented as a rotator in the UI. More...

  • #include "UI/SettingEntries/SFSettingEntryWidget_Rotator.h"

Inherits the following classes: USFSettingEntryWidget

Public Attributes inherited from USFSettingEntryWidget

See USFSettingEntryWidget

Type Name
FOnSettingEntryFocused OnSettingFocused

Public Functions

Type Name
void RefreshOptions ()

Public Functions inherited from USFSettingEntryWidget

See USFSettingEntryWidget

Type Name
class USFSettingDefinition * GetSettingDefinition () const
FGameplayTag GetSettingTag () const
virtual void InitializeSettingEntry (const class USFSettingDefinition * InSettingDefinition)

Protected Attributes

Type Name
TArray< struct FSFSettingOption > Options
TObjectPtr< class UCommonRotator > RotatorWidget

Protected Attributes inherited from USFSettingEntryWidget

See USFSettingEntryWidget

Type Name
TObjectPtr< class UCommonTextBlock > SettingLabel
FGameplayTag SettingTag

Protected Functions

Type Name
void CheckForDeterminantSettings (const FGameplayTag & ChangedSettingTag, class USFSettingValue * NewValue)
virtual void InitializeSettingEntry (const class USFSettingDefinition * InSettingDefinition) override
void PopulateOptions (const TArray< struct FSFSettingOption > & SettingOptions)
bool SelectOptionByValue (const class USFSettingValue * Value)
virtual void UpdateVisualValue_Implementation (const class USFSettingValue * NewValue) override

Protected Functions inherited from USFSettingEntryWidget

See USFSettingEntryWidget

Type Name
void BP_InitializeSettingEntry (const class USFSettingDefinition * InSettingDefinition)
void OnUserChangedValue (class USFSettingValue * NewValue)
void UpdateVisualValue (const class USFSettingValue * NewValue)
virtual void UpdateVisualValue_Implementation (const class USFSettingValue * NewValue)
void UpdateWidgetState ()

Detailed Description

The native base class for a setting entry widget for a discrete setting, represented as a rotator in the UI.

The widget blueprint implementing this class should be assigned as a value to the SettingEntryWidgetClasses map with the discrete setting definition class (USFSettingDefinition_Discrete) as the key in the Developer Settings at Project Settings > Plugins > SettingsFramework.

Public Functions Documentation

function RefreshOptions

void USFSettingEntryWidget_Rotator::RefreshOptions () 

Re-evaluate and repopulate the available options. Intended for discrete settings with dynamic options at runtime.

Note:

BlueprintCallable


Protected Attributes Documentation

variable Options

TArray<struct FSFSettingOption> USFSettingEntryWidget_Rotator::Options;

The transient list of options currently displayed by the rotator widget. This is to keep track of the full FSFSettingOption data structs since the rotator widget only stores the display text and index int.

Note:

Transient


variable RotatorWidget

TObjectPtr<class UCommonRotator> USFSettingEntryWidget_Rotator::RotatorWidget;

The rotator widget representing the discrete setting value in the UI.

Note:

BlueprintReadOnly BindWidget


Protected Functions Documentation

function CheckForDeterminantSettings

void USFSettingEntryWidget_Rotator::CheckForDeterminantSettings (
    const FGameplayTag & ChangedSettingTag,
    class USFSettingValue * NewValue
) 

Intended for discrete settings with dynamic options at runtime. Refresh the available options when there is a value change from a determinant setting (specified in this discrete setting's definition asset).


function InitializeSettingEntry

virtual void USFSettingEntryWidget_Rotator::InitializeSettingEntry (
    const class USFSettingDefinition * InSettingDefinition
) override

Initializes the data and display of this setting entry widget based on the assigned setting definition asset. Subclasses can override this function to hook up any setting type-specific logic or display elements, but should call the parent implementation to ensure the base functionality is executed (e.g., binding to setting value change events from the subsystem).

Parameters:

  • InSettingDefinition The setting definition asset represented by this widget.

Implements USFSettingEntryWidget::InitializeSettingEntry


function PopulateOptions

void USFSettingEntryWidget_Rotator::PopulateOptions (
    const TArray< struct FSFSettingOption > & SettingOptions
) 

Populate the rotator widget with the provided list of setting options. This will also update the internal Options array to keep track of the full data for each option.

Parameters:

  • SettingOptions The list of setting options to populate the rotator widget with.

function SelectOptionByValue

bool USFSettingEntryWidget_Rotator::SelectOptionByValue (
    const class USFSettingValue * Value
) 

Set the selected option in the rotator widget based on the provided setting value.

Parameters:

  • Value The setting value to match against the available options to select the appropriate one in the rotator widget.

Returns:

True if a matching option was found and selected, false otherwise.


function UpdateVisualValue_Implementation

virtual void USFSettingEntryWidget_Rotator::UpdateVisualValue_Implementation (
    const class USFSettingValue * NewValue
) override

Native implementation of UpdateVisualValue, can be optionally overridden by C++ subclasses to handle setting value change events from the subsystem.

Implements USFSettingEntryWidget::UpdateVisualValue_Implementation



The documentation for this class was generated from the following file Source/SettingsFramework/Public/UI/SettingEntries/SFSettingEntryWidget_Rotator.h