SadConsole.Consoles.Cursor.Right C# (CSharp) Méthode

Right() public méthode

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
Résultat 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;
        }