Navigation
API > API/Runtime > API/Runtime/Slate > API/Runtime/Slate/Framework > API/Runtime/Slate/Framework/Layout
References
| Module | Slate |
| Header | /Engine/Source/Runtime/Slate/Public/Framework/Layout/InertialScrollManager.h |
| Include | #include "Framework/Layout/InertialScrollManager.h" |
Syntax
class FInertialScrollManager
Remarks
A helper class to calculate inertial scrolling. This class combines a percentage of velocity lost per second coupled with a static amount of velocity lost per second in order to achieve a quick decay when the velocity grows small enough, and the percentage of friction lost prevents large velocities from scrolling forever.
Constructors
| Type | Name | Description | |
|---|---|---|---|
FInertialScrollManager
(
double SampleTimeout |
Constructor |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddScrollSample
(
float Delta, |
Adds a scroll velocity sample to help calculate a smooth velocity | |
| void | Instantly end the inertial scroll | ||
| float | Gets the calculated velocity of the scroll. | ||
| void | UpdateScrollVelocity
(
const float InDeltaTime |
Updates the current scroll velocity. Call every frame. |
Constants
| Name | Description |
|---|---|
| FrictionCoefficient | This is the percentage of velocity loss per second. |
| StaticVelocityDrag | This is a constant amount of velocity lost per second. |