94 BackgroundColor =
new Color(33, 43, 79) * 0.8f
107 uIElement2.PaddingTop = 8f;
108 uIElement2.PaddingBottom = 12f;
123 uIElement.PaddingBottom = 0f;
124 uIElement.PaddingTop = 0f;
136 ShowHighlightWhenSelected =
false
163 ShowHighlightWhenSelected =
false
176 DistanceFromTitleToOption = 29f
217 Container.
Append(element);
269 uISlicedImage.Color = Color.LightGray * 0.7f;
279 uIText.PaddingLeft = 20f;
280 uIText.PaddingRight = 20f;
281 uIText.PaddingTop = 6f;
312 string[]
array5 =
new string[3] {
"Images/UI/WorldCreation/IconSizeSmall",
"Images/UI/WorldCreation/IconSizeMedium",
"Images/UI/WorldCreation/IconSizeLarge" };
314 for (
int i = 0; i <
array6.Length; i++)
319 groupOptionButton.HAlign = (float)i / (
float)(array6.Length - 1);
321 groupOptionButton.OnLeftMouseDown +=
clickEvent;
338 WorldDifficultyId.Master
361 string[]
array5 =
new string[4] {
"Images/UI/WorldCreation/IconDifficultyCreative",
"Images/UI/WorldCreation/IconDifficultyNormal",
"Images/UI/WorldCreation/IconDifficultyExpert",
"Images/UI/WorldCreation/IconDifficultyMaster" };
363 for (
int i = 0; i <
array6.Length; i++)
368 groupOptionButton.HAlign = (float)i / (
float)(array6.Length - 1);
370 groupOptionButton.OnLeftMouseDown +=
clickEvent;
406 string[]
array5 =
new string[3] {
"Images/UI/WorldCreation/IconEvilRandom",
"Images/UI/WorldCreation/IconEvilCorruption",
"Images/UI/WorldCreation/IconEvilCrimson" };
408 for (
int i = 0; i <
array6.Length; i++)
413 groupOptionButton.HAlign = (float)i / (
float)(array6.Length - 1);
415 groupOptionButton.OnLeftMouseDown +=
clickEvent;
666 Main.maxTilesX = 4200;
667 Main.maxTilesY = 1200;
670 Main.maxTilesX = 6400;
671 Main.maxTilesY = 1800;
674 Main.maxTilesX = 8400;
675 Main.maxTilesY = 2400;
697 WorldGen.WorldGenParam_Evil = -1;
700 WorldGen.WorldGenParam_Evil = 0;
703 WorldGen.WorldGenParam_Evil = 1;
721 WorldGen.noTrapsWorldGen =
false;
722 WorldGen.notTheBees =
false;
723 WorldGen.getGoodWorldGen =
false;
724 WorldGen.tenthAnniversaryWorldGen =
false;
725 WorldGen.dontStarveWorldGen =
false;
726 WorldGen.tempRemixWorldGen =
false;
727 WorldGen.tempTenthAnniversaryWorldGen =
false;
728 WorldGen.everythingWorldGen =
false;
731 WorldGen.noTrapsWorldGen =
true;
735 WorldGen.notTheBees =
true;
739 WorldGen.getGoodWorldGen =
true;
743 WorldGen.tempRemixWorldGen =
true;
747 WorldGen.tempTenthAnniversaryWorldGen =
true;
751 WorldGen.dontStarveWorldGen =
true;
755 WorldGen.noTrapsWorldGen =
true;
756 WorldGen.notTheBees =
true;
757 WorldGen.getGoodWorldGen =
true;
758 WorldGen.tempTenthAnniversaryWorldGen =
true;
759 WorldGen.dontStarveWorldGen =
true;
760 WorldGen.tempRemixWorldGen =
true;
761 WorldGen.everythingWorldGen =
true;
770 if (
array.Length != 4)
789 if (
int.TryParse(
array[1],
out result))
807 if (
int.TryParse(
array[2],
out result))
834 Noun = localizedText4.Value
852 base.Draw(spriteBatch);
858 UILinkPointNavigator.Shortcuts.BackButtonCommand = 1;
884 case "RandomizeName":
887 case "RandomizeSeed":
955 for (
int m = 0;
m <
array.Length;
m++)
968 uILinkPoint3.Up =
array3[array3.Length - 1].ID;
969 uILinkPoint2.Up =
array3[0].ID;
978 uILinkPoint3.Up =
array2[array2.Length - 1].ID;
979 uILinkPoint2.Up =
array2[0].ID;
987 uILinkPoint7.Down =
array[0].ID;
991 uILinkPoint6.Down =
array[0].ID;
998 for (
int i = 0; i < num; i++)
1009 for (
int i = 1; i < pointsLine.Length - 1; i++)
1027 return a.Id.CompareTo(
b.Id);
static byte Min(byte val1, byte val2)
static byte Max(byte val1, byte val2)
static void PlaySound(int type, Vector2 position, int style=1)
void SetContents(string name)
void TrimDisplayIfOverElementDimensions(int padding)
void SetText(string text)
void UpdateOption(byte difficulty, byte evil, byte size)
override void Draw(SpriteBatch spriteBatch)
void ClearOptionDescription(UIMouseEvent evt, UIElement listeningElement)
const int MAX_NAME_LENGTH
void ClickRandomizeSeed(UIMouseEvent evt, UIElement listeningElement)
void Click_NamingAndCreating(UIMouseEvent evt, UIElement listeningElement)
void AddWorldDifficultyOptions(UIElement container, float accumualtedHeight, MouseEvent clickEvent, string tagGroup, float usableWidthPercent)
UICharacterNameButton _seedPlate
static void AddHorizontalSeparator(UIElement Container, float accumualtedHeight)
const int MAX_SEED_LENGTH
static void ProcessSpecialWorldSeeds(string processedSeed)
void MakeBackAndCreatebuttons(UIElement outerContainer)
int SortPoints(SnapPoint a, SnapPoint b)
void FadedMouseOut(UIMouseEvent evt, UIElement listeningElement)
List< SnapPoint > GetSnapGroup(List< SnapPoint > ptsOnPage, string groupName)
void LoopHorizontalLineLinks(UILinkPoint[] pointsLine)
void FinishCreatingWorld()
void Click_GoBack(UIMouseEvent evt, UIElement listeningElement)
void AssignRandomWorldSeed()
void ClickDifficultyOption(UIMouseEvent evt, UIElement listeningElement)
void OnFinishedSettingSeed(string seed)
void AssignRandomWorldName()
void FadedMouseOver(UIMouseEvent evt, UIElement listeningElement)
void ClickRandomizeName(UIMouseEvent evt, UIElement listeningElement)
void AddWorldEvilOptions(UIElement container, float accumualtedHeight, MouseEvent clickEvent, string tagGroup, float usableWidthPercent)
void MakeInfoMenu(UIElement parentContainer)
void UpdatePreviewPlate()
void OnFinishedSettingName(string name)
UICharacterNameButton _namePlate
void Click_SetName(UIMouseEvent evt, UIElement listeningElement)
GroupOptionButton< WorldDifficultyId >[] _difficultyButtons
UIWorldCreationPreview _previewPlate
void Click_SetSeed(UIMouseEvent evt, UIElement listeningElement)
WorldDifficultyId _optionDifficulty
void AddWorldSizeOptions(UIElement container, float accumualtedHeight, MouseEvent clickEvent, string tagGroup, float usableWidthPercent)
void ClickSizeOption(UIMouseEvent evt, UIElement listeningElement)
void ShowOptionDescription(UIMouseEvent evt, UIElement listeningElement)
void ProcessSeed(out string processedSeed)
void SetupGamepadPoints(SpriteBatch spriteBatch)
void ClickEvilOption(UIMouseEvent evt, UIElement listeningElement)
GroupOptionButton< WorldSizeId >[] _sizeButtons
void EstablishUpDownRelationship(UILinkPoint[] topSide, UILinkPoint[] bottomSide)
GroupOptionButton< WorldEvilId >[] _evilButtons
void OnFinishedNamingAndCreating(string name)
void AddDescriptionPanel(UIElement container, float accumulatedHeight, string tagGroup)
static readonly Color FancyUIFatButtonMouseOver
static WorldFileData CreateMetadata(string name, bool cloudSave, int GameMode)
static LocalizedText[] menu
static LocalizedText[] misc
static LanguageSearchFilter CreateDialogFilter(string startsWith, object substitutions)
static LocalizedText SelectRandom(LanguageSearchFilter filter, UnifiedRandom random=null)
static LocalizedText GetText(string key)
static string GetTextValue(string key)
static WorldFileData ActiveWorldFileData
static UserInterface MenuUI
static Microsoft.Xna.Framework.Color creativeModeColor
static Microsoft.Xna.Framework.Color mcColor
static void OpenWorldSelectUI()
static PlayerFileData ActivePlayerFileData
static UnifiedRandom rand
static IAssetRepository Assets
static Terraria.Social.Base.CloudSocialModule Cloud
static Dictionary< int, UILinkPoint > Points
static void SetPosition(int ID, Vector2 Position)
void Append(UIElement element)
virtual void Recalculate()
virtual List< SnapPoint > GetSnapPoints()
static void setWorldSize()
static Task CreateNewWorld(GenerationProgress progress=null)
static Color MediumPurple
static Color Lerp(Color value1, Color value2, float amount)
static StyleDimension FromPixels(float pixels)
static StyleDimension FromPercent(float percent)
static StyleDimension FromPixelsAndPercent(float pixels, float percent)