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

◆ Draw()

override void Terraria.GameContent.UI.States.UIAchievementsMenu.Draw ( SpriteBatch spriteBatch)
inlinevirtual

Reimplemented from Terraria.UI.UIElement.

Definition at line 112 of file UIAchievementsMenu.cs.

113 {
114 //IL_009f: Unknown result type (might be due to invalid IL or missing references)
115 //IL_00b6: Unknown result type (might be due to invalid IL or missing references)
116 //IL_00c0: Unknown result type (might be due to invalid IL or missing references)
117 //IL_00c5: Unknown result type (might be due to invalid IL or missing references)
118 //IL_00ca: Unknown result type (might be due to invalid IL or missing references)
119 //IL_00cb: Unknown result type (might be due to invalid IL or missing references)
120 //IL_00ec: Unknown result type (might be due to invalid IL or missing references)
121 //IL_011b: Unknown result type (might be due to invalid IL or missing references)
122 //IL_0121: Unknown result type (might be due to invalid IL or missing references)
123 //IL_013b: Unknown result type (might be due to invalid IL or missing references)
124 //IL_0140: Unknown result type (might be due to invalid IL or missing references)
125 //IL_0145: Unknown result type (might be due to invalid IL or missing references)
126 base.Draw(spriteBatch);
127 for (int i = 0; i < _categoryButtons.Count; i++)
128 {
130 {
131 string text = "";
132 text = i switch
133 {
134 3 => Language.GetTextValue("Achievements.ChallengerCategory"),
135 1 => Language.GetTextValue("Achievements.CollectorCategory"),
136 2 => Language.GetTextValue("Achievements.ExplorerCategory"),
137 0 => Language.GetTextValue("Achievements.SlayerCategory"),
138 -1 => Language.GetTextValue("Achievements.NoCategory"),
139 _ => Language.GetTextValue("Achievements.NoCategory"),
140 };
141 float x = FontAssets.MouseText.Value.MeasureString(text).X;
142 Vector2 vector = new Vector2((float)Main.mouseX, (float)Main.mouseY) + new Vector2(16f);
143 if (vector.Y > (float)(Main.screenHeight - 30))
144 {
145 vector.Y = Main.screenHeight - 30;
146 }
147 if (vector.X > (float)Main.screenWidth - x)
148 {
149 vector.X = Main.screenWidth - 460;
150 }
151 Utils.DrawBorderStringFourWay(spriteBatch, FontAssets.MouseText.Value, text, vector.X, vector.Y, new Color((int)Main.mouseTextColor, (int)Main.mouseTextColor, (int)Main.mouseTextColor, (int)Main.mouseTextColor), Color.Black, Vector2.Zero);
152 break;
153 }
154 }
155 SetupGamepadPoints(spriteBatch);
156 }
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

References Terraria.GameContent.UI.States.UIAchievementsMenu._categoryButtons, Terraria.Utils.DrawBorderStringFourWay(), Terraria.Localization.Language.GetTextValue(), Terraria.UI.UIElement.IsMouseHovering, Terraria.GameContent.FontAssets.MouseText, Terraria.Main.mouseTextColor, Terraria.Main.mouseX, Terraria.Main.mouseY, Terraria.Main.screenHeight, Terraria.Main.screenWidth, and Terraria.GameContent.UI.States.UIAchievementsMenu.SetupGamepadPoints().

+ Here is the call graph for this function: