Navigation
API > API/Runtime > API/Runtime/UMG
A simple widget that shows a sliding bar with a handle that allows you to control the value in a user define range (between 0..1 by default).
- No Children
| Name | USlider |
| Type | class |
| Header File | /Engine/Source/Runtime/UMG/Public/Components/Slider.h |
| Include Path | #include "Components/Slider.h" |
Syntax
UCLASS (MinimalAPI)
class USlider : public UWidget
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UVisual → UWidget → USlider
Implements Interfaces
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
USlider
(
const FObjectInitializer& ObjectInitializer |
Components/Slider.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bPreventThrottling | bool | If refresh requests for the viewport should happen for all value changes | Components/Slider.h |
|
| IndentHandle | bool | Whether the slidable area should be indented to fit the handle. | Components/Slider.h |
|
| IsFocusable | bool | Should the slider be focusable? | Components/Slider.h |
|
| Locked | bool | Whether the handle is interactive or fixed. | Components/Slider.h |
|
| MaxValue | float | The maximum value the slider can be set to. | Components/Slider.h |
|
| MinValue | float | The minimum value the slider can be set to. | Components/Slider.h |
|
| MouseUsesStep | bool | Sets new value if mouse position is greater/less than half the step size. | Components/Slider.h |
|
| OnControllerCaptureBegin | FOnControllerCaptureBeginEvent | Invoked when the controller capture begins. | Components/Slider.h |
|
| OnControllerCaptureEnd | FOnControllerCaptureEndEvent | Invoked when the controller capture ends. | Components/Slider.h |
|
| OnMouseCaptureBegin | FOnMouseCaptureBeginEvent | Invoked when the mouse is pressed and a capture begins. | Components/Slider.h |
|
| OnMouseCaptureEnd | FOnMouseCaptureEndEvent | Invoked when the mouse is released and a capture ends. | Components/Slider.h |
|
| OnValueChanged | FOnFloatValueChangedEvent | Called when the value is changed by slider or typing. | Components/Slider.h |
|
| Orientation | TEnumAsByte< EOrientation > | The slider's orientation. | Components/Slider.h |
|
| RequiresControllerLock | bool | Sets whether we have to lock input to change the slider value. | Components/Slider.h |
|
| SliderBarColor | FLinearColor | The color to draw the slider bar in. | Components/Slider.h |
|
| SliderHandleColor | FLinearColor | The color to draw the slider handle in. | Components/Slider.h |
|
| StepSize | float | The amount to adjust the value by, when using a controller or keyboard | Components/Slider.h |
|
| Value | float | The volume value to display. | Components/Slider.h |
|
| ValueDelegate | FGetFloat | A bindable delegate to allow logic to drive the value of the widget | Components/Slider.h | |
| WidgetStyle | FSliderStyle | The progress bar style | Components/Slider.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
float GetMaxValue() |
Gets the maximum value of the slider. | Components/Slider.h | |
float GetMinValue() |
Gets the minimum value of the slider. | Components/Slider.h | |
float GetNormalizedValue() |
Get the current value scaled from 0 to 1 | Components/Slider.h |
|
EOrientation GetOrientation() |
Getg the slider's orientation. | Components/Slider.h | |
FLinearColor GetSliderBarColor() |
Gets the color of the slider bar. | Components/Slider.h | |
FLinearColor GetSliderHandleColor() |
Gets the color of the handle bar | Components/Slider.h | |
float GetStepSize() |
Gets the amount to adjust the value by. | Components/Slider.h | |
float GetValue() |
Gets the current value of the slider. | Components/Slider.h |
|
const FSliderStyle & GetWidgetStyle() |
Get the style used by the widget. | Components/Slider.h | |
bool HasIndentHandle() |
Gets if the slidable area should be indented to fit the handle. | Components/Slider.h | |
bool IsLocked() |
Returns true when the handle is fixed. | Components/Slider.h | |
void SetIndentHandle
(
bool InValue |
Sets if the slidable area should be indented to fit the handle. | Components/Slider.h |
|
void SetLocked
(
bool InValue |
Sets the handle to be interactive or fixed. | Components/Slider.h |
|
void SetMaxValue
(
float InValue |
Sets the maximum value of the slider. | Components/Slider.h |
|
void SetMinValue
(
float InValue |
Sets the minimum value of the slider. | Components/Slider.h |
|
void SetOrientation
(
EOrientation InOrientation |
Sets the slider's orientation. | Components/Slider.h | |
void SetSliderBarColor
(
FLinearColor InValue |
Sets the color of the slider bar. | Components/Slider.h |
|
void SetSliderHandleColor
(
FLinearColor InValue |
Sets the color of the handle bar | Components/Slider.h |
|
void SetStepSize
(
float InValue |
Sets the amount to adjust the value by, when using a controller or keyboard. | Components/Slider.h |
|
void SetValue
(
float InValue |
Sets the current value of the slider. | Components/Slider.h |
|
void SetWidgetStyle
(
const FSliderStyle& InStyle |
Set the style used by the widget. | Components/Slider.h |
Overridden from UWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual const FText GetPaletteCategory() |
Gets the palette category of the widget | Components/Slider.h | |
virtual void SynchronizeProperties () |
Applies all properties to the native widget if possible. | Components/Slider.h |
Overridden from UVisual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ReleaseSlateResources
(
bool bReleaseChildren |
Components/Slider.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void HandleOnControllerCaptureBegin() |
Components/Slider.h | ||
void HandleOnControllerCaptureEnd() |
Components/Slider.h | ||
void HandleOnMouseCaptureBegin() |
Components/Slider.h | ||
void HandleOnMouseCaptureEnd() |
Components/Slider.h | ||
void HandleOnValueChanged
(
float InValue |
Components/Slider.h | ||
float K2_Gate_Value() |
Components/Slider.h |
Overridden from UWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TSharedPtr< SWidget > GetAccessibleWidget() |
Gets the widget that accessibility properties should synchronize to. | Components/Slider.h | |
virtual TSharedRef< SWidget > RebuildWidget() |
Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed. | Components/Slider.h |