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

◆ DrawSelf()

override void Terraria.GameContent.UI.States.UIWorldLoad.DrawSelf ( SpriteBatch spriteBatch)
inlineprotectedvirtual

Reimplemented from Terraria.UI.UIElement.

Definition at line 61 of file UIWorldLoad.cs.

62 {
63 float overallProgress = 0f;
64 float currentProgress = 0f;
65 string text = string.Empty;
66 if (_progress != null)
67 {
68 overallProgress = (float)_progress.TotalProgress;
69 currentProgress = (float)_progress.Value;
71 }
72 _progressBar.SetProgress(overallProgress, currentProgress);
73 _progressMessage.Text = text;
74 if (WorldGen.drunkWorldGenText && !WorldGen.placingTraps && !WorldGen.getGoodWorldGen)
75 {
76 _progressMessage.Text = string.Concat(Main.rand.Next(999999999));
77 for (int i = 0; i < 3; i++)
78 {
79 if (Main.rand.Next(2) == 0)
80 {
81 _progressMessage.Text += Main.rand.Next(999999999);
82 }
83 }
84 }
85 if (WorldGen.getGoodWorldGen)
86 {
87 if (!WorldGen.noTrapsWorldGen || !WorldGen.placingTraps)
88 {
89 string text2 = "";
90 for (int num = _progressMessage.Text.Length - 1; num >= 0; num--)
91 {
92 text2 += _progressMessage.Text.Substring(num, 1);
93 }
94 _progressMessage.Text = text2;
95 }
96 }
97 else if (WorldGen.notTheBees)
98 {
99 _progressMessage.Text = Language.GetTextValue("UI.WorldGenEasterEgg_GeneratingBees");
100 }
101 Main.gameTips.Update();
102 Main.gameTips.Draw();
104 }
void SetProgress(float overallProgress, float currentProgress)
static string GetTextValue(string key)
Definition Language.cs:15

References Terraria.GameContent.UI.States.UIWorldLoad._progress, Terraria.GameContent.UI.States.UIWorldLoad._progressBar, Terraria.GameContent.UI.States.UIWorldLoad._progressMessage, Terraria.WorldGen.drunkWorldGenText, Terraria.Main.gameTips, Terraria.WorldGen.getGoodWorldGen, Terraria.Localization.Language.GetTextValue(), Terraria.WorldBuilding.GenerationProgress.Message, Terraria.WorldGen.noTrapsWorldGen, Terraria.WorldGen.notTheBees, Terraria.WorldGen.placingTraps, Terraria.Main.rand, Terraria.GameContent.UI.Elements.UIGenProgressBar.SetProgress(), System.text, Terraria.GameContent.UI.Elements.UIHeader.Text, Terraria.WorldBuilding.GenerationProgress.TotalProgress, Terraria.GameContent.UI.States.UIWorldLoad.UpdateGamepadSquiggle(), and Terraria.WorldBuilding.GenerationProgress.Value.