示例#1
0
        public override void Draw()
        {
            m_SBatch.Begin(SpriteSortMode.FrontToBack, BlendState.AlphaBlend, null, null,
                           RasterizerState.CullCounterClockwise, null, Resolution.TransformationMatrix());

            base.Draw();

            m_BackgroundImg.Draw(m_SBatch, null, 0.0f);

            m_SBatch.End();

            foreach (UIElement Element in m_PResult.Elements.Values)
            {
                if (Element.NeedsClipping)
                {
                    RasterizerState RasterState = new RasterizerState();
                    RasterState.ScissorTestEnable = true;
                    RasterState.CullMode          = CullMode.CullCounterClockwiseFace;

                    //Was FrontToBack
                    m_SBatch.Begin(SpriteSortMode.Texture, BlendState.AlphaBlend, null, null,
                                   RasterState, null, Resolution.TransformationMatrix());

                    Element.Draw(m_SBatch, 0.5f);

                    m_SBatch.End();
                }
            }
        }
示例#2
0
        public override void Draw()
        {
            m_SBatch.Begin(SpriteSortMode.FrontToBack, BlendState.AlphaBlend, null, null,
                           RasterizerState.CullCounterClockwise, null, Resolution.TransformationMatrix());

            base.Draw();

            m_BackgroundImg.Draw(m_SBatch, null, 0.0f);

            m_LblExtrudingTerrainWeb.Draw(m_SBatch, 0.3f);
            m_LblCalculatingDomesticCoefficients.Draw(m_SBatch, 0.3f);
            m_LblReadjustingCareerLadder.Draw(m_SBatch, 0.3f);
            m_LblAccessingMoneySupply.Draw(m_SBatch, 0.3f);
            m_LblHackingTheSocialNetwork.Draw(m_SBatch, 0.3f);
            m_LblDownloadingReticulatedSplines.Draw(m_SBatch, 0.3f);
            m_LblAdjustingEmotionalWeights.Draw(m_SBatch, 0.3f);
            m_LblCalibratingPersonalityMatrix.Draw(m_SBatch, 0.3f);
            m_LblSettingUpPersonfinder.Draw(m_SBatch, 0.3f);

            m_SBatch.End();

            foreach (UIElement Element in m_PResult.Elements.Values)
            {
                if (Element.NeedsClipping)
                {
                    RasterizerState RasterState = new RasterizerState();
                    RasterState.ScissorTestEnable = true;
                    RasterState.CullMode          = CullMode.CullCounterClockwiseFace;

                    m_SBatch.Begin(SpriteSortMode.FrontToBack, BlendState.AlphaBlend, null, null,
                                   RasterState, null, Resolution.TransformationMatrix());

                    Element.Draw(m_SBatch, 0.5f);

                    m_SBatch.End();
                }
            }
        }