public void DrawVerticalLine(int xPosition, SpriteBatch p_SpriteBatch, Texture2D _Texture)
{
//Selecting an area below the starting point
if (_SelectionBox.Height > 0)
{
//Draw the line moving down
for (int counter = -2; counter <= _SelectionBox.Height; counter += 10)
{
if (_SelectionBox.Height - counter >= 0)
{
p_SpriteBatch.Draw(_Texture, new Rectangle(xPosition, _SelectionBox.Y + counter, 10, 5), new Rectangle(0, 0, _Texture.Width, _Texture.Height), Color.White, MathHelper.ToRadians(90), new Vector2(0, 0), SpriteEffects.None, 0);
}
}
}
//Selecting an area above the starting point
else if (_SelectionBox.Height < 0)
{
//Draw the line moving up
for (int counter = 0; counter >= _SelectionBox.Height; counter -= 10)
{
if (_SelectionBox.Height - counter <= 0)
{
p_SpriteBatch.Draw(_Texture, new Rectangle(xPosition - 10, _SelectionBox.Y + counter, 10, 5), Color.White);
}
}
}
}