Navigation
API > API/Runtime > API/Runtime/SlateCore
A sequence of curves that can be used to drive animations for slate widgets. Active timer registration is handled for the widget being animated when calling play.
Each curve within the sequence has a time offset and a duration. This makes FCurveSequence convenient for crating staggered animations. e.g. // We want to zoom in a widget, and then fade in its contents. FCurveHandle ZoomCurve = Sequence.AddCurve( 0, 0.15f ); FCurveHandle FadeCurve = Sequence.AddCurve( 0.15f, 0.1f ); Sequence.Play( this->AsShared() );
| Name | FCurveSequence |
| Type | struct |
| Header File | /Engine/Source/Runtime/SlateCore/Public/Animation/CurveSequence.h |
| Include Path | #include "Animation/CurveSequence.h" |
Syntax
struct FCurveSequence : public TSharedFromThis< FCurveSequence >
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → FCurveSequence
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FCurveSequence
(
const float InStartTimeSeconds, |
Construct by adding a single animation curve to this sequence. | Animation/CurveSequence.h | |
| Default constructor | Animation/CurveSequence.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FCurveSequence() |
Makes sure the active timer is unregistered | Animation/CurveSequence.h |
Structs
| Name | Remarks |
|---|---|
| FSlateCurve | A curve has a time offset and duration. |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActiveTimerHandle | TWeakPtr< FActiveTimerHandle > | The handle to the active timer | Animation/CurveSequence.h | |
| bInReverse | uint8 | Are we playing the animation in reverse | Animation/CurveSequence.h | |
| bIsLooping | uint8 | Is the sequence playing on a loop? | Animation/CurveSequence.h | |
| bIsPaused | uint8 | Is the sequence currently paused? | Animation/CurveSequence.h | |
| Curves | TArray< FSlateCurve > | All the curves in this sequence. | Animation/CurveSequence.h | |
| OwnerWidget | TWeakPtr< SWidget > | Weak reference to the owner widget that is being animated by this curve sequence. | Animation/CurveSequence.h | |
| PauseTime | double | When the curve was paused | Animation/CurveSequence.h | |
| StartTime | double | When the curve started playing. | Animation/CurveSequence.h | |
| TickerHandle | FTSTicker::FDelegateHandle | Handle to the ticker based player. | Animation/CurveSequence.h | |
| TotalDuration | double | How long the entire sequence lasts. | Animation/CurveSequence.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FCurveHandle AddCurve
(
const float InStartTimeSeconds, |
Add a new curve at a given time and offset. | Animation/CurveSequence.h | |
FCurveHandle AddCurveRelative
(
const float InOffset, |
Add a new curve relative to the current end of the sequence. | Animation/CurveSequence.h | |
const FCurveSequence::FSlateCurve & GetCurve
(
int32 CurveIndex |
Animation/CurveSequence.h | ||
float GetLerp () |
For single-curve animations, returns the interpolation alpha for the animation. | Animation/CurveSequence.h | |
float GetSequenceTime() |
Animation/CurveSequence.h | ||
bool IsAtEnd() |
Is the sequence at the end? | Animation/CurveSequence.h | |
bool IsAtStart() |
Is the sequence at the start? | Animation/CurveSequence.h | |
bool IsForward() |
Animation/CurveSequence.h | ||
bool IsInReverse() |
Animation/CurveSequence.h | ||
bool IsLooping() |
Is the sequence looping? | Animation/CurveSequence.h | |
bool IsPlaying() |
Checks whether the sequence is currently playing. | Animation/CurveSequence.h | |
void JumpToEnd() |
Jumps immediately to the end of the animation sequence | Animation/CurveSequence.h | |
void JumpToStart() |
Jumps immediately to the beginning of the animation sequence | Animation/CurveSequence.h | |
void Pause() |
Pause this curve sequence. | Animation/CurveSequence.h | |
void Play
(
const FTickerDelegate& InDelegate, |
Plays the curve sequence for a ticker, rather than a widget. | Animation/CurveSequence.h | |
void Play
(
const TSharedRef< SWidget >& InOwnerWidget, |
Start playing this curve sequence. Registers an active timer with the widget being animated. | Animation/CurveSequence.h | |
void PlayRelative
(
const TSharedRef< SWidget >& InOwnerWidget, |
Plays forward if it can, otherwise holds it at the end of the animation, if we play in reverse it will reverse the animation if it can | Animation/CurveSequence.h | |
void PlayReverse
(
const TSharedRef< SWidget >& InOwnerWidget, |
Start playing this curve sequence in reverse. | Animation/CurveSequence.h | |
void Resume() |
Unpause this curve sequence to resume play. | Animation/CurveSequence.h | |
void Reverse() |
Reverse the direction of an in-progress animation | Animation/CurveSequence.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void SetStartTime
(
double InStartTime |
Animation/CurveSequence.h |