public override void Draw() { m_SBatch.Begin(SpriteSortMode.FrontToBack, BlendState.AlphaBlend, null, null, RasterizerState.CullCounterClockwise, null, Resolution.getTransformationMatrix()); base.Draw(); //Needs to be drawn first for the ExitDialog to be drawn correctly. m_BackgroundImg.Draw(m_SBatch, null, 0.0f); m_HeadSkinBrowser.Draw(m_SBatch, 0.7f); m_BodySkinBrowser.Draw(m_SBatch, 0.7f); //TODO: Find out why the ExitDialog is drawn behind the other buttons on the screen. m_ExitDialog.Draw(m_SBatch, 0.9f); 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.getTransformationMatrix()); Element.Draw(m_SBatch, 0.5f); m_SBatch.End(); } } }
public override void Draw() { base.Draw(); //Needs to be drawn first for the ExitDialog to be drawn correctly. m_BackgroundImg.Draw(m_SBatch, null, 0.0f); m_HeadSkinBrowser.Draw(m_SBatch, 0.7f); m_BodySkinBrowser.Draw(m_SBatch, 0.7f); //TODO: Find out why the ExitDialog is drawn behind the other buttons on the screen. m_ExitDialog.Draw(m_SBatch, 0.9f); }