public override void Draw() { BackgroundImg.Draw(m_SBatch, null, 0.0f); TSOLogoImage.Draw(m_SBatch, null, 0.0f); BackButtonIndentImage.Draw(m_SBatch, null, 0.0f); foreach (UILabel Lbl in m_CreditsStrings) { //TODO: Figure out how to stop lines from displaying outside of the screen. if (Lbl.YPosition > m_CreditsArea.Position.Y && (Lbl.YPosition < m_CreditsArea.Size.Y)) { Lbl.Draw(m_SBatch, 0.3f); } } m_WillWrightDiag.Draw(m_SBatch, 0.4f); base.Draw(); }
public override void Draw() { m_SBatch.Begin(SpriteSortMode.FrontToBack, BlendState.AlphaBlend, null, null, RasterizerState.CullCounterClockwise, null, Resolution.getTransformationMatrix()); BackgroundImg.Draw(m_SBatch, null, 0.0f); TSOLogoImage.Draw(m_SBatch, null, 0.0f); BackButtonIndentImage.Draw(m_SBatch, null, 0.0f); foreach (UILabel Lbl in m_CreditsStrings) { //TODO: Clip the credits area! if (Lbl.YPosition > m_CreditsArea.Position.Y && (Lbl.YPosition < m_CreditsArea.Size.Y)) { Lbl.Draw(m_SBatch, 0.3f); } } m_WillWrightDiag.Draw(m_SBatch, 0.4f); base.Draw(); 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() { BackgroundImg.Draw(m_SBatch, null, 0.0f); TSOLogoImage.Draw(m_SBatch, null, 0.0f); BackButtonIndentImage.Draw(m_SBatch, null, 0.0f); m_WillWrightDiag.Draw(m_SBatch, 0.10f); float Separation = 1.0f; foreach (string Str in m_CreditsStrings) { m_CreditsCenterX = (m_CreditsArea.Size.X / 2) - (Manager.Font12px.MeasureString(CleanInput(Str)).X / 2); if ((m_CreditsY + Separation) > m_CreditsArea.Position.Y && (m_CreditsY + Separation) < m_CreditsArea.Size.Y) { m_SBatch.DrawString(Manager.Font12px, Str, new Vector2(m_CreditsArea.Position.X + m_CreditsCenterX, m_CreditsY + Separation), Color.Wheat); } Separation += 15.0f; } base.Draw(); }