Class ParseCommandDecorator
Sets the mirror of a glyph.
Inherited Members
Namespace: SadConsole.StringParser
Assembly: SadConsole.dll
Syntax
public sealed class ParseCommandDecorator : ParseCommandBase
Constructors
ParseCommandDecorator(string, bool)
Creates a new instance of this command.
Declaration
public ParseCommandDecorator(string parameters, bool replace)
Parameters
Type | Name | Description |
---|---|---|
string | parameters | The string to parse for parameters. |
bool | replace | When true, replaces the decorators on the glyph, otherwise it adds them. |
Properties
Color
The color of the decorator.
Declaration
public Color Color { get; set; }
Property Value
Type | Description |
---|---|
Color |
Decorator
The decorator created by the command settings.
Declaration
public CellDecorator Decorator { get; set; }
Property Value
Type | Description |
---|---|
CellDecorator |
Glyph
The glyph of the decorator.
Declaration
public int Glyph { get; set; }
Property Value
Type | Description |
---|---|
int |
Mirror
The mirror to apply to the decorator.
Declaration
public Mirror Mirror { get; set; }
Property Value
Type | Description |
---|---|
Mirror |
Replace
When true, replaces the decorators on the glyph, otherwise it adds them.
Declaration
public bool Replace { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
Build(ref ColoredGlyphAndEffect, ColoredGlyphAndEffect[], int, ICellSurface?, ref int, ReadOnlySpan<char>, ParseCommandStacks)
Builds a glyph.
Declaration
public override void Build(ref ColoredGlyphAndEffect glyphState, ColoredGlyphAndEffect[] glyphString, int surfaceIndex, ICellSurface? surface, ref int stringIndex, ReadOnlySpan<char> processedString, ParseCommandStacks commandStack)
Parameters
Type | Name | Description |
---|---|---|
ColoredGlyphAndEffect | glyphState | The current glyph being built. |
ColoredGlyphAndEffect[] | glyphString | The current string of glyphs that has been processed until now. |
int | surfaceIndex | Where on the surface this glyph will appear. |
ICellSurface | surface | The surface associated with the glyph. |
int | stringIndex | Where in the original string this glyph is from. |
ReadOnlySpan<char> | processedString | The entire string being processed. |
ParseCommandStacks | commandStack | The state of commands. |