SadConsole.Consoles.Cursor.Up C# (CSharp) Method

Up() public method

Moves the cusor up by the specified amount of lines.
public Up ( int amount ) : Cursor
amount int The amount of lines to move the cursor
return Cursor
        public Cursor Up(int amount)
        {
            int newY = _position.Y - amount;

            if (newY < 0)
                newY = 0;

            Position = new Point(_position.X, newY);
            return this;
        }