UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SFrameRatePicker.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
7#include "Misc/FrameRate.h"
8#include "CommonFrameRates.h"
11#include "Styling/CoreStyle.h"
12
13class FMenuBuilder;
14
19{
20public:
23
25 : _ComboButtonStyle(&FCoreStyle::Get().GetWidgetStyle< FComboButtonStyle >("ComboButton"))
26 , _ButtonStyle(nullptr)
27 , _ForegroundColor(FSlateColor::UseForeground())
28 , _ContentPadding(FMargin(2.f, 0.f))
31 , _Font()
32 {}
33
36
37
39
40
41 SLATE_ATTRIBUTE(FSlateColor, ForegroundColor)
42
43
44 SLATE_ATTRIBUTE(FMargin, ContentPadding)
45
46
48
49
50 SLATE_EVENT(FOnValueChanged, OnValueChanged)
51
52
54
55
57
58
59 SLATE_ATTRIBUTE(FText, RecommendedText)
60
61
62 SLATE_ATTRIBUTE(FText, NotRecommendedText)
63
64
65 SLATE_ATTRIBUTE(FText, NotRecommendedToolTip)
66
67
69
70
72
74
75
78 TIMEMANAGEMENT_API void Construct(const FArguments& InArgs);
79
84
86
87 FText GetValueText() const;
88
89 TSharedRef<SWidget> BuildMenu();
90 void PopulateNotRecommendedMenu(FMenuBuilder& MenuBuilder);
91
92 void SetValue(FFrameRate InValue);
93
94
96
97 TArray<FCommonFrameRateInfo> PresetValues;
98
99 TAttribute<FFrameRate> ValueAttribute;
100 FOnValueChanged OnValueChangedDelegate;
101
102 TAttribute<bool> HasMultipleValuesAttribute;
103
104 TAttribute<FText> RecommendedText;
105 TAttribute<FText> NotRecommendedText;
106 TAttribute<FText> NotRecommendedToolTip;
107
108 FIsPresetRecommended IsPresetRecommendedDelegate;
109};
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define SLATE_STYLE_ARGUMENT(ArgType, ArgName)
Definition DeclarativeSyntaxSupport.h:280
#define SLATE_ATTRIBUTE(AttrType, AttrName)
Definition DeclarativeSyntaxSupport.h:192
#define SLATE_EVENT(DelegateName, EventName)
Definition DeclarativeSyntaxSupport.h:458
#define SLATE_END_ARGS()
Definition DeclarativeSyntaxSupport.h:116
#define SLATE_ARGUMENT(ArgType, ArgName)
Definition DeclarativeSyntaxSupport.h:208
Definition CoreStyle.h:15
Definition MultiBoxBuilder.h:310
Definition Text.h:385
Definition SCompoundWidget.h:22
Definition SFrameRatePicker.h:19
TIMEMANAGEMENT_API void Construct(const FArguments &InArgs)
Definition SFrameRatePicker.cpp:13
DECLARE_DELEGATE_OneParam(FOnValueChanged, FFrameRate)
SLATE_BEGIN_ARGS(SFrameRatePicker)
Definition SFrameRatePicker.h:24
DECLARE_DELEGATE_RetVal_OneParam(bool, FIsPresetRecommended, FFrameRate)
TIMEMANAGEMENT_API FFrameRate GetCurrentValue() const
Definition SFrameRatePicker.cpp:50
Definition SWidget.h:165
Definition Array.h:670
Definition Attribute.h:17
Definition SharedPointer.h:153
@ false
Definition radaudio_common.h:23
Definition SlateTypes.h:509
Definition SlateTypes.h:645
Definition CommonFrameRates.h:32
Definition FrameRate.h:21
Definition Margin.h:17
Definition SlateColor.h:42
Definition SlateFontInfo.h:147