Exemplo n.º 1
0
        public void Draw(SpriteBatch spriteBatch)
        {
            if (!this.DrawScene)
            {
                return;
            }

            RasterizerState rasterizerState = new RasterizerState()
            {
                ScissorTestEnable = true
            };


            spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, rasterizerState);

            foreach (AGUIComponent component in components)
            {
                //  if (camera.inScreenBounds(component.Position))
                component.Draw(spriteBatch);
            }

            vScrollBar.Draw(spriteBatch);

            spriteBatch.GraphicsDevice.ScissorRectangle = SceneRectangle;

            spriteBatch.End();
        }
Exemplo n.º 2
0
        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(backGround, MenuRectangle, null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, DisplayLayer.Menu - 0.01f);
            spriteBatch.Draw(backGround, FrameRectangle, null, Color.Black, 0.0f, Vector2.Zero, SpriteEffects.None, DisplayLayer.Menu - 0.02f);

            foreach (AGUIComponent component in components)
            {
                component.Draw(spriteBatch);
            }

            vScrollBar.Draw(spriteBatch);
        }