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

◆ PopulateLogs()

void Terraria.GameContent.UI.States.UIReportsPage.PopulateLogs ( UIList listContents)
inlineprivate

Definition at line 148 of file UIReportsPage.cs.

149 {
150 //IL_00d2: Unknown result type (might be due to invalid IL or missing references)
151 List<IssueReport> list = (from report in _reporters.SelectMany((IProvideReports reporter) => reporter.GetReports())
152 orderby report.timeReported
153 select report).ToList();
154 if (list.Count == 0)
155 {
156 UIText item = new UIText(Language.GetTextValue("Workshop.ReportLogsInitialMessage"))
157 {
158 HAlign = 0f,
159 VAlign = 0f,
162 IsWrapped = true,
163 WrappedTextBottomPadding = 0f,
164 TextOriginX = 0.5f,
165 TextColor = Color.Gray
166 };
167 listContents.Add(item);
168 }
169 for (int i = 0; i < list.Count; i++)
170 {
171 UIText uIText = new UIText(list[i].reportText)
172 {
173 HAlign = 0f,
174 VAlign = 0f,
177 IsWrapped = true,
178 WrappedTextBottomPadding = 0f,
179 TextOriginX = 0f
180 };
181 listContents.Add(uIText);
182 Asset<Texture2D> asset = Main.Assets.Request<Texture2D>("Images/UI/Divider");
184 {
187 ScaleToFit = true,
188 VAlign = 1f
189 };
190 uIText.Append(element);
191 }
192 UIElement item2 = new UIElement();
193 listContents.Add(item2);
194 }
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
StyleDimension Height
Definition UIElement.cs:29
StyleDimension Width
Definition UIElement.cs:27
static StyleDimension FromPixels(float pixels)
static StyleDimension FromPixelsAndPercent(float pixels, float percent)

References Terraria.UI.UIElement.UIElement(), Terraria.GameContent.UI.States.UIReportsPage._reporters, Terraria.Main.Assets, Terraria.UI.StyleDimension.FromPixels(), Terraria.UI.StyleDimension.FromPixelsAndPercent(), Terraria.Localization.Language.GetTextValue(), Terraria.UI.UIElement.HAlign, Terraria.UI.UIElement.Height, Terraria.UI.UIElement.VAlign, and Terraria.UI.UIElement.Width.

Referenced by Terraria.GameContent.UI.States.UIReportsPage.BuildPage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: