UDocumentation
UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
InertialScrollManager.h
Go to the documentation of this file.
1
// Copyright Epic Games, Inc. All Rights Reserved.
2
3
#pragma once
4
5
#include "Containers/Array.h"
6
#include "
CoreMinimal.h
"
7
14
class
FInertialScrollManager
15
{
16
17
public
:
23
SLATE_API
FInertialScrollManager
(
double
SampleTimeout = 0.1f);
24
26
SLATE_API
void
AddScrollSample
(
float
Delta
,
double
CurrentTime);
27
29
SLATE_API
void
UpdateScrollVelocity
(
const
float
InDeltaTime
);
30
35
SLATE_API
void
ClearScrollVelocity
(
bool
bInShouldStopScrollNow
=
false
);
36
38
float
GetScrollVelocity
()
const
{
return
ScrollVelocity; }
39
41
bool
GetShouldStopScrollNow
()
const
{
return
bShouldStopScrollNow; }
42
44
void
ResetShouldStopScrollNow
() { bShouldStopScrollNow =
false
; }
45
46
private
:
47
struct
FScrollSample
48
{
49
double
Time
;
50
float
Delta;
51
52
FScrollSample(
float
InDelta
,
double
InTime
)
53
:
Time
(
InTime
)
54
, Delta(
InDelta
)
55
{}
56
};
57
59
TArray<FScrollSample>
ScrollSamples;
60
62
float
ScrollVelocity;
63
65
bool
bShouldStopScrollNow =
false
;
66
68
double
SampleTimeout;
69
};
CoreMinimal.h
StaticCastSharedRef
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition
SharedPointer.h:127
EReplayCheckpointType::Delta
@ Delta
EUnitType::Time
@ Time
FInertialScrollManager
Definition
InertialScrollManager.h:15
FInertialScrollManager::ResetShouldStopScrollNow
void ResetShouldStopScrollNow()
Definition
InertialScrollManager.h:44
FInertialScrollManager::AddScrollSample
SLATE_API void AddScrollSample(float Delta, double CurrentTime)
Definition
InertialScrollManager.cpp:26
FInertialScrollManager::GetScrollVelocity
float GetScrollVelocity() const
Definition
InertialScrollManager.h:38
FInertialScrollManager::ClearScrollVelocity
SLATE_API void ClearScrollVelocity(bool bInShouldStopScrollNow=false)
Definition
InertialScrollManager.cpp:78
FInertialScrollManager::GetShouldStopScrollNow
bool GetShouldStopScrollNow() const
Definition
InertialScrollManager.h:41
FInertialScrollManager::UpdateScrollVelocity
SLATE_API void UpdateScrollVelocity(const float InDeltaTime)
Definition
InertialScrollManager.cpp:63
TArray
Definition
Array.h:670
Engine
Source
Runtime
Slate
Public
Framework
Layout
InertialScrollManager.h
Generated by
1.9.8