Class PushEffect
Moves a region from one screen to another by sliding them past each other.
Inherited Members
Namespace: Scylla.TextMode
Assembly: ScyllaTextMode.dll
Syntax
public sealed class PushEffect : TransitionEffectBase, ITextEffect, IDisposable
Remarks
Three arrangements are available. In Push the two screens travel together as though joined, so the old one leaves exactly as fast as the new one arrives. In Cover the new screen slides over a stationary old one, and in Uncover the old one slides away to reveal a stationary new one.
Movement is in whole cells, because a text grid has no smaller step, and nothing is written on a frame where the offset has not changed. Over a long slide that is most frames.
Properties
From
Gets or sets the edge the new screen travels in from. A value of LeftToRight means it enters at the left and moves right.
Declaration
public TextEffectDirection From { get; set; }
Property Value
| Type | Description |
|---|---|
| TextEffectDirection |
Mode
Gets or sets how the two screens move relative to each other.
Declaration
public TextEffectPushMode Mode { get; set; }
Property Value
| Type | Description |
|---|---|
| TextEffectPushMode |
Methods
OnEffectTick(float, float)
Called once per tick to draw the effect at the given progress.
Declaration
protected override void OnEffectTick(float progress, float easedProgress)
Parameters
| Type | Name | Description |
|---|---|---|
| float | progress | Linear progress from 0 to 1. |
| float | easedProgress | Progress with the easing curve applied. |
Overrides
OnTransitionStart()
Called when the effect starts, after both the starting and target states are ready.
Declaration
protected override void OnTransitionStart()
Overrides
SetFrom(TextEffectDirection)
Sets the edge the new screen travels in from.
Declaration
public PushEffect SetFrom(TextEffectDirection from)
Parameters
| Type | Name | Description |
|---|---|---|
| TextEffectDirection | from | The edge to enter from. |
Returns
| Type | Description |
|---|---|
| PushEffect | This effect, for chaining. |
SetMode(TextEffectPushMode)
Sets how the two screens move relative to each other.
Declaration
public PushEffect SetMode(TextEffectPushMode mode)
Parameters
| Type | Name | Description |
|---|---|---|
| TextEffectPushMode | mode | The arrangement to use. |
Returns
| Type | Description |
|---|---|
| PushEffect | This effect, for chaining. |