USlider

A simple widget that shows a sliding bar with a handle that allows you to control the value between 0..1.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

UMG

Header

/Engine/Source/Runtime/UMG/Public/Components/Slider.h

Include

#include "Components/Slider.h"

Syntax

class USlider : public UWidget

Remarks

A simple widget that shows a sliding bar with a handle that allows you to control the value between 0..1.

  • No Children

Variables

Name Description

Public variable

bool

 

IndentHandle

Whether the slidable area should be indented to fit the handle.

Public variable

bool

 

IsFocusable

Should the slider be focusable?

Protected variable

float

 

K2_Cache_Value

Public variable

bool

 

Locked

Whether the handle is interactive or fixed.

Public variable

float

 

MaxValue

The maximum value the slider can be set to.

Public variable

float

 

MinValue

The minimum value the slider can be set to.

Public variable

bool

 

MouseUsesStep

Sets new value if mouse position is greater/less than half the step size.

Protected variable

TSharedPtr< SSl...

 

MySlider

Native Slate Widget

Public variable

FOnControllerCa...

 

OnControllerCaptureBegin

Invoked when the controller capture begins.

Public variable

FOnControllerCa...

 

OnControllerCaptureEnd

Invoked when the controller capture ends.

Public variable

FOnMouseCapture...

 

OnMouseCaptureBegin

Invoked when the mouse is pressed and a capture begins.

Public variable

FOnMouseCapture...

 

OnMouseCaptureEnd

Invoked when the mouse is released and a capture ends.

Public variable

FOnFloatValueCh...

 

OnValueChanged

Called when the value is changed by slider or typing.

Public variable

TEnumAsByte< EO...

 

Orientation

The slider's orientation.

Public variable

bool

 

RequiresControllerLock

Sets whether we have to lock input to change the slider value.

Public variable

FLinearColor

 

SliderBarColor

The color to draw the slider bar in.

Public variable

FLinearColor

 

SliderHandleColor

The color to draw the slider handle in.

Public variable

float

 

StepSize

The amount to adjust the value by, when using a controller or keyboard

Public variable

float

 

Value

The volume value to display.

Public variable

FGetFloat

 

ValueDelegate

A bindable delegate to allow logic to drive the value of the widget

Public variable

FSliderStyle

 

WidgetStyle

The progress bar style

Constructors

Name Description

Public function

USlider

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Const

float

 

GetNormalizedValue()

Get the current value scaled from 0 to 1

Public function Const

float

 

GetValue()

Gets the current value of the slider.

Protected function

void

 

HandleOnControllerCaptureBegin()

Protected function

void

 

HandleOnControllerCaptureEnd()

Protected function

void

 

HandleOnMouseCaptureBegin()

Protected function

void

 

HandleOnMouseCaptureEnd()

Protected function

void

 

HandleOnValueChanged

(
    float InValue
)

Protected function

float

 

K2_Gate_Value()

Public function

void

 

SetIndentHandle

(
    bool InValue
)

Sets if the slidable area should be indented to fit the handle

Public function

void

 

SetLocked

(
    bool InValue
)

Sets the handle to be interactive or fixed

Public function

void

 

SetMaxValue

(
    float InValue
)

Sets the maximum value of the slider.

Public function

void

 

SetMinValue

(
    float InValue
)

Sets the minimum value of the slider.

Public function

void

 

SetSliderBarColor

(
    FLinearColor InValue
)

Sets the color of the slider bar

Public function

void

 

SetSliderHandleColor

(
    FLinearColor InValue
)

Sets the color of the handle bar

Public function

void

 

SetStepSize

(
    float InValue
)

Sets the amount to adjust the value by, when using a controller or keyboard

Public function

void

 

SetValue

(
    float InValue
)

Sets the current value of the slider.

Overridden from UWidget

Name Description

Protected function Virtual Const

TSharedPtr< ...

 

GetAccessibleWidget()

Gets the widget that accessibility properties should synchronize to.

Public function Virtual

const FText

 

GetPaletteCategory()

Gets the palette category of the widget

Protected function Virtual

TSharedRef< ...

 

RebuildWidget()

Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed.

Public function Virtual

void

 

SynchronizeProperties()

Applies all properties to the native widget if possible.

Overridden from UVisual

Name Description

Public function Virtual

void

 

ReleaseSlateResources

(
    bool bReleaseChildren
)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss