Knot3.Framework.Widgets.CheckBoxItem.Draw C# (CSharp) Méthode

Draw() private méthode

private Draw ( GameTime time ) : void
time Microsoft.Xna.Framework.GameTime
Résultat void
        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 ();
        }