Class ScrollTextAreaDragEndedEvent
Event published by a ScrollTextArea when the user releases a drag-scroll gesture (pointer up). Carries the final scroll position and the pointer velocity at release, which can be used to implement momentum (inertial) scrolling.
Inherited Members
Namespace: Scylla.Core.Util.UI
Assembly: ScyllaCore.dll
Syntax
public sealed class ScrollTextAreaDragEndedEvent : ScyllaEvent
Constructors
ScrollTextAreaDragEndedEvent(ScrollTextArea, float, float)
Initializes a new ScrollTextAreaDragEndedEvent recording the scroll area, its final scroll position, and the pointer velocity at release.
Declaration
public ScrollTextAreaDragEndedEvent(ScrollTextArea scrollTextArea, float scrollPosition, float velocity)
Parameters
| Type | Name | Description |
|---|---|---|
| ScrollTextArea | scrollTextArea | The ScrollTextArea where the drag ended. |
| float | scrollPosition | The scroll position (in pixels) at drag end. |
| float | velocity | The pointer velocity (in pixels per second) at drag end. |
Properties
ScrollPosition
Gets the pixel scroll position at the moment the drag gesture ended. Measured from the top of the content area (0 = fully scrolled to top).
Declaration
public float ScrollPosition { get; }
Property Value
| Type | Description |
|---|---|
| float |
ScrollTextArea
Gets the ScrollTextArea on which the drag ended.
Declaration
public ScrollTextArea ScrollTextArea { get; }
Property Value
| Type | Description |
|---|---|
| ScrollTextArea |
Velocity
Gets the pointer velocity (in pixels per second) at the moment the drag ended. A positive value indicates downward motion; negative indicates upward. Used by momentum scrolling implementations to continue movement after release.
Declaration
public float Velocity { get; }
Property Value
| Type | Description |
|---|---|
| float |