Exemplo n.º 1
0
            /// <summary>
            /// Creates a new instance of the cursor class that will work with the specified console.
            /// </summary>
            /// <param name="console">The console this cursor will print on.</param>
            public Cursor(Console console)
            {
                _console = new WeakReference(console);
                IsVisible = false;

                SadConsole.Effects.Blink blinkEffect = new Effects.Blink();
                blinkEffect.BlinkSpeed = 0.35f;

                PrintAppearance = new CellAppearance(Color.White, Color.Black);
                AutomaticallyShiftRowsUp = true;

                CursorRenderCell = new Cell();
                CursorRenderCell.CharacterIndex = _cursorCharacter;
                CursorRenderCell.Effect = blinkEffect;
                CursorRenderCell.Foreground = Color.White;
                CursorRenderCell.Background = Color.Transparent;
            }
Exemplo n.º 2
0
            /// <summary>
            /// Creates a new instance of the cursor class that will work with the specified console.
            /// </summary>
            /// <param name="console">The console this cursor will print on.</param>
            public Cursor(Console console)
            {
                _console  = new WeakReference(console);
                IsVisible = false;

                SadConsole.Effects.Blink blinkEffect = new Effects.Blink();
                blinkEffect.BlinkSpeed = 0.35f;

                PrintAppearance          = new CellAppearance(Color.White, Color.Black);
                AutomaticallyShiftRowsUp = true;

                CursorRenderCell = new Cell();
                CursorRenderCell.CharacterIndex = _cursorCharacter;
                CursorRenderCell.Effect         = blinkEffect;
                CursorRenderCell.Foreground     = Color.White;
                CursorRenderCell.Background     = Color.Transparent;
            }
Exemplo n.º 3
0
 /// <summary>
 /// Resets the <see cref="CursorRenderCell"/> back to the default.
 /// </summary>
 public void ResetCursorEffect()
 {
     SadConsole.Effects.Blink blinkEffect = new Effects.Blink();
     blinkEffect.BlinkSpeed  = 0.35f;
     CursorRenderCell.Effect = blinkEffect;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Resets the <see cref="CursorRenderCell"/> back to the default.
 /// </summary>
 public void ResetCursorEffect()
 {
     SadConsole.Effects.Blink blinkEffect = new Effects.Blink();
     blinkEffect.BlinkSpeed = 0.35f;
     CursorRenderCell.Effect = blinkEffect;
 }