Ejemplo n.º 1
0
        /// <inheritdoc />
        public override bool ApplyToCell(ColoredGlyph cell, EffectsManager.ColoredGlyphState originalState)
        {
            Color oldForeground = cell.Foreground;
            Color oldBackground = cell.Background;

            if (FadeForeground)
            {
                if (UseCellForeground)
                {
                    DestinationForeground.Stops[UseCellDestinationReverse ? DestinationForeground.Stops.Length - 1 : 0].Color = originalState.Foreground;
                }

                cell.Foreground = DestinationForeground.Lerp((float)_calculatedValue);
            }

            if (FadeBackground)
            {
                if (UseCellBackground)
                {
                    DestinationBackground.Stops[UseCellDestinationReverse ? DestinationBackground.Stops.Length - 1 : 0].Color = originalState.Background;
                }

                cell.Background = DestinationBackground.Lerp((float)_calculatedValue);
            }

            return(oldForeground != cell.Foreground || oldBackground != cell.Background);
        }
Ejemplo n.º 2
0
 /// <inheritdoc />
 public override bool ApplyToCell(ColoredGlyph cell, EffectsManager.ColoredGlyphState originalState)
 {
     if (_activeEffect != null)
     {
         return(_activeEffect.ApplyToCell(cell, originalState));
     }
     else
     {
         return(false);
     }
 }
Ejemplo n.º 3
0
        /// <inheritdoc />
        public override bool ApplyToCell(ColoredGlyph cell, EffectsManager.ColoredGlyphState originalState)
        {
            int oldGlyph = cell.Glyph;

            if (!_isOn)
            {
                cell.Glyph = GlyphIndex;
            }
            else
            {
                cell.Glyph = originalState.Glyph;
            }

            return(cell.Glyph != oldGlyph);
        }
Ejemplo n.º 4
0
        /// <inheritdoc />
        public override bool ApplyToCell(ColoredGlyph cell, EffectsManager.ColoredGlyphState originalState)
        {
            Color oldForeground = cell.Foreground;
            Color oldBackground = cell.Background;

            if (DoBackground)
            {
                cell.Background = Background;
            }

            if (DoForeground)
            {
                cell.Foreground = Foreground;
            }

            return(oldForeground != cell.Foreground || oldBackground != cell.Background);
        }
Ejemplo n.º 5
0
        /// <inheritdoc />
        public override bool ApplyToCell(ColoredGlyph cell, EffectsManager.ColoredGlyphState originalState)
        {
            Color oldColor = cell.Foreground;

            if (!_isOn)
            {
                if (UseCellBackgroundColor)
                {
                    cell.Foreground = originalState.Background;
                }
                else
                {
                    cell.Foreground = BlinkOutColor;
                }
            }
            else
            {
                cell.Foreground = originalState.Foreground;
            }

            return(cell.Foreground != oldColor);
        }
Ejemplo n.º 6
0
 /// <inheritdoc />
 public override bool ApplyToCell(ColoredGlyph cell, EffectsManager.ColoredGlyphState state) => false;