DreamGUI
Reference

UDreamSlider

A slider whose hierarchy is code, not an asset.

Inherits from UDreamUIControl.

Declared in Public/Controls/DreamSlider.h.

A slider whose hierarchy is code, not an asset.

The same five nodes both preset Blueprints carry -- a track, a fill area holding the fill, a handle area holding the handle -- with one difference that is the point: BP_HorizontalSlider and BP_VerticalSlider are two assets because an asset cannot branch on a property, and this class is one control because code can. Direction re-anchors the parts; there is nothing else the two presets disagreed about.

The areas exist because UUISlider positions the fill and the handle INSIDE whatever their parents are -- FillArea and HandleArea are how the track tells it where "0" and "1" live. The handle area is inset by the handle's own size so the handle rides within the track's ends instead of overhanging them.

Properties

NameTypeCategoryIn the details panelFrom BlueprintDescription
StyleFDreamSliderStyleSlideryesGetStyle / SetStyleThis instance's own look. The project sheet wins while StyleSource says so AND a sheet actually exists; with no sheet in the project this IS the look in effect -- which is why it stays editable instead of being gated on the enum: the old edit condition greyed the exact values that were driving the control.
bLockedboolSlideryesIsLocked / SetLockedShows its value and refuses to be moved -- UMG's Locked, pushed onto the behaviour. A press on a locked slider begins no mouse capture, so OnMouseCaptureBegin and OnMouseCaptureEnd stay silent, as SSlider's do.
SliderBarColorFColorSlideryesGetSliderBarColor / SetSliderBarColorA tint over the bar the handle travels along -- UMG's SliderBarColor, which is a tint over SSlider's bar image for exactly the same reason this is one: the STYLE says what the slider looks like, and this says what is happening to it right now. White is no opinion.
SliderHandleColorFColorSlideryesGetSliderHandleColor / SetSliderHandleColorThe same, over the handle's five state colours -- UMG's SliderHandleColor.
bIndentHandleboolSlideryesGetIndentHandle / SetIndentHandleWhether the handle stays inside the track's ends -- UMG's IndentHandle.
DirectionEUISliderDirectionTypeSlideryesGetDirection / SetDirectionWhich way it runs. One property instead of two Blueprint assets.
ValuefloatSlideryesGetValue / SetValueAuthored value in; mirror of the behaviour's out. A property so .dui and bindings can see it.
MinValuefloatSlideryesGetMinValue / SetMinValue
MaxValuefloatSlideryesGetMaxValue / SetMaxValue
bWholeNumbersboolSlideryesGetWholeNumbers / SetWholeNumbersWhole numbers only -- the behaviour has always had this and the control never pushed it, so a slider authored as an integer picker answered 3.7215. Every value the slider takes is rounded to the nearest whole number -- a drag, a gamepad step, SetValue -- so an authored fractional Value is rounded at the next push rather than refused.
NavigationChangeIntervalfloatSlideryesGetNavigationChangeInterval / SetNavigationChangeIntervalHow far one gamepad or keyboard press moves the value, as a FRACTION of the range: a press is worth (MaxValue - MinValue) * this. Also the behaviour's, also never pushed before -- so every slider in the project stepped by the library's 0.1 whatever its .dui said.
StepSizefloatSlideryesGetStepSize / SetStepSizeThe quantum a MOUSE drag moves the value in, while bMouseUsesStep is on -- UMG's StepSize.
bMouseUsesStepboolSlideryesGetMouseUsesStep / SetMouseUsesStepQuantise a mouse drag to StepSize. Off, a drag is continuous.
bRequiresControllerLockboolSlideryesGetRequiresControllerLock / SetRequiresControllerLockA gamepad must capture this slider before its directions move the value -- UMG's RequiresControllerLock, on by default for the reason it is on there: a row of sliders a stick travels THROUGH is unusable if the first one swallows every left and right.
TrackNodeTObjectPtr<UDreamWidget>Slider-read only
FillNodeTObjectPtr<UDreamWidget>Slider-read only
FillAreaNodeTObjectPtr<UDreamWidget>Slider-read only
HandleNodeTObjectPtr<UDreamWidget>Slider-read only
HandleAreaNodeTObjectPtr<UDreamWidget>Slider-read only
SliderBehaviourTObjectPtr<UUISlider>Slider-read only

Functions

FunctionKindDescription
EUISliderDirectionType GetDirection()pureGet Direction
bool GetIndentHandle()pureGet Indent Handle
float GetMaxValue()pureGet Max Value
float GetMinValue()pureGet Min Value
bool GetMouseUsesStep()pureGet Mouse Uses Step
float GetNavigationChangeInterval()pureGet Navigation Change Interval
float GetNormalizedValue()pureWhere the value sits between the two ends, 0 to 1 -- UMG's GetNormalizedValue.
bool GetRequiresControllerLock()pureGet Requires Controller Lock
FColor GetSliderBarColor()pureGet Slider Bar Color
FColor GetSliderHandleColor()pureGet Slider Handle Color
float GetStepSize()pureGet Step Size
FDreamSliderStyle GetStyle()pureGet Style
float GetValue()pureGet Value
bool GetWholeNumbers()pureGet Whole Numbers
bool IsControllerCaptured()pureWhether a gamepad currently holds this slider -- read straight off the behaviour.
bool IsLocked()pureIs Locked
void SetDirection(EUISliderDirectionType InDirection)callableRe-anchors the parts: the direction decides which axis the track, fill and handle run along.
void SetIndentHandle(bool bInIndentHandle)callableRe-places the handle area, which is the one thing this decides.
void SetLocked(bool bInLocked)callableSet Locked
void SetMaxValue(float InMaxValue)callableSet Max Value
void SetMinValue(float InMinValue)callableRange before value, always: the value is clamped against the range, never the other way.
void SetMouseUsesStep(bool bInMouseUsesStep)callableSet Mouse Uses Step
void SetNavigationChangeInterval(float InInterval)callableSet Navigation Change Interval
void SetRequiresControllerLock(bool bInRequiresControllerLock)callableSet Requires Controller Lock
void SetSliderBarColor(FColor InSliderBarColor)callableSet Slider Bar Color
void SetSliderHandleColor(FColor InSliderHandleColor)callableSet Slider Handle Color
void SetStepSize(float InStepSize)callableSet Step Size
void SetStyle(FDreamSliderStyle InStyle)callableThis instance's whole look, replaced and pushed. See UDreamButton::SetStyle for the caveat.
void SetValue(float InValue)callableSet Value
void SetWholeNumbers(bool bInWholeNumbers)callableSet Whole Numbers

Events

EventSignatureDescription
OnMouseCaptureBeginvoid DreamSliderCaptureEvent__DelegateSignature()The four capture moments UMG's slider speaks, re-broadcast from the behaviour exactly as the value change is. Mouse begin/end are the press and release; controller begin/end are the lock being taken and given back. What they are FOR is the reason UMG has them: a consumer that writes the value into a setting, plays a sound or asks the server can hold off while the player is still dragging, and act once on the moment they let go.
OnMouseCaptureEndvoid DreamSliderCaptureEvent__DelegateSignature()
OnControllerCaptureBeginvoid DreamSliderCaptureEvent__DelegateSignature()
OnControllerCaptureEndvoid DreamSliderCaptureEvent__DelegateSignature()
OnValueChangedvoid DreamSliderValueChangedEvent__DelegateSignature(float Value)Re-broadcast from the behaviour, so a consumer binds to the control, not to a part of it.
OnValueChangedBPvoid DreamSliderValueChangedEvent__DelegateSignature(float Value)The <-> convention: two-way bindings synthesize their reverse route against this exact name, so a value control carries it alongside its spoken events. Fires with them.

Compared with UMG

Every Blueprint-facing member of the UMG class, and where it went. adopt: same name, same meaning. map: here under another name or on another type. reject: deliberately absent, with the reason.

UMGMemberStatusHereNote
USliderValueadoptValue
USliderMinValueadoptMinValue
USliderMaxValueadoptMaxValue
USliderWidgetStylemapStyleFDreamSliderStyle: track thickness and colour, fill colour, handle size and its five state colours.
USliderOrientationmapDirectionEUISliderDirectionType has four values rather than two: horizontal and vertical each carry their reversed form, which UMG spells with a separate FlipForRightToLeft.
USliderSliderBarColoradoptSliderBarColorFColor, and a TINT over the style's track colour -- which is what it is in Slate too (SSlider multiplies it over the bar image). Rides the track, not the fill.
USliderSliderHandleColoradoptSliderHandleColorA tint over all five of the handle's state colours, so a tinted handle stays tinted through a hover.
USliderIndentHandlemapbIndentHandleNamed with this codebase's bool prefix. On (the default, and what this slider has always drawn) the handle's travel is the track minus the handle's own width; off gives it the track's whole length, so the handle's centre reaches the ends and half of it hangs off. It is the handle AREA's inset either way, so the reported value is unaffected -- the same drag spans the same numbers.
USliderLockedmapbLockedPushed to UUISlider::bLocked, which gates CalculateInputValue, the mouse capture and the navigation directions: a press on a locked slider begins no capture, so OnMouseCaptureBegin/End stay silent, as SSlider's do. Input only: SetValue keeps working, and the look does not change.
USliderMouseUsesStepmapbMouseUsesStepNamed with this codebase's bool prefix.
USliderRequiresControllerLockmapbRequiresControllerLockNamed with this codebase's bool prefix.
USliderStepSizeadoptStepSize
USliderIsFocusablemapUDreamWidget::bIsFocusableEvery widget here carries it.
USliderbPreventThrottlingrejectSlate throttles the whole application's tick while a widget is being dragged, and this flag opts out of that. There is no Slate widget and no throttle here -- the UI is rendered geometry in the level.
USliderOnMouseCaptureBeginadoptOnMouseCaptureBegin
USliderOnMouseCaptureEndadoptOnMouseCaptureEnd
USliderOnControllerCaptureBeginadoptOnControllerCaptureBegin
USliderOnControllerCaptureEndadoptOnControllerCaptureEnd
USliderOnValueChangedadoptOnValueChanged
USliderGetValueadoptGetValue
USliderGetNormalizedValueadoptGetNormalizedValueA zero-width range answers zero rather than dividing by it.
USliderSetValueadoptSetValue
USliderSetMinValueadoptSetMinValue
USliderSetMaxValueadoptSetMaxValue
USliderSetIndentHandleadoptSetIndentHandleRe-places the handle area, which is the one thing it decides.
USliderSetLockedadoptSetLocked
USliderSetStepSizeadoptSetStepSize
USliderSetSliderBarColoradoptSetSliderBarColor
USliderSetSliderHandleColoradoptSetSliderHandleColor
USliderSetStyleadoptSetStyleNot a UFUNCTION on USlider (its Setter meta names it); added here so a look can be replaced at runtime.

On this page