Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ DrawBorderStringBig()

static Vector2 Terraria.Utils.DrawBorderStringBig ( SpriteBatch spriteBatch,
string text,
Vector2 pos,
Color color,
float scale = 1f,
float anchorx = 0f,
float anchory = 0f,
int maxCharactersDisplayed = -1 )
inlinestatic

Definition at line 1903 of file Utils.cs.

1904 {
1906 {
1907 text.Substring(0, maxCharactersDisplayed);
1908 }
1910 for (int i = -1; i < 2; i++)
1911 {
1912 for (int j = -1; j < 2; j++)
1913 {
1914 DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, value, text, pos + new Vector2(i, j), Color.Black, 0f, new Vector2(anchorx, anchory) * value.MeasureString(text), scale, SpriteEffects.None, 0f);
1915 }
1916 }
1917 DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, value, text, pos, color, 0f, new Vector2(anchorx, anchory) * value.MeasureString(text), scale, SpriteEffects.None, 0f);
1918 return value.MeasureString(text) * scale;
1919 }
static void DrawString(this SpriteBatch spriteBatch, DynamicSpriteFont spriteFont, string text, Vector2 position, Color color)
static Asset< DynamicSpriteFont > DeathText
Definition FontAssets.cs:12

References Microsoft.Xna.Framework.Color.Black, Terraria.GameContent.FontAssets.DeathText, ReLogic.Graphics.DynamicSpriteFontExtensionMethods.DrawString(), System.Text.RegularExpressions.i, System.text, System.value, and Microsoft.Xna.Framework.Graphics.Vector2.

Referenced by Terraria.Graphics.Capture.CaptureInterface.Draw(), Terraria.IngameOptions.DrawLeftSide(), Terraria.GameContent.UI.Elements.UITextBox.DrawSelf(), and Terraria.GameContent.UI.Elements.UITextPanel< T >.DrawText().