Class SlideInEffect
Slides a region's content in from one edge, as though it were being pushed into place.
Inherited Members
Namespace: Scylla.TextMode
Assembly: ScyllaTextMode.dll
Syntax
public sealed class SlideInEffect : TextEffectBase, ITextEffect, IDisposable
Remarks
The region is captured when the effect starts and then drawn at an offset that closes to zero, so draw the content first and play the effect over it. Cells the content has not reached yet are filled with a blank, which by default takes its colors from the content's own first cell so the region does not flash a different background.
Movement is in whole cells, because a text grid has no smaller step. A long slide across a short distance therefore moves in visible jumps; that is a property of the medium rather than of the timing.
Properties
From
Gets or sets the edge the content travels in from. A value of LeftToRight means the content enters at the left edge and moves right.
Declaration
public TextEffectDirection From { get; set; }
Property Value
| Type | Description |
|---|---|
| TextEffectDirection |
Methods
OnEffectFinish(bool)
Called when the effect finishes, whether it completed, was skipped or was stopped.
Declaration
protected override void OnEffectFinish(bool completed)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | completed | True when the effect reached its final state. |
Overrides
Remarks
The default implementation does nothing. Override it to restore state an effect borrowed, which is what a corrupting effect needs so the grid is not left damaged.
OnEffectRelease()
Called when the effect is disposed. Return anything rented from the context here.
Declaration
protected override void OnEffectRelease()
Overrides
OnEffectStart()
Called when the effect starts, after the region is resolved and before any tick. Capture whatever the effect needs from the grid here.
Declaration
protected override void OnEffectStart()
Overrides
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
SetFill(Color32, Color32)
Sets the colors drawn where the content has not arrived yet.
Declaration
public SlideInEffect SetFill(Color32 foreground, Color32 background)
Parameters
| Type | Name | Description |
|---|---|---|
| Color32 | foreground | Foreground color for the empty area. |
| Color32 | background | Background color for the empty area. |
Returns
| Type | Description |
|---|---|
| SlideInEffect | This effect, for chaining. |
SetFrom(TextEffectDirection)
Sets the edge the content travels in from.
Declaration
public SlideInEffect SetFrom(TextEffectDirection from)
Parameters
| Type | Name | Description |
|---|---|---|
| TextEffectDirection | from | The edge to enter from. |
Returns
| Type | Description |
|---|---|
| SlideInEffect | This effect, for chaining. |