/// <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; }
/// <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; }