public override void Draw(GameTime time)
{
base.Draw (time);
spriteBatch.Begin ();
// berechne die Ausmaße des Wertefelds
Rectangle bounds = ValueBounds.Rectangle;
// zeichne den Hintergrund des Wertefelds
spriteBatch.DrawColoredRectangle (ForegroundColor, bounds);
spriteBatch.DrawColoredRectangle (Design.WidgetBackground, bounds.Shrink (2));
// wenn der Wert wahr ist
if (currentValue) {
spriteBatch.DrawColoredRectangle (ForegroundColor, bounds.Shrink (4));
}
spriteBatch.End ();
}