UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SColorSlider.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
6
11
18{
19public:
21
24
44
47
48
50
51
53
54
55 SLATE_ATTRIBUTE(float, MinSliderValue)
56
57
58 SLATE_ATTRIBUTE(float, MaxSliderValue)
59
60
62
63
64 SLATE_ATTRIBUTE(bool, SupportDynamicSliderMaxValue)
65
66
67 SLATE_ATTRIBUTE(EOrientation, Orientation)
68
69
71
72
74
75
77
78
80
81
82 SLATE_EVENT(FOnValueChanged, OnValueChanged)
83
84
85 SLATE_EVENT(FSimpleDelegate, OnBeginSliderMovement)
86
87
88 SLATE_EVENT(FSimpleDelegate, OnEndSliderMovement)
89
90
92
93
95
97
98
103 void Construct(const FArguments& InArgs);
104
106 // Begin SWidget overrides
107 virtual int32 OnPaint(const FPaintArgs& Args, const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle, bool bParentEnabled) const override;
109 // End SWidget overrides
110
111private:
113 void OnSpinBoxValueCommitted(float NewValue, ETextCommit::Type CommitType);
114
115private:
117 TSlateAttribute<EOrientation, EInvalidateWidgetReason::Paint> Orientation;
118
120 TSlateAttribute<TArray<FLinearColor>, EInvalidateWidgetReason::Paint> GradientColors;
121
123 TSlateAttribute<bool, EInvalidateWidgetReason::Paint> bHasAlphaBackground;
124
126 TSlateAttribute<bool, EInvalidateWidgetReason::Paint> bUseSRGB;
127
129 TSlateAttribute<bool, EInvalidateWidgetReason::Paint> bSupportDynamicSliderMaxValue;
130
132 TSharedPtr<SSlider> Slider;
133
135 float ColorSliderSize = 0.0f;
136
137 static constexpr float Padding = 8.0f;
138 static constexpr float LabelSize = 8.0f;
139 static constexpr float SpinBoxSize = 60.0f;
140
141 static constexpr float HorizontalSliderLength = 123.0f;
142 static constexpr float HorizontalSliderHeight = 20.0f;
143
144 static constexpr float VerticalSliderWidth = 28.0f;
145 static constexpr float VerticalSliderHeight = 200.0f;
146
148 const FSlateBrush* BorderBrush;
149 const FSlateBrush* BorderActiveBrush;
150 const FSlateBrush* BorderHoveredBrush;
151 const FSlateBrush* AlphaBackgroundBrush;
152};
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#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
return true
Definition ExternalRpcRegistry.cpp:601
EInvalidateWidgetReason
Definition InvalidateWidgetReason.h:14
SColorThemeBar is deprecated SColorThemesViewer now displays a standard menu with a list of available themes _UseSRGB()
EOrientation
Definition SlateEnums.h:261
Definition PaintArgs.h:23
Definition SlateRect.h:26
Definition DrawElements.h:220
Definition Text.h:385
Definition WidgetStyle.h:15
Definition SColorSlider.h:18
SColorSlider()
Definition SColorSlider.cpp:7
virtual FVector2D ComputeDesiredSize(float) const override
Definition SColorSlider.cpp:112
SLATE_BEGIN_ARGS(SColorSlider)
Definition SColorSlider.h:25
virtual int32 OnPaint(const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) const override
Definition SColorSlider.cpp:125
DECLARE_DELEGATE_OneParam(FOnValueChanged, float)
void Construct(const FArguments &InArgs)
Definition SColorSlider.cpp:16
Definition SCompoundWidget.h:22
Definition SSlider.h:23
Definition Array.h:670
Definition SharedPointer.h:692
Definition SlateEnums.h:289
@ false
Definition radaudio_common.h:23
Definition Geometry.h:40
Definition Color.h:48
Definition SlateBrush.h:239