TModLoader v1.4.4.9
TModLoader 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 62 of file UIWorldLoad.cs.

63 {
64 float overallProgress = 0f;
65 float currentProgress = 0f;
66 string text = string.Empty;
67 if (_progress != null)
68 {
71 text = _progress.Message;
72 }
73 if (text != _progressMessage.Text)
74 {
75 Logging.tML.Info((object)(text + "..."));
76 }
78 _progressMessage.Text = text;
79 if (WorldGen.drunkWorldGenText && !WorldGen.placingTraps && !WorldGen.getGoodWorldGen)
80 {
81 _progressMessage.Text = string.Concat(Main.rand.Next(999999999));
82 for (int i = 0; i < 3; i++)
83 {
84 if (Main.rand.Next(2) == 0)
85 {
86 _progressMessage.Text += Main.rand.Next(999999999);
87 }
88 }
89 }
90 if (WorldGen.getGoodWorldGen)
91 {
92 if (!WorldGen.noTrapsWorldGen || !WorldGen.placingTraps)
93 {
94 string text2 = "";
95 for (int num = _progressMessage.Text.Length - 1; num >= 0; num--)
96 {
97 text2 += _progressMessage.Text.Substring(num, 1);
98 }
99 _progressMessage.Text = text2;
100 }
101 }
102 else if (WorldGen.notTheBees)
103 {
104 _progressMessage.Text = Language.GetTextValue("UI.WorldGenEasterEgg_GeneratingBees");
105 }
106 Main.gameTips.Update();
107 Main.gameTips.Draw();
109 }
void SetProgress(float overallProgress, float currentProgress)
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.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(), Terraria.GameContent.UI.Elements.UIHeader.Text, Terraria.ModLoader.Logging.tML, Terraria.WorldBuilding.GenerationProgress.TotalProgress, Terraria.GameContent.UI.States.UIWorldLoad.UpdateGamepadSquiggle(), and Terraria.WorldBuilding.GenerationProgress.Value.

+ Here is the call graph for this function: