Exemple #1
0
 protected override void OnDraw(Microsoft.Xna.Framework.Graphics.SpriteBatch sb, ref Point offect)
 {
     if (needDraw)
     {
         bufs.Clear();
         Vector2 _pos = scenepos - (Orient) * scenescale + align * scenescale;
         _pos.X += offect.X;
         _pos.Y += offect.Y;
         Vector2 _scale = scenescale;
         Vector2 _pos2  = _pos;
         _pos2.X += widthsplit * scenescale.X;
         if (drawfont1 != null)
         {
             drawfont1.DrawStringToBuf(bufs, text.Substring(0, possplit), _pos, _scale, colorZero);
             drawfont1.DrawStringToBuf(bufs, text.Substring(possplit), _pos2, _scale, color);
         }
     }
     Quadbuf.QuadBuf.Draw(sb, bufs);
 }
Exemple #2
0
        protected override void OnDraw(Microsoft.Xna.Framework.Graphics.SpriteBatch sb, ref Point offect)
        {
            if (needDraw)
            {
                bufs.Clear();
                Vector2 _pos = scenepos - (Orient) * scenescale + align * scenescale;
                _pos.X += offect.X;
                _pos.Y += offect.Y;
                Vector2 _scale = scenescale;

                if (drawfont1 != null)
                {
                    drawfont1.DrawStringToBuf(bufs, _text, _pos, _scale, color);
                }
                needDraw = false;
            }
            Quadbuf.QuadBuf.Draw(sb, bufs);
        }