MonoGameUi.Control.OnDrawBackground C# (CSharp) 메소드

OnDrawBackground() 보호된 메소드

Malt den Hintergrund des Controls
protected OnDrawBackground ( SpriteBatch batch, Rectangle backgroundArea, GameTime gameTime, float alpha ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch Spritebatch
backgroundArea Microsoft.Xna.Framework.Rectangle Bereich für den Background in absoluten Koordinaten
gameTime Microsoft.Xna.Framework.GameTime GameTime
alpha float Die Transparenz des Controls.
리턴 void
        protected virtual void OnDrawBackground(SpriteBatch batch, Rectangle backgroundArea, GameTime gameTime, float alpha)
        {
            // Standard Background zeichnen
            if (Pressed && PressedBackground != null)
                PressedBackground.Draw(batch, backgroundArea, alpha);
            else if (Hovered != TreeState.None && HoveredBackground != null)
                HoveredBackground.Draw(batch, backgroundArea, alpha);
            else if (Background != null)
                Background.Draw(batch, backgroundArea, alpha);
        }