示例#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();
        }
示例#2
0
文件: UIForm.cs 项目: Hengle/Fusion3D
 public void DrawText(string txt, int x, int y, Vector4 col)
 {
     FontRenderer.Draw(UI.Font, txt, GX + x, GY + y, col * UI.BootAlpha);
 }