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

◆ DrawSelf()

override void Terraria.GameContent.UI.Elements.EmoteButton.DrawSelf ( SpriteBatch spriteBatch)
inlineprotectedvirtual

Reimplemented from Terraria.UI.UIElement.

Definition at line 84 of file EmoteButton.cs.

85 {
86 //IL_0009: Unknown result type (might be due to invalid IL or missing references)
87 //IL_001a: Unknown result type (might be due to invalid IL or missing references)
88 //IL_0024: Unknown result type (might be due to invalid IL or missing references)
89 //IL_0029: Unknown result type (might be due to invalid IL or missing references)
90 //IL_002e: Unknown result type (might be due to invalid IL or missing references)
91 //IL_0030: Unknown result type (might be due to invalid IL or missing references)
92 //IL_0035: Unknown result type (might be due to invalid IL or missing references)
93 //IL_0043: Unknown result type (might be due to invalid IL or missing references)
94 //IL_0048: Unknown result type (might be due to invalid IL or missing references)
95 //IL_0049: Unknown result type (might be due to invalid IL or missing references)
96 //IL_004a: Unknown result type (might be due to invalid IL or missing references)
97 //IL_0054: Unknown result type (might be due to invalid IL or missing references)
98 //IL_0059: Unknown result type (might be due to invalid IL or missing references)
99 //IL_005b: Unknown result type (might be due to invalid IL or missing references)
100 //IL_0060: Unknown result type (might be due to invalid IL or missing references)
101 //IL_0062: Unknown result type (might be due to invalid IL or missing references)
102 //IL_0067: Unknown result type (might be due to invalid IL or missing references)
103 //IL_0080: Unknown result type (might be due to invalid IL or missing references)
104 //IL_0081: Unknown result type (might be due to invalid IL or missing references)
105 //IL_0082: Unknown result type (might be due to invalid IL or missing references)
106 //IL_0071: Unknown result type (might be due to invalid IL or missing references)
107 //IL_0076: Unknown result type (might be due to invalid IL or missing references)
108 //IL_0132: Unknown result type (might be due to invalid IL or missing references)
109 //IL_0133: Unknown result type (might be due to invalid IL or missing references)
110 //IL_0134: Unknown result type (might be due to invalid IL or missing references)
111 //IL_009a: Unknown result type (might be due to invalid IL or missing references)
112 //IL_009b: Unknown result type (might be due to invalid IL or missing references)
113 //IL_00a1: Unknown result type (might be due to invalid IL or missing references)
114 //IL_00a8: Unknown result type (might be due to invalid IL or missing references)
115 //IL_00c6: Unknown result type (might be due to invalid IL or missing references)
116 //IL_00c7: Unknown result type (might be due to invalid IL or missing references)
117 //IL_00cd: Unknown result type (might be due to invalid IL or missing references)
118 //IL_00d4: Unknown result type (might be due to invalid IL or missing references)
119 //IL_00f2: Unknown result type (might be due to invalid IL or missing references)
120 //IL_00f3: Unknown result type (might be due to invalid IL or missing references)
121 //IL_00fd: Unknown result type (might be due to invalid IL or missing references)
122 //IL_0102: Unknown result type (might be due to invalid IL or missing references)
123 //IL_0111: Unknown result type (might be due to invalid IL or missing references)
124 //IL_0118: Unknown result type (might be due to invalid IL or missing references)
126 Vector2 vector = dimensions.Position() + new Vector2(dimensions.Width, dimensions.Height) / 2f;
127 Rectangle frame = GetFrame();
128 Rectangle value = _bubbleTexture.Frame(8, 39, 1);
129 Vector2 origin = frame.Size() / 2f;
130 Color white = Color.White;
131 Color color = Color.Black;
132 if (_hovered)
133 {
134 color = Main.OurFavoriteColor;
135 }
136 if (EmoteBubbleLoader.PreDrawInEmoteMenu(_emoteIndex, spriteBatch, this, vector, frame, origin))
137 {
138 spriteBatch.Draw(_bubbleTexture.Value, vector, (Rectangle?)value, white, 0f, origin, 1f, (SpriteEffects)0, 0f);
139 spriteBatch.Draw(_texture.Value, vector, (Rectangle?)frame, white, 0f, origin, 1f, (SpriteEffects)0, 0f);
140 spriteBatch.Draw(_textureBorder.Value, vector - Vector2.One * 2f, (Rectangle?)null, color, 0f, origin, 1f, (SpriteEffects)0, 0f);
141 }
142 EmoteBubbleLoader.PostDrawInEmoteMenu(_emoteIndex, spriteBatch, this, vector, frame, origin);
143 if (_hovered)
144 {
145 if (_emoteIndex >= EmoteID.Count)
146 {
147 Main.instance.MouseText("/" + Lang.GetEmojiName(_emoteIndex), 0, 0);
148 return;
149 }
150 string name = EmoteID.Search.GetName(_emoteIndex);
151 string cursorText = "/" + Language.GetTextValue("EmojiName." + name);
152 Main.instance.MouseText(cursorText, 0, 0);
153 }
154 }
static string GetTextValue(string key)
Retrieves the text value for a specified localization key. The text returned will be for the currentl...
Definition Language.cs:35
Contains methods to access or retrieve localization values. The Localization Guideteaches more about ...
Definition Language.cs:12
static bool PreDrawInEmoteMenu(int emoteType, SpriteBatch spriteBatch, EmoteButton uiEmoteButton, Vector2 position, Rectangle frame, Vector2 origin)
static void PostDrawInEmoteMenu(int emoteType, SpriteBatch spriteBatch, EmoteButton uiEmoteButton, Vector2 position, Rectangle frame, Vector2 origin)
CalculatedStyle GetDimensions()
Definition UIElement.cs:460

References Terraria.GameContent.UI.Elements.EmoteButton._bubbleTexture, Terraria.GameContent.UI.Elements.EmoteButton._emoteIndex, Terraria.GameContent.UI.Elements.EmoteButton._hovered, Terraria.GameContent.UI.Elements.EmoteButton._texture, Terraria.GameContent.UI.Elements.EmoteButton._textureBorder, Terraria.GameContent.UI.EmoteID.Count, Terraria.UI.UIElement.GetDimensions(), Terraria.Lang.GetEmojiName(), Terraria.GameContent.UI.Elements.EmoteButton.GetFrame(), Terraria.Localization.Language.GetTextValue(), Terraria.Main.instance, Terraria.Main.OurFavoriteColor, Terraria.ModLoader.EmoteBubbleLoader.PostDrawInEmoteMenu(), Terraria.ModLoader.EmoteBubbleLoader.PreDrawInEmoteMenu(), and Terraria.GameContent.UI.EmoteID.Search.

+ Here is the call graph for this function: