Exemple #1
0
        public void CalculateSize()
        {
            _displayString = Text;
            var font = IsLargeText ? Main.fontDeathText : Main.fontMouseText;

            if (SizeStyle == SizeStyle.Inline)
            {
                Size = MeasureSize(Text);
            }
            else
            {
                _displayString = StringProcess.GetClampStringWithEllipses(font, _displayString, TextScale, Width);
                Size           = new Vector2(Size.X, MeasureSize(_displayString).Y);
            }
        }