public override void Draw(GameTime gameTime)
{
Rectangle fillRectangle = new Rectangle();
switch (orientation)
{
case MSProgressBar.Orientation.HORIZONTAL:
fillRectangle = new Rectangle((int)Position.X, (int)Position.Y, (int)(Progress * Size.X), (int)Size.Y);
break;
case MSProgressBar.Orientation.VERTICAL:
fillRectangle = new Rectangle((int)Position.X, (int)(Position.Y + (1 - Progress) * Size.Y), (int)(Size.X), (int)(Progress * Size.Y));
break;
}
spriteBatch.Draw(fillTexture, fillRectangle, Color.White);
if (borderTexture != null)
spriteBatch.Draw(borderTexture, BoundingRectangle, Color.White);
if (fullTexture != null && Progress >= 1)
spriteBatch.Draw(fullTexture, new Rectangle(BoundingRectangle.X, 0, BoundingRectangle.Width, 91), Color.White);
base.Draw(gameTime);
}