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

◆ BuildPage()

void Terraria.GameContent.UI.States.UIResourcePackSelectionMenu.BuildPage ( )
inlineprivate

Definition at line 290 of file UIResourcePackSelectionMenu.cs.

291 {
294 uIElement.Width.Set(0f, 0.8f);
295 uIElement.MaxWidth.Set(800f, 0f);
296 uIElement.MinWidth.Set(600f, 0f);
297 uIElement.Top.Set(240f, 0f);
298 uIElement.Height.Set(-240f, 1f);
299 uIElement.HAlign = 0.5f;
302 {
304 Height = new StyleDimension(-110f, 1f),
305 BackgroundColor = new Color(33, 43, 79) * 0.8f,
306 PaddingRight = 0f,
307 PaddingLeft = 0f
308 };
309 uIElement.Append(uIPanel);
310 int num = 35;
311 int num2 = num;
312 int num3 = 30;
314 {
317 VAlign = 1f
318 };
319 uIElement2.SetPadding(0f);
320 uIPanel.Append(uIElement2);
322 {
323 Width = new StyleDimension(-20f, 0.5f),
324 Height = new StyleDimension(0f, 1f),
325 Left = new StyleDimension(10f, 0f)
326 };
327 uIElement3.SetPadding(0f);
328 uIElement2.Append(uIElement3);
330 {
331 Width = new StyleDimension(-20f, 0.5f),
332 Height = new StyleDimension(0f, 1f),
333 Left = new StyleDimension(-10f, 0f),
334 HAlign = 1f
335 };
336 uIElement4.SetPadding(0f);
337 uIElement2.Append(uIElement4);
338 UIList uIList = new UIList
339 {
340 Width = new StyleDimension(-25f, 1f),
341 Height = new StyleDimension(0f, 1f),
342 ListPadding = 5f,
343 HAlign = 1f
344 };
345 uIElement3.Append(uIList);
347 UIList uIList2 = new UIList
348 {
349 Width = new StyleDimension(-25f, 1f),
350 Height = new StyleDimension(0f, 1f),
351 ListPadding = 5f,
352 HAlign = 0f,
353 Left = new StyleDimension(0f, 0f)
354 };
355 uIElement4.Append(uIList2);
357 uIPanel.Append(_titleAvailable = new UIText(Language.GetText("UI.AvailableResourcePacksTitle"))
358 {
359 HAlign = 0f,
360 Left = new StyleDimension(25f, 0f),
361 Width = new StyleDimension(-25f, 0.5f),
362 VAlign = 0f,
363 Top = new StyleDimension(10f, 0f)
364 });
365 uIPanel.Append(_titleEnabled = new UIText(Language.GetText("UI.EnabledResourcePacksTitle"))
366 {
367 HAlign = 1f,
368 Left = new StyleDimension(-25f, 0f),
369 Width = new StyleDimension(-25f, 0.5f),
370 VAlign = 0f,
371 Top = new StyleDimension(10f, 0f)
372 });
374 {
375 HAlign = 0.5f,
376 VAlign = 0f,
377 Top = new StyleDimension(-44f, 0f),
378 BackgroundColor = new Color(73, 94, 171)
379 };
380 uITextPanel.SetPadding(13f);
381 uIElement.Append(uITextPanel);
383 {
384 Height = new StyleDimension(0f, 1f),
385 HAlign = 0f,
386 Left = new StyleDimension(0f, 0f)
387 };
388 uIElement3.Append(uIScrollbar);
391 {
392 Height = new StyleDimension(-12f, 1f),
393 HAlign = 0.5f,
394 VAlign = 1f,
395 Color = new Color(89, 116, 213, 255) * 0.9f
396 };
397 uIPanel.Append(element);
399 {
400 Width = new StyleDimension(-num2, 0.5f),
401 VAlign = 0f,
402 HAlign = 0f,
403 Color = new Color(89, 116, 213, 255) * 0.9f,
404 Top = new StyleDimension(num3, 0f),
405 Left = new StyleDimension(num, 0f)
406 };
408 {
409 Width = new StyleDimension(-num2, 0.5f),
410 VAlign = 0f,
411 HAlign = 1f,
412 Color = new Color(89, 116, 213, 255) * 0.9f,
413 Top = new StyleDimension(num3, 0f),
414 Left = new StyleDimension(-num, 0f)
415 };
417 {
418 Height = new StyleDimension(0f, 1f),
419 HAlign = 1f
420 };
421 uIElement4.Append(uIScrollbar2);
424 }
void SetScrollbar(UIScrollbar scrollbar)
Definition UIList.cs:141
static LocalizedText GetText(string key)
Definition Language.cs:10
StyleDimension Height
Definition UIElement.cs:29
void Append(UIElement element)
Definition UIElement.cs:166
StyleDimension Left
Definition UIElement.cs:25
StyleDimension Width
Definition UIElement.cs:27
StyleDimension Top
Definition UIElement.cs:23
static StyleDimension Fill
static StyleDimension FromPixelsAndPercent(float pixels, float percent)

References Terraria.UI.UIElement.UIElement(), Terraria.GameContent.UI.States.UIResourcePackSelectionMenu._availablePacksList, Terraria.GameContent.UI.States.UIResourcePackSelectionMenu._enabledPacksList, Terraria.GameContent.UI.States.UIResourcePackSelectionMenu._titleAvailable, Terraria.GameContent.UI.States.UIResourcePackSelectionMenu._titleEnabled, Terraria.GameContent.UI.States.UIResourcePackSelectionMenu.AddBackAndFolderButtons(), Terraria.UI.UIElement.Append(), Microsoft.Xna.Framework.Graphics.Color, Terraria.UI.StyleDimension.Fill, Terraria.UI.StyleDimension.FromPixelsAndPercent(), Terraria.Localization.Language.GetText(), Terraria.UI.UIElement.HAlign, Terraria.UI.UIElement.Height, Terraria.UI.UIElement.Left, Terraria.UI.UIElement.PaddingLeft, Terraria.UI.UIElement.PaddingRight, Terraria.UI.UIElement.RemoveAllChildren(), Terraria.GameContent.UI.Elements.UIList.SetScrollbar(), Terraria.UI.UIElement.Top, Terraria.UI.UIElement.VAlign, and Terraria.UI.UIElement.Width.

Referenced by Terraria.GameContent.UI.States.UIResourcePackSelectionMenu.UIResourcePackSelectionMenu().