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

Right() public method

Moves the cusor right by the specified amount of columns.
public Right ( int amount ) : Cursor
amount int The amount of columns to move the cursor
return Cursor
        public Cursor Right(int amount)
        {
            int newX = _position.X + amount;

            if (newX >= ((SurfaceEditor)_console.Target).TextSurface.Width)
                newX = ((SurfaceEditor)_console.Target).TextSurface.Width - 1;

            Position = new Point(newX, _position.Y);
            return this;
        }