UDreamThrobber
A throbber whose hierarchy is code, not an asset: N pieces that pulse, saying only "something is
Inherits from UDreamUIControl.
Declared in Public/Controls/DreamThrobber.h.
A throbber whose hierarchy is code, not an asset: N pieces that pulse, saying only "something is happening".
ONE CONTROL FOR UMG'S TWO, which is the call this library has already made three times: the progress bar has Bar and Radial rather than two classes, the slider has a Direction rather than two Blueprint presets, the scroll box has an Orientation. The pieces, the period, the colours and the fade are identical between a Throbber and a CircularThrobber; the only thing that differs is where the pieces are put, so that is one enum and not one class. The palette still offers both rows -- they differ by a single property write, exactly like the two sliders.
WHY IT TICKS, WHEN NOTHING ELSE IN THE LIBRARY DOES
Every other animated thing here is a TWEEN: it has a start, an end and a duration, and the tween manager owns the clock. A throbber has none of those -- it runs until somebody takes it off screen -- so a tween would have to be re-started forever, and a looping tween per piece would be N objects the manager walks every frame to do arithmetic this control can do in one pass. So it opts into NativeOnTick (off by default for every widget, see UDreamUserWidget::SetWantsTick) and writes the opacities itself.
That also makes it correct where the tween manager does not exist: the manager is a world subsystem and hands back null in a headless test and in the designer's preview, where a tween-based throbber would simply stand still. This one animates wherever something calls its tick, and holds its first frame where nothing does -- which is a throbber that LOOKS like a throbber in the designer rather than an empty box.
NO PLAY / STOP, for UMG's reason: a throbber is not a timeline. Take it off screen to stop it.
Properties
| Name | Type | Category | In the details panel | From Blueprint | Description |
|---|---|---|---|---|---|
Style | FDreamThrobberStyle | Throbber | yes | GetStyle / SetStyle | This 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. |
Shape | EDreamThrobberShape | Throbber | yes | GetShape / SetShape | A row of pieces, or pieces around a circle. UMG's Throbber and CircularThrobber. |
bAnimate | bool | Throbber | yes | GetAnimate / SetAnimate | Off holds the pieces at the phase they were on. The widget stops ticking with it. |
bAnimateHorizontally | bool | Throbber | yes | GetAnimateHorizontally / SetAnimateHorizontally | Whether a piece also PULSES on that axis -- UMG's bAnimateHorizontally / bAnimateVertically, and Slate's rule for them: the piece is scaled on the ticked axis by the same wave that drives its opacity, so it swells as it brightens and shrinks as it fades. |
bAnimateVertically | bool | Throbber | yes | GetAnimateVertically / SetAnimateVertically | |
PieceRootNode | TObjectPtr<UDreamWidget> | Throbber | - | read only | What the pieces hang under, and the control's one built-in node. |
PieceNodes | TArray<TObjectPtr<UDreamWidget> > | Throbber | - | read only | The pieces, in order. Public because a decorator may want to skin one. |
Functions
| Function | Kind | Description |
|---|---|---|
bool GetAnimate() | pure | Get Animate |
bool GetAnimateHorizontally() | pure | Get Animate Horizontally |
bool GetAnimateOpacity() | pure | Whether the pieces fade at all -- UMG's bAnimateOpacity, read off how faint they are allowed to get: a floor of 1 keeps every piece solid, which is the flag being off. |
bool GetAnimateVertically() | pure | Get Animate Vertically |
int32 GetNumberOfPieces() | pure | The four numbers UMG's two throbbers offer one at a time. |
float GetPeriod() | pure | Get Period |
float GetPhase() | pure | How far through one cycle the animation is, 0 to 1. Authored in; readable out. |
float GetRadius() | pure | Get Radius |
EDreamThrobberShape GetShape() | pure | Get Shape |
FDreamThrobberStyle GetStyle() | pure | Get Style |
void SetAnimate(bool bInAnimate) | callable | Set Animate |
void SetAnimateHorizontally(bool bInAnimateHorizontally) | callable | Turning it OFF re-places every piece at once, because a piece frozen mid-pulse would otherwise keep the width the last tick gave it -- a switch that leaves the thing it switched off in a random state is a switch that looks broken. |
void SetAnimateOpacity(bool bInAnimateOpacity) | callable | Off pins the floor at 1. On restores the style's shipped floor, but only when the floor is currently 1 -- so switching off and on again is not a way to lose a hand-tuned value, and a throbber already fading keeps fading exactly as far as it did. |
void SetAnimateVertically(bool bInAnimateVertically) | callable | Set Animate Vertically |
void SetNumberOfPieces(int32 InNumberOfPieces) | callable | Rebuilds the piece pool, which is what a count IS here. |
void SetPeriod(float InPeriod) | callable | Seconds for one full cycle. Drives the linear shape too, where UMG offers it only on the ring. |
void SetRadius(float InRadius) | callable | How far out the pieces ride. Circular only, as in UMG; the linear shape ignores it. |
void SetShape(EDreamThrobberShape InShape) | callable | Re-places every piece: the two shapes put them in different places, nothing else differs. |
void SetStyle(FDreamThrobberStyle InStyle) | callable | This instance's whole look, replaced and pushed -- which for a throbber means the piece POOL is rebuilt if the count changed. See UDreamButton::SetStyle for the caveat about the sheet. |
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.
| UMG | Member | Status | Here | Note |
|---|---|---|---|---|
UCircularThrobber | NumberOfPieces | map | FDreamThrobberStyle::NumberOfPieces | One control and one style for UMG's two throbbers; Shape = Circular is this class. |
UCircularThrobber | Period | map | FDreamThrobberStyle::Period | Seconds for one full cycle, and it drives the linear shape too -- UMG only offers it on the circular one. |
UCircularThrobber | Radius | map | FDreamThrobberStyle::Radius | How far out the pieces ride, measured from the middle. Circular only, as in UMG. |
UCircularThrobber | Image | map | FDreamThrobberStyle::PieceBrush | See the Throbber table: a piece is a procedural rect, so the brush is its body texture. |
UCircularThrobber | SetNumberOfPieces | adopt | SetNumberOfPieces | One control for UMG's two, so this is the same call the Throbber table lists. |
UCircularThrobber | SetPeriod | adopt | SetPeriod | Drives the linear shape too, where UMG offers it only on the ring. |
UCircularThrobber | SetRadius | adopt | SetRadius | Circular only, as in UMG; the linear shape ignores it. |
UCircularThrobber | bEnableRadius | reject | The inline tick beside UMG's Radius, and Transient there: it exists so an unticked radius falls back to the Slate style's. A radius here is always the style's own number, so there is nothing for a tick to choose between. | |
UThrobber | NumberOfPieces | map | FDreamThrobberStyle::NumberOfPieces | In the style: how many dots a project's spinners have is a theme decision, and the control rebuilds its piece pool on every push. |
UThrobber | bAnimateHorizontally | adopt | bAnimateHorizontally | Slate's rule, kept: the piece is SCALED on the ticked axis by the same wave that drives its opacity, so it swells as it brightens. One wave for both rather than a second clock. Off by default, which is what this throbber has always drawn. |
UThrobber | bAnimateVertically | adopt | bAnimateVertically | |
UThrobber | bAnimateOpacity | map | FDreamThrobberStyle::MinOpacity | A float where UMG has a bool, and it says more: MinOpacity 1 is UMG's bAnimateOpacity off (every piece stays solid), and anything less is how faint a piece gets at the bottom of its cycle. GetAnimateOpacity / SetAnimateOpacity spell UMG's bool over it. |
UThrobber | Image | map | FDreamThrobberStyle::PieceBrush | FDreamUIFaceBrush rather than FSlateBrush -- a piece is a procedural rect and the brush is its body texture. Empty is the plain rounded dot. |
UThrobber | SetNumberOfPieces | adopt | SetNumberOfPieces | Rebuilds the piece pool, which is what a count IS here. Edits this instance's style; see UDreamBorder::SetPadding for the caveat about a project sheet. |
UThrobber | SetAnimateHorizontally | adopt | SetAnimateHorizontally | Turning it off re-places every piece, so a piece frozen mid-pulse does not keep the width the last tick gave it. |
UThrobber | SetAnimateVertically | adopt | SetAnimateVertically | |
UThrobber | SetAnimateOpacity | adopt | SetAnimateOpacity | Off pins the floor at 1; on restores the shipped floor only when the floor is currently 1, so switching off and on is not a way to lose a hand-tuned value. |
UThrobber | SetStyle | adopt | SetStyle | UThrobber has no style struct; this is the family's spelling, and the one call that rebuilds the piece pool. |