33 public string Text =>
_text.ToString();
80 public UIText(
string text,
float textScale = 1f,
bool large =
false)
126 base.DrawSelf(spriteBatch);
183 if (this.OnInternalTextChange !=
null)
Vector2 MeasureString(string text)
string CreateWrappedText(string text, float maxWidth)
static Asset< DynamicSpriteFont > MouseText
Action OnInternalTextChange
void SetText(string text, float textScale, bool large)
UIText(string text, float textScale=1f, bool large=false)
void SetText(string text)
float WrappedTextBottomPadding
bool DynamicallyScaleDownToWidth
void InternalSetText(object text, float textScale, bool large)
override void DrawSelf(SpriteBatch spriteBatch)
string _lastTextReference
UIText(LocalizedText text, float textScale=1f, bool large=false)
void SetText(LocalizedText text)
override void Recalculate()
void SetText(LocalizedText text, float textScale, bool large)
static void DrawColorCodedStringShadow(SpriteBatch spriteBatch, DynamicSpriteFont font, TextSnippet[] snippets, Vector2 position, Color baseColor, float rotation, Vector2 origin, Vector2 baseScale, float maxWidth=-1f, float spread=2f)
static Vector2 DrawColorCodedString(SpriteBatch spriteBatch, DynamicSpriteFont font, TextSnippet[] snippets, Vector2 position, Color baseColor, float rotation, Vector2 origin, Vector2 baseScale, out int hoveredSnippet, float maxWidth, bool ignoreColors=false)
static void ConvertNormalSnippets(TextSnippet[] snippets)
static List< TextSnippet > ParseMessage(string text, Color baseColor)
CalculatedStyle GetInnerDimensions()
void Set(float pixels, float precent)