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

◆ DrawBorderString()

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

Definition at line 1891 of file Utils.cs.

1892 {
1894 {
1895 text.Substring(0, maxCharactersDisplayed);
1896 }
1898 Vector2 vector = value.MeasureString(text);
1899 ChatManager.DrawColorCodedStringWithShadow(sb, value, text, pos, color, 0f, new Vector2(anchorx, anchory) * vector, new Vector2(scale), -1f, 1.5f);
1900 return vector * scale;
1901 }
static Asset< DynamicSpriteFont > MouseText
Definition FontAssets.cs:10
static Vector2 DrawColorCodedStringWithShadow(SpriteBatch spriteBatch, DynamicSpriteFont font, TextSnippet[] snippets, Vector2 position, float rotation, Vector2 origin, Vector2 baseScale, out int hoveredSnippet, float maxWidth=-1f, float spread=2f)

References Terraria.UI.Chat.ChatManager.DrawColorCodedStringWithShadow(), Terraria.GameContent.FontAssets.MouseText, System.text, System.value, and Microsoft.Xna.Framework.Graphics.Vector2.

Referenced by Terraria.IngameOptions.Draw(), Terraria.UI.InGamePopups.AchievementUnlockedPopup.DrawInGame(), Terraria.UI.InGamePopups.PlayerWantsToJoinGamePopup.DrawInGame(), Terraria.UI.InGamePopups.PlayerWantsToJoinGamePopup.DrawInNotificationsArea(), Terraria.Main.DrawInterface_33_MouseText(), Terraria.Main.DrawInvasionProgress(), Terraria.IngameOptions.DrawRightSide(), Terraria.GameContent.UI.Elements.UIBestiaryInfoLine< T >.DrawSelf(), Terraria.GameContent.UI.Elements.UICharacterListItem.DrawSelf(), Terraria.GameContent.UI.Elements.UITextBox.DrawSelf(), Terraria.GameContent.UI.Elements.UIWorkshopImportWorldListItem.DrawSelf(), Terraria.GameContent.UI.Elements.UIWorkshopPublishResourcePackListItem.DrawSelf(), Terraria.GameContent.UI.Elements.UIWorkshopPublishWorldListItem.DrawSelf(), Terraria.GameContent.UI.Elements.UIWorldListItem.DrawSelf(), Terraria.GameContent.UI.Elements.UITextPanel< T >.DrawText(), Terraria.IngameOptions.DrawValue(), and Terraria.Main.DrawWindowsIMEPanel().