Beispiel #1
0
        internal virtual void DrawText()
        {
            if (TextRenderer == Renderer.Dynamic)
            {
                DrawDynamicText();
            }
            else
            {
                DrawStaticText();
            }



            spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, null, null, rasterizerState);
            CurrentScissorRectangle = spriteBatch.GraphicsDevice.ScissorRectangle;
            spriteBatch.GraphicsDevice.ScissorRectangle = ScissorRectangle;

            fontRenderer.Draw(Text, TextPosition, TextColor);

            spriteBatch.GraphicsDevice.ScissorRectangle = CurrentScissorRectangle;
            spriteBatch.End();
        }
Beispiel #2
0
 public void DrawText(string txt, int x, int y, Vector4 col)
 {
     FontRenderer.Draw(UI.Font, txt, GX + x, GY + y, col * UI.BootAlpha);
 }