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 TicTacToeCommand

    Starts a game of tic-tac-toe that takes over the console, demonstrating a full screen driven from a console command.

    Inheritance
    object
    ConsoleCommandBase
    TicTacToeCommand
    Implements
    IConsoleCommand
    IConsoleCommandHelp
    Inherited Members
    ConsoleCommandBase.Aliases
    ConsoleCommandBase.Parameters
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Scylla.Console.TextMode
    Assembly: ScyllaTextMode.ConsoleDisplay.dll
    Syntax
    public sealed class TicTacToeCommand : ConsoleCommandBase, IConsoleCommand, IConsoleCommandHelp
    Remarks

    Syntax: tictactoe. Takes no arguments. The game replaces the console's log for as long as it runs and gives it back untouched on Q.

    Requires the Terminal Emulation display backend, because a screen needs a character grid to draw into and the TextMeshPro backends render the log as one styled string. On those the command reports what is needed rather than failing obscurely.

    Registered by the ConsoleDisplay bridge, so the command exists exactly when the TextMode module is present, which is also exactly when it can run.

    Properties

    Description

    Gets a short, single-line description of what the command does, shown next to its name in the full command listing produced by the built-in help command.

    Declaration
    public override string Description { get; }
    Property Value
    Type Description
    string
    Overrides
    Scylla.Console.ConsoleCommandBase.Description

    Examples

    Example invocations shown in this command's own help entry.

    Declaration
    public override ReadOnlySpan<ConsoleCommandExample> Examples { get; }
    Property Value
    Type Description
    ReadOnlySpan<ConsoleCommandExample>
    Overrides
    Scylla.Console.ConsoleCommandBase.Examples

    Name

    Gets the primary, case-insensitive name used to invoke the command, for example time.scale. This is also the identity the registry checks when rejecting a duplicate registration, and the name a command must be unregistered by.

    Declaration
    public override string Name { get; }
    Property Value
    Type Description
    string
    Overrides
    Scylla.Console.ConsoleCommandBase.Name

    Summary

    The explanation shown in this command's own help entry.

    Declaration
    public override string Summary { get; }
    Property Value
    Type Description
    string
    Overrides
    Scylla.Console.ConsoleCommandBase.Summary

    Usage

    Gets the usage pattern shown when the command is invoked with the wrong number of arguments (see InvalidArgs(string)) and in the command's individual help entry. Defaults to Scylla.Console.ConsoleCommandBase.Name; override this for a command that takes arguments so the usage string documents them, for example "scene.load <name> [--additive] [--manual]".

    Declaration
    public override string Usage { get; }
    Property Value
    Type Description
    string
    Overrides
    Scylla.Console.ConsoleCommandBase.Usage

    Methods

    Execute(ConsoleCommandArgs, IConsoleCommandContext)

    Executes the command with the given arguments and context.

    Declaration
    public override ConsoleCommandResult Execute(ConsoleCommandArgs args, IConsoleCommandContext context)
    Parameters
    Type Name Description
    ConsoleCommandArgs args

    The arguments parsed from the command line, following the command name itself.

    IConsoleCommandContext context

    The execution context, used to write output, look up other commands, or inspect history.

    Returns
    Type Description
    ConsoleCommandResult

    A Scylla.Console.ConsoleCommandResult describing the outcome. Return Scylla.Console.ConsoleCommandResult.Success() or a variant carrying a message for the ordinary case, InvalidArgs(string) when args does not match what the command expects, and Error(string) for any other failure.

    Overrides
    Scylla.Console.ConsoleCommandBase.Execute(Scylla.Console.ConsoleCommandArgs, Scylla.Console.IConsoleCommandContext)
    Remarks

    Scylla.Console.ConsoleCommandExecutor calls this once per invocation, on the main thread, after successfully parsing the input and looking up the command by name. An implementation should prefer returning an error result over throwing for an expected failure, such as a bad argument or a missing dependency, since a returned result carries a clean message to the console while an exception is only caught, logged, and reported as a generic failure by the executor.

    Implements

    Scylla.Console.IConsoleCommand
    Scylla.Console.IConsoleCommandHelp

    See Also

    TicTacToeScreen
    IConsoleScreen
    In this article
    Back to top Scylla Framework - TextMode Module API Documentation