public override void Draw(SpriteBatch SBatch, float?LayerDepth)
{
float Depth;
if (LayerDepth != null)
{
Depth = (float)LayerDepth;
}
else
{
Depth = 0.9f; //Progressbars are always drawn on top
}
//Texture is 45px / 3 = 15px wide
m_ProgressBarBack.Draw(SBatch, new Rectangle((int)Position.X, (int)Position.Y, 15, (int)m_Size.Y),
new Rectangle(0, 0, 15, (int)m_Size.Y), Depth + 0.1f);
m_ProgressBarBack.Draw(SBatch, new Rectangle((int)(Position.X + 15), (int)Position.Y, (int)(Size.X - 30),
(int)m_Size.Y), new Rectangle(15, 0, 15, (int)m_Size.Y), Depth + 0.1f);
m_ProgressBarBack.Draw(SBatch, new Rectangle((int)((Position.X + Size.X) - 15), (int)Position.Y, 15,
(int)m_Size.Y), new Rectangle(30, 0, 15, (int)m_Size.Y), Depth + 0.1f);
m_LblCurrentStatus.Draw(SBatch, LayerDepth + 0.3f);
base.Draw(SBatch, LayerDepth);
}