示例#1
0
        public override void Draw(SceneGame scene, DrawPass pass)
        {
            var    calcParams = new TextParameters().SetColor(FontColor, BorderColor).SetConstraints(128, 64);
            string fit        = FontUtil.FitString(Game.ConvertToSmallPixelText(Text), calcParams);
            var    width      = FontUtil.GetStringWidth(fit, calcParams);
            var    height     = FontUtil.GetStringHeight(fit);

            scene.DrawText(fit, Position + Offset - new Vector2(128, height) / 2, Alignment.Center, new TextParameters().SetColor(FontColor, BorderColor).SetConstraints(128, height + 64));
        }