FCurveSequence

A sequence of curves that can be used to drive animations for slate widgets.

Windows
MacOS
Linux

Inheritance Hierarchy

TSharedFromThis

FCurveSequence

References

Module

SlateCore

Header

/Engine/Source/Runtime/SlateCore/Public/Animation/CurveSequence.h

Include

#include "Animation/CurveSequence.h"

Syntax

struct FCurveSequence : public TSharedFromThis< FCurveSequence >

Remarks

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() );

Constructors

Name Description

Public function

FCurveSequence()

Default constructor

Public function

FCurveSequence

(
    const float InStartTimeSeconds,
    const float InDurationSeconds,
    const ECurveEaseFunction InEaseFunc...
)

Construct by adding a single animation curve to this sequence.

Destructors

Name Description

Public function

~FCurveSequence()

Makes sure the active timer is unregistered

Functions

Name Description

Public function

FCurveHandle

 

AddCurve

(
    const float InStartTimeSeconds,
    const float InDurationSeconds,
    const ECurveEaseFunction InEaseFunc...
)

Add a new curve at a given time and offset.

Public function

FCurveHandle

 

AddCurveRelative

(
    const float InOffset,
    const float InDurationSecond,
    const ECurveEaseFunction InEaseFunc...
)

Add a new curve relative to the current end of the sequence.

Public function Const

const FCurve...

 

GetCurve

(
    int32 CurveIndex
)

Public function Const

float

 

GetLerp()

For single-curve animations, returns the interpolation alpha for the animation.

Public function Const

float

 

GetSequenceTime()

Public function Const

bool

 

IsAtEnd()

Is the sequence at the end?

Public function Const

bool

 

IsAtStart()

Is the sequence at the start?

Public function Const

bool

 

IsForward()

Public function Const

bool

 

IsInReverse()

Public function Const

bool

 

IsLooping()

Is the sequence looping?

Public function Const

bool

 

IsPlaying()

Checks whether the sequence is currently playing.

Public function

void

 

JumpToEnd()

Jumps immediately to the end of the animation sequence

Public function

void

 

JumpToStart()

Jumps immediately to the beginning of the animation sequence

Public function

void

 

Pause()

Pause this curve sequence.

Public function

void

 

Play

(
    const FTickerDelegate& InDelegate,
    bool bPlayLooped,
    const float StartAtTime
)

Plays the curve sequence for a ticker, rather than a widget.

Public function

void

 

Play

(
    const TSharedRef< SWidget >& InOwn...,
    bool bPlayLooped,
    const float StartAtTime,
    bool bRequiresActiveTimer
)

Start playing this curve sequence. Registers an active timer with the widget being animated.

Public function

void

 

PlayReverse

(
    const TSharedRef< SWidget >& InOwn...,
    bool bPlayLooped,
    const float StartAtTime,
    bool bRequiresActiveTimer
)

Start playing this curve sequence in reverse.

Public function

void

 

Resume()

Unpause this curve sequence to resume play.

Public function

void

 

Reverse()

Reverse the direction of an in-progress animation

Protected function

void

 

SetStartTime

(
    double InStartTime
)

Classes

Name

Description

Public struct

FSlateCurve

A curve has a time offset and duration.

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