Knot3.Framework.Widgets.Menu.Draw C# (CSharp) Method

Draw() private method

private Draw ( GameTime time ) : void
time Microsoft.Xna.Framework.GameTime
return void
        public override void Draw(GameTime time)
        {
            base.Draw (time);

            if (IsVisible && IsEnabled) {
                spriteBatch.Begin ();
                Texture2D backgroundTexture = ContentLoader.CreateTexture (Screen.GraphicsDevice, Color.White);
                spriteBatch.Draw (backgroundTexture, Bounds, BackgroundColor);

                if (HasScrollbar) {
                    Texture2D rectangleTexture = ContentLoader.CreateTexture (Screen.GraphicsDevice, Color.White);
                    Bounds sliderBounds = ScrollSliderInBarBounds.In (ScrollBarBounds);
                    spriteBatch.Draw (rectangleTexture, sliderBounds.Rectangle.Grow (1), Design.DefaultOutlineColor);
                    spriteBatch.Draw (rectangleTexture, sliderBounds.Rectangle, Design.DefaultLineColor);
                    // Log.Debug ("ScrollSliderBounds=", sliderBounds.Rectangle);
                    // Log.Debug ("ScrollBarBounds=", ScrollBarBounds.Rectangle);
                }
                spriteBatch.End ();
            }
        }