//////////////// /// <summary></summary> /// <param name="theme"></param> /// <param name="skipThemeRefreshNow"></param> /// <param name="text"></param> /// <param name="textScale"></param> /// <param name="large"></param> public UIThemedText(UITheme theme, bool skipThemeRefreshNow, string text, float textScale = 1, bool large = false) : base(text, textScale, large) { this.Theme = theme; if (!skipThemeRefreshNow) { theme.ApplyText(this); } }
//////////////// /// <summary></summary> /// <param name="theme"></param> /// <param name="skipThemeRefreshNow"></param> /// <param name="text"></param> /// <param name="textScale"></param> /// <param name="large"></param> public UIThemedText(UITheme theme, bool skipThemeRefreshNow, string text, float textScale = 1, bool large = false) : base(text, textScale, large) { this.Theme = theme; this.ScaleCopy = textScale; this.LargeCopy = large; DynamicSpriteFont font = large ? Main.fontDeathText : Main.fontMouseText; this.SizeCopy = new Vector2( font.MeasureString(text.ToString()).X, large ? 32f : 16f ) * textScale; if (!skipThemeRefreshNow) { theme.ApplyText(this); } }