SRIATParams, TItemViewsHolderSmoothScrollTo Method |
Utility to smooth scroll. Identical to
ScrollTo(Int32, Single, Single) in functionality, but the scroll is animated (scroll is done gradually, throughout multiple frames)
Namespace:
frame8.Logic.Misc.Visual.UI.ScrollRectItemsAdapter
Assembly:
Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntaxpublic virtual bool SmoothScrollTo(
int itemIndex,
float duration,
float normalizedOffsetFromViewportStart = 0f,
float normalizedPositionOfItemPivotToUse = 0f,
Func<float, bool> onProgress = null,
bool overrideCurrentScrollingAnimation = false
)
Parameters
- itemIndex
- Type: SystemInt32
- duration
- Type: SystemSingle
- normalizedOffsetFromViewportStart (Optional)
- Type: SystemSingle
- normalizedPositionOfItemPivotToUse (Optional)
- Type: SystemSingle
- onProgress (Optional)
- Type: SystemFuncSingle, Boolean
gets the progress (0f..1f) and returns if the scrolling should continue - overrideCurrentScrollingAnimation (Optional)
- Type: SystemBoolean
Return Value
Type:
Booleanif no smooth scroll animation was already playing and
overrideCurrentScrollingAnimation is false. if it was, then no new animation will begin, except if
overrideCurrentScrollingAnimation is true
Implements
ISRIASmoothScrollTo(Int32, Single, Single, Single, FuncSingle, Boolean, Boolean)
Version InformationOptimized ScrollView Adapter
Supported in: 3.1
See Also