Bug.Display.TextButton.Draw C# (CSharp) Метод

Draw() публичный Метод

public Draw ( SpriteBatch batch ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch
Результат void
        public override void Draw(SpriteBatch batch)
        {
 	        base.Draw(batch);
            Vector2 dim = font.MeasureString(text);
            int textX = x + tex.Width / 2 - (int)dim.X / 2;
            int textY = y + tex.Height / 2 - (int)dim.Y / 2;

            batch.DrawString(font, text, new Vector2(textX, textY), Color.White);
        }
    }