public Right ( int amount ) : |
||
amount | int | The amount of columns to move the 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;
}