Scylla Framework
  • API Reference
Search Results for

    Show / Hide Table of Contents
    • Scylla.Console.TextMode
      • IConsoleScreen
      • TextModeDebugConsoleDisplay
      • TicTacToeCommand
      • TicTacToeScreen
    • Scylla.TextMode
      • ANSIAttributeParser
      • ANSIColor
      • ANSISGRAttributes
      • AmbientEffectBase
      • BackgroundBlendMode
      • BoxStyle
      • BoxStyleCharacters
      • BoxStyleCharacters.BoxChars
      • CRTSettings
      • Cell
      • CellAttributes
      • CellAttributesExtensions
      • CellBuffer
      • CellBufferRenderer
      • CellGrid
      • CellMask
      • CellPosition
      • CellRange
      • CellRect
      • ColorCycleEffect
      • ColorCycleEffectPreset
      • CrossFadeEffect
      • CursorStyle
      • DecodeEffect
      • DecodeEffectPreset
      • DigitalRainEffect
      • DigitalRainEffectPreset
      • EffectsSettings
      • FadeEffect
      • FadeEffectPreset
      • FlickerEffect
      • FlickerEffectPreset
      • GlitchEffect
      • GlitchEffectPreset
      • GlyphAtlasCache
      • GridSettings
      • IAutoCompleter
      • IInputHistory
      • ITextEffect
      • ITextEffectContext
      • ITextModeGridProvider
      • ITextModePointerMapper
      • ITextModeRenderSource
      • ITextModeViewHost
      • IVTParserHandler
      • InputHistory
      • MaskTransitionEffect
      • MouseEncodingMode
      • MouseTrackingMode
      • PackedGlyphData
      • PulseEffect
      • PulseEffectPreset
      • PushEffect
      • PushEffectPreset
      • SDFSettings
      • ScrollbackAttributeRun
      • ScrollbackLine
      • ScyllaTextMode
      • ScyllaTextMode.Meta
      • ScyllaTextModeConfiguration
      • SlideInEffect
      • SlideInEffectPreset
      • StaticTuneInEffect
      • StaticTuneInEffectPreset
      • TerminalCLI
      • TerminalEmulator
      • TerminalGridRenderer
      • TerminalInputEncoder
      • TerminalMouseButton
      • TerminalScrollbackBuffer
      • TerminalSettings
      • TextAlignment
      • TextEffectBase
      • TextEffectCompletedEvent
      • TextEffectDirection
      • TextEffectExtensions
      • TextEffectMaskPattern
      • TextEffectPreset
      • TextEffectPushMode
      • TextEffectSequencer
      • TextEffectStartedEvent
      • TextEffectState
      • TextEffectTimeMode
      • TextEffects
      • TextModeCellBorder
      • TextModeColorDefaults
      • TextModeColorScheme
      • TextModeColorSet
      • TextModeConfigurationChangedEvent
      • TextModeConsole
      • TextModeConstants
      • TextModeEffectPlayer
      • TextModeGridCapture
      • TextModeLayoutUtil
      • TextModeMaterials
      • TextModeMouseReporter
      • TextModeMouseReportingEvent
      • TextModeSelectionChangedEvent
      • TextModeSelectionEndedEvent
      • TextModeSelectionManager
      • TextModeSelectionStartedEvent
      • TextModeTerminal
      • TextModeTerminalColorTheme
      • TextModeTerminalHost
      • TextModeTerminalSettings
      • TextModeTerminalStartMode
      • TextModeThemeBackground
      • TextModeThemeChangedEvent
      • TextModeThemeRemapper
      • TextModeThemes
      • TextModeView
      • TextWrapMode
      • ThemeSettings
      • TransitionEffectBase
      • TransitionEffectPreset
      • TwinkleEffect
      • TwinkleEffectPreset
      • TypewriterCharacterRevealedEvent
      • TypewriterEffect
      • TypewriterEffectPreset
      • UITextModeView
      • VTParser
      • WaveEffect
      • WaveEffectPreset
    • Scylla.TextMode.CRT
      • CRTBeam
      • CRTBeamClock
      • CRTBeamScanDirection
      • CRTBeamStatus
      • CRTCalibrationPattern
      • CRTCurvatureShape
      • CRTGeometry
      • CRTHDR
      • CRTHDRDisplay
      • CRTHDRTarget
      • CRTHorizontalKernel
      • CRTImageRegion
      • CRTMaskType
      • CRTQualityTier
      • CRTScaleMode
      • CRTSignalStandard
      • CRTSignalType
      • ITextModeCRTCameraEffect
      • ITextModeCRTHDRDisplaySource
      • TextModeCRTBeam
      • TextModeCRTCalibration
      • TextModeCRTCameraEffects
      • TextModeCRTConstants
      • TextModeCRTDriver
      • TextModeCRTHDR
      • TextModeCRTImageRenderer
      • TextModeCRTMonitor
      • TextModeCRTPreset
      • TextModeCRTPresetRegistry
      • TextModeCRTScreen
      • TextModeCRTSettings
      • TextModeCRTTube
    • Scylla.TextMode.Editor
      • CellGridPreviewWidget
      • ColorPaletteWidget
      • ITextModeCRTCameraSetupProvider
      • ScyllaTextModeConfigurationEditor
      • ScyllaTextModeDependencyProvider
      • ScyllaTextModeEditor
      • ScyllaTextModeMenuItems
      • ScyllaTextModeShaderProvider
      • TextModeCRTCameraSetup
      • TextModeCRTCameraStatus
      • TextModeCRTDriverEditor
      • TextModeCRTMonitorEditor
      • TextModeCRTPresetEditor
      • TextModeCRTPresetGenerator
      • TextModeColorAssetGenerator
      • TextModeColorPaletteDefaults
      • TextModeTerminalHostEditor
      • TextModeThemeField
      • TextModeViewEditor
      • TextModeViewEditorBase
      • UITextModeViewEditor
    • Scylla.TextMode.URP
      • CRTQualityTierParameter
      • TextModeCRTInjectionPoint
      • TextModeCRTPresetParameter
      • TextModeCRTRendererFeature
      • TextModeCRTVolume

    Class TransitionEffectBase

    Base class for effects that move a region from what is on screen now to something else.

    Inheritance
    object
    TextEffectBase
    TransitionEffectBase
    CrossFadeEffect
    DigitalRainEffect
    MaskTransitionEffect
    PushEffect
    StaticTuneInEffect
    Implements
    ITextEffect
    IDisposable
    Inherited Members
    TextEffectBase.Name
    TextEffectBase.State
    TextEffectBase.IsRunning
    TextEffectBase.IsComplete
    TextEffectBase.Progress
    TextEffectBase.Region
    TextEffectBase.RequestedRegion
    TextEffectBase.Duration
    TextEffectBase.Delay
    TextEffectBase.Speed
    TextEffectBase.Ease
    TextEffectBase.TimeMode
    TextEffectBase.Loops
    TextEffectBase.PingPong
    TextEffectBase.CompletedLoops
    TextEffectBase.Seed
    TextEffectBase.Mask
    TextEffectBase.CellDuration
    TextEffectBase.Context
    TextEffectBase.ResolvedRegion
    TextEffectBase.EasedProgress
    TextEffectBase.DeltaSinceLastTick
    TextEffectBase.OnStarted
    TextEffectBase.OnCompleted
    TextEffectBase.OnStopped
    TextEffectBase.Start()
    TextEffectBase.Stop()
    TextEffectBase.Skip()
    TextEffectBase.Pause()
    TextEffectBase.Resume()
    TextEffectBase.Tick(float)
    TextEffectBase.Dispose()
    TextEffectBase.OnEffectTick(float, float)
    TextEffectBase.TryPutChar(int, int, uint, Color32, Color32, CellAttributes)
    TextEffectBase.TryWriteCell(int, int, in Cell)
    TextEffectBase.EnsureThresholds()
    TextEffectBase.ReleaseThresholds()
    TextEffectBase.CellProgress(float, int, int)
    TextEffectBase.ResolveDrawableGlyphs(string)
    TextEffectBase.CellThreshold(int, int)
    TextEffectBase.TryReadCell(int, int, out Cell)
    TextEffectBase.MarkRegionDirty()
    TextEffectBase.WarnIfMaskIsIgnored()
    TextEffectBase.SetDefaultMask(in CellMask)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Scylla.TextMode
    Assembly: ScyllaTextMode.dll
    Syntax
    public abstract class TransitionEffectBase : TextEffectBase, ITextEffect, IDisposable
    Remarks

    Every transition needs two pictures: the region as it looks when the effect starts, and the region as it should look when the effect ends. The first is captured automatically. The second is supplied in one of three ways, and a transition given none of them transitions to a blank region, which is what a fade to black wants.

    effect.To(console => DrawInventoryScreen(console));   // draw it on demand
    effect.To(someOtherGrid);                              // copy it from a grid
    effect.ToCleared(green, black);                        // transition to blank

    The draw callback is the usual choice. It runs once when the effect starts, against a scratch grid the same size as the real one, and receives full-grid coordinates, so the same drawing code that paints a screen normally can paint the target of a transition.

    Properties

    FromState

    Gets the region as it looked when the effect started. Valid from OnTransitionStart() onward.

    Declaration
    protected CellBuffer FromState { get; }
    Property Value
    Type Description
    CellBuffer

    ToState

    Gets the region as it should look when the effect ends. Valid from OnTransitionStart() onward.

    Declaration
    protected CellBuffer ToState { get; }
    Property Value
    Type Description
    CellBuffer

    Methods

    OnEffectFinish(bool)

    Called when the effect finishes, whether it completed, was skipped or was stopped.

    Declaration
    protected override sealed void OnEffectFinish(bool completed)
    Parameters
    Type Name Description
    bool completed

    True when the effect reached its final state.

    Overrides
    TextEffectBase.OnEffectFinish(bool)
    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
    TextEffectBase.OnEffectRelease()

    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 sealed void OnEffectStart()
    Overrides
    TextEffectBase.OnEffectStart()

    OnTransitionFinish(bool)

    Called when the effect finishes, before the target state is written.

    Declaration
    protected virtual void OnTransitionFinish(bool completed)
    Parameters
    Type Name Description
    bool completed

    True when the effect reached its final state.

    OnTransitionStart()

    Called when the effect starts, after both the starting and target states are ready.

    Declaration
    protected virtual void OnTransitionStart()

    SetClearedTarget(Color32, Color32)

    Transitions to a blank region in the given colors.

    Declaration
    public void SetClearedTarget(Color32 foreground, Color32 background)
    Parameters
    Type Name Description
    Color32 foreground

    Foreground color of the blank cells.

    Color32 background

    Background color of the blank cells.

    SetTarget(CellGrid)

    Transitions to the matching region of another grid.

    Declaration
    public void SetTarget(CellGrid grid)
    Parameters
    Type Name Description
    CellGrid grid

    Grid holding the target state.

    SetTarget(Action<TextModeConsole>)

    Transitions to whatever the callback draws.

    Declaration
    public void SetTarget(Action<TextModeConsole> draw)
    Parameters
    Type Name Description
    Action<TextModeConsole> draw

    Callback that paints the target state.

    Remarks

    The callback runs once, when the effect starts, against a scratch grid rather than the live one. It is handed full-grid coordinates, so ordinary drawing code works unchanged.

    Implements

    ITextEffect
    IDisposable

    Extension Methods

    TextEffectExtensions.OnComplete<T>(T, Action)
    TextEffectExtensions.OnStart<T>(T, Action)
    TextEffectExtensions.OnStop<T>(T, Action)
    TextEffectExtensions.SetCellDuration<T>(T, float)
    TextEffectExtensions.SetDelay<T>(T, float)
    TextEffectExtensions.SetDuration<T>(T, float)
    TextEffectExtensions.SetEase<T>(T, EaseType)
    TextEffectExtensions.SetFullGrid<T>(T)
    TextEffectExtensions.SetLoops<T>(T, int, bool)
    TextEffectExtensions.SetMask<T>(T, in CellMask)
    TextEffectExtensions.SetName<T>(T, string)
    TextEffectExtensions.SetRegion<T>(T, in CellRect)
    TextEffectExtensions.SetRegion<T>(T, int, int, int, int)
    TextEffectExtensions.SetSeed<T>(T, int)
    TextEffectExtensions.SetSpeed<T>(T, float)
    TextEffectExtensions.SetTimeMode<T>(T, TextEffectTimeMode)
    TextEffectExtensions.ToCleared<T>(T, Color32, Color32)
    TextEffectExtensions.To<T>(T, CellGrid)
    TextEffectExtensions.To<T>(T, Action<TextModeConsole>)
    In this article
    Back to top Scylla Framework - TextMode Module API Documentation