Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
DynamicSpriteFontExtensionMethods.cs
Go to the documentation of this file.
1using System.Text;
4
5namespace ReLogic.Graphics;
6
8{
9 public static void DrawString(this SpriteBatch spriteBatch, DynamicSpriteFont spriteFont, string text, Vector2 position, Color color)
10 {
11 //IL_0000: Unknown result type (might be due to invalid IL or missing references)
12 //IL_0005: Unknown result type (might be due to invalid IL or missing references)
13 //IL_0009: Unknown result type (might be due to invalid IL or missing references)
14 //IL_000a: Unknown result type (might be due to invalid IL or missing references)
15 //IL_0011: Unknown result type (might be due to invalid IL or missing references)
16 Vector2 scale = Vector2.One;
17 spriteFont.InternalDraw(text, spriteBatch, position, color, 0f, Vector2.Zero, ref scale, (SpriteEffects)0, 0f);
18 }
19
20 public static void DrawString(this SpriteBatch spriteBatch, DynamicSpriteFont spriteFont, StringBuilder text, Vector2 position, Color color)
21 {
22 //IL_0000: Unknown result type (might be due to invalid IL or missing references)
23 //IL_0005: Unknown result type (might be due to invalid IL or missing references)
24 //IL_000e: Unknown result type (might be due to invalid IL or missing references)
25 //IL_000f: Unknown result type (might be due to invalid IL or missing references)
26 //IL_0016: Unknown result type (might be due to invalid IL or missing references)
27 Vector2 scale = Vector2.One;
28 spriteFont.InternalDraw(text.ToString(), spriteBatch, position, color, 0f, Vector2.Zero, ref scale, (SpriteEffects)0, 0f);
29 }
30
31 public static void DrawString(this SpriteBatch spriteBatch, DynamicSpriteFont spriteFont, string text, Vector2 position, Color color, float rotation, Vector2 origin, float scale, SpriteEffects effects, float layerDepth)
32 {
33 //IL_0002: Unknown result type (might be due to invalid IL or missing references)
34 //IL_001d: Unknown result type (might be due to invalid IL or missing references)
35 //IL_001e: Unknown result type (might be due to invalid IL or missing references)
36 //IL_0022: Unknown result type (might be due to invalid IL or missing references)
37 //IL_0026: Unknown result type (might be due to invalid IL or missing references)
38 Vector2 scale2 = default(Vector2);
39 scale2.X = scale;
40 scale2.Y = scale;
41 spriteFont.InternalDraw(text, spriteBatch, position, color, rotation, origin, ref scale2, effects, layerDepth);
42 }
43
44 public static void DrawString(this SpriteBatch spriteBatch, DynamicSpriteFont spriteFont, StringBuilder text, Vector2 position, Color color, float rotation, Vector2 origin, float scale, SpriteEffects effects, float layerDepth)
45 {
46 //IL_0011: Unknown result type (might be due to invalid IL or missing references)
47 //IL_0012: Unknown result type (might be due to invalid IL or missing references)
48 //IL_0016: Unknown result type (might be due to invalid IL or missing references)
49 //IL_001a: Unknown result type (might be due to invalid IL or missing references)
50 Vector2 scale2 = default(Vector2);
51 ((Vector2)(ref scale2))._002Ector(scale);
52 spriteFont.InternalDraw(text.ToString(), spriteBatch, position, color, rotation, origin, ref scale2, effects, layerDepth);
53 }
54
55 public static void DrawString(this SpriteBatch spriteBatch, DynamicSpriteFont spriteFont, string text, Vector2 position, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth)
56 {
57 //IL_0003: Unknown result type (might be due to invalid IL or missing references)
58 //IL_0004: Unknown result type (might be due to invalid IL or missing references)
59 //IL_0008: Unknown result type (might be due to invalid IL or missing references)
60 //IL_000c: Unknown result type (might be due to invalid IL or missing references)
61 spriteFont.InternalDraw(text, spriteBatch, position, color, rotation, origin, ref scale, effects, layerDepth);
62 }
63
64 public static void DrawString(this SpriteBatch spriteBatch, DynamicSpriteFont spriteFont, StringBuilder text, Vector2 position, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth)
65 {
66 //IL_0008: Unknown result type (might be due to invalid IL or missing references)
67 //IL_0009: Unknown result type (might be due to invalid IL or missing references)
68 //IL_000d: Unknown result type (might be due to invalid IL or missing references)
69 //IL_0011: Unknown result type (might be due to invalid IL or missing references)
70 spriteFont.InternalDraw(text.ToString(), spriteBatch, position, color, rotation, origin, ref scale, effects, layerDepth);
71 }
72}
static void DrawString(this SpriteBatch spriteBatch, DynamicSpriteFont spriteFont, string text, Vector2 position, Color color, float rotation, Vector2 origin, float scale, SpriteEffects effects, float layerDepth)
static void DrawString(this SpriteBatch spriteBatch, DynamicSpriteFont spriteFont, StringBuilder text, Vector2 position, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth)
static void DrawString(this SpriteBatch spriteBatch, DynamicSpriteFont spriteFont, StringBuilder text, Vector2 position, Color color)
static void DrawString(this SpriteBatch spriteBatch, DynamicSpriteFont spriteFont, StringBuilder text, Vector2 position, Color color, float rotation, Vector2 origin, float scale, SpriteEffects effects, float layerDepth)
static void DrawString(this SpriteBatch spriteBatch, DynamicSpriteFont spriteFont, string text, Vector2 position, Color color)
static void DrawString(this SpriteBatch spriteBatch, DynamicSpriteFont spriteFont, string text, Vector2 position, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth)
void InternalDraw(string text, SpriteBatch spriteBatch, Vector2 startPosition, Color color, float rotation, Vector2 origin, ref Vector2 scale, SpriteEffects spriteEffects, float depth)