109 _player.difficulty = 0;
132 BackgroundColor =
new Color(33, 43, 79) * 0.8f
144 uIElement2.PaddingTop = 4f;
145 uIElement2.PaddingBottom = 0f;
154 uIElement3.PaddingTop = 3f;
155 uIElement3.PaddingBottom = 0f;
180 container.
Append(element);
221 for (
int i = 0; i <
count; i++)
263 for (
int j = 0;
j < 2;
j++)
281 uIColoredImageButton.HAlign = 0f;
282 uIColoredImageButton.VAlign = 0f;
409 uIColoredImageButton.VAlign = 0f;
410 uIColoredImageButton.HAlign = 0f;
420 uIColoredImageButton.VAlign = 0f;
421 uIColoredImageButton.HAlign = 0f;
436 uIElement.PaddingBottom = 0f;
437 uIElement.PaddingTop = 0f;
441 uICharacterNameButton.HAlign = 0.5f;
467 uISlicedImage.Color = Color.LightGray * 0.7f;
507 uIText.PaddingLeft = 20f;
508 uIText.PaddingRight = 20f;
568 uIElement2.PaddingTop = 3f;
624 uIColoredSlider.VAlign = 0f;
625 uIColoredSlider.HAlign = 0f;
686 _currentColorHSL.X = value;
689 _currentColorHSL.Y = value;
692 _currentColorHSL.Z = value;
861 _player.Male =
false;
902 {
"hairStyle", _player.hair },
903 {
"clothingStyle", _player.skinVariant },
936 Formatting = (Formatting)1
948 int num = value.IndexOf(
"{");
953 value = value.Substring(num);
954 int num2 = value.LastIndexOf(
"}");
959 value = value.Substring(0,
num2 + 1);
961 if (dictionary ==
null)
987 _player.skinVariant =
num4;
1037 float num = (float)
Main.
rand.Next(60, 120) * 0.01f;
1042 player.skinColor.R = (byte)((
float)
Main.
rand.Next(240, 255) * num);
1043 player.skinColor.G = (byte)((
float)
Main.
rand.Next(110, 140) * num);
1044 player.skinColor.B = (byte)((
float)
Main.
rand.Next(75, 110) * num);
1051 switch (player.
hair + 1)
1122 player.Male =
false;
1162 _player.name = name.Trim();
1174 _player.name = name.Trim();
1192 if (difficulty == 3)
1194 _player.statLife = (_player.statLifeMax = 100);
1195 _player.statMana = (_player.statManaMax = 20);
1245 uint
b = result & 0xFF
u;
1246 uint g = (result >> 8) & 0
xFFu;
1247 uint
r = (result >> 16) & 0
xFFu;
1354 base.Draw(spriteBatch);
1386 vector.Y = Main.screenHeight - 30;
1390 vector.X = Main.screenWidth - 460;
1392 Utils.
DrawBorderStringFourWay(spriteBatch,
FontAssets.
MouseText.Value, text,
vector.X,
vector.Y,
new Color(
Main.
mouseTextColor,
Main.
mouseTextColor,
Main.
mouseTextColor,
Main.
mouseTextColor),
Color.
Black,
Vector2.
Zero);
1399 UILinkPointNavigator.Shortcuts.BackButtonCommand = 1;
1401 int num2 = num + 20;
1421 for (
int i = 0; i < list.Count; i++)
1426 uILinkPoint3.Left =
num3 - 1;
1427 uILinkPoint3.Right =
num3 + 1;
1428 uILinkPoint3.Down =
num2;
1431 uILinkPoint3.Left = -3;
1433 if (i == list.Count - 1)
1435 uILinkPoint3.Right = -4;
1439 uILinkPoint3.Down =
num2 + i;
1454 andSet3.Up = andSet3.ID - 1;
1455 andSet3.Down = andSet3.ID + 1;
1458 andSet3.Up = num + 2;
1479 _ = snapPoint3.Id / 10;
1480 _ = snapPoint3.Id % 10;
1486 andSet4.Left = andSet4.ID - 1;
1491 andSet4.Right = andSet4.ID + 1;
1496 andSet4.Up = andSet4.ID - 10;
1499 andSet4.Up = num + 2 +
m;
1501 andSet4.Down = andSet4.ID + 10;
1531 andSet5.Up =
num2 + 2;
1533 andSet5.Left = andSet5.ID - 1;
1534 andSet5.Right = andSet5.ID + 1;
1537 andSet5.Left = andSet5.ID + 2;
1542 andSet5.Right = andSet5.ID - 2;
1552 andSet6.Up = andSet6.ID - 1;
1553 andSet6.Down = andSet6.ID + 1;
1556 andSet6.Up = num + 2 + 5;
1560 andSet6.Down =
num2 + 20 + 2;
1577 andSet.Up =
num2 +
j + 2;
1584 andSet.Left = andSet.ID - 1;
1585 andSet.Right = andSet.ID + 1;
1589 andSet.Left = andSet.ID + 4;
1590 uILinkPoint.Up =
andSet.ID;
1595 andSet.Right = andSet.ID - 4;
1596 uILinkPoint2.Up =
andSet.ID;
1605 andSet2.Up = num + 2 +
k;
1606 andSet2.Left = andSet2.ID - 1;
1607 andSet2.Right = andSet2.ID + 1;
1610 andSet2.Left = andSet2.ID + 9;
1614 andSet2.Right = andSet2.ID - 9;
1616 andSet2.Down = down;
1619 andSet2.Down =
down2;
1675 return a.Name ==
comp;
1680 return a.Id.CompareTo(
b.Id);
1696 value.Z = (value.Z - 0.15f) / 0.85f;
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
void Add(TKey key, TValue value)
static CultureInfo CurrentCulture
static void PlaySound(int type, Vector2 position, int style=1)
static readonly CreativePowerManager Instance
static Asset< DynamicSpriteFont > MouseText
void SetContents(string name)
void SetMiddleTexture(Asset< Texture2D > texAsset)
void SetColor(Color color)
void SetSelected(bool selected)
void SetImageWithoutSettingSize(Asset< Texture2D > texture)
void SetText(string text)
UIColoredImageButton _genderFemale
UICharacterNameButton _charName
UIColoredImageButton _genderMale
void Click_PasteHex(UIMouseEvent evt, UIElement listeningElement)
UIColoredImageButton[] _colorPickers
void Click_Naming(UIMouseEvent evt, UIElement listeningElement)
float GetHSLSliderPosition(HSLSliderId id)
void SetupPlayerStatsAndInventoryBasedOnDifficulty()
UIElement _clothStylesContainer
void Click_RandomizePlayer(UIMouseEvent evt, UIElement listeningElement)
bool GetHexColor(string hexString, out Vector3 hsl)
void UpdateHexText(Color pendingColor)
void MakeCategoriesBar(UIElement categoryContainer)
CategoryId _selectedPicker
static Vector3 GetRandomColorVector()
UIElement _pasteHexButton
void MakeHairsylesMenu(UIElement middleInnerPanel)
int SortPoints(SnapPoint a, SnapPoint b)
UIElement _copyTemplateButton
void TryMovingCategory(int direction)
UICharacterCreation(Player player)
bool PointWithName(SnapPoint a, string comp)
void UpdateHSLValue(HSLSliderId id, float value)
UILinkPoint GetAndSet(int ptid, SnapPoint snap)
void Click_PastePlayerTemplate(UIMouseEvent evt, UIElement listeningElement)
void UpdateColorPickers()
void Click_NamingAndCreating(UIMouseEvent evt, UIElement listeningElement)
static Color ScaledHslToRgb(float hue, float saturation, float luminosity)
Color GetHSLSliderColorAt(HSLSliderId id, float pointAt)
void Click_CharGenderMale(UIMouseEvent evt, UIElement listeningElement)
override void Draw(SpriteBatch spriteBatch)
UIText _difficultyDescriptionText
const int MAX_NAME_LENGTH
void SetupGamepadPoints(SpriteBatch spriteBatch)
void UpdateSelectedGender()
void MakeInfoMenu(UIElement parentContainer)
UIColoredImageButton _clothingStylesCategoryButton
UIElement _randomizePlayerButton
UIColoredImageButton _charInfoCategoryButton
void MakeBackAndCreatebuttons(UIElement outerContainer)
UIElement _hairstylesContainer
void Click_GoBack(UIMouseEvent evt, UIElement listeningElement)
UIColoredSlider CreateHSLSliderButtonBase(HSLSliderId id)
void FinishCreatingCharacter()
void Click_CharGenderFemale(UIMouseEvent evt, UIElement listeningElement)
void MakeClothStylesMenu(UIElement middleInnerPanel)
void UpdateDifficultyDescription(UIMouseEvent evt, UIElement listeningElement)
void FadedMouseOver(UIMouseEvent evt, UIElement listeningElement)
static Color ScaledHslToRgb(Vector3 hsl)
void Click_HairStyles(UIMouseEvent evt, UIElement listeningElement)
void MoveToVisuallyClosestPoint()
void OnFinishedNaming(string name)
void Click_CharInfo(UIMouseEvent evt, UIElement listeningElement)
void Click_CharClothStyle(UIMouseEvent evt, UIElement listeningElement)
static Vector3 RgbToScaledHsl(Color color)
void UpdateHelpGlyphs(UIElement element)
UIElement _randomColorButton
static string GetHexText(Color pendingColor)
UIColoredImageButton CreateColorPicker(CategoryId id, string texturePath, float xPositionStart, float xPositionPerId)
void Click_CopyHex(UIMouseEvent evt, UIElement listeningElement)
void Click_ColorPicker(UIMouseEvent evt, UIElement listeningElement)
void MakeHSLMenu(UIElement parentContainer)
UIColoredImageButton CreatePickerWithoutClick(CategoryId id, string texturePath, float xPositionStart, float xPositionPerId)
void UnselectAllCategories()
void Click_ClothStyles(UIMouseEvent evt, UIElement listeningElement)
void OnFinishedNamingAndCreating(string name)
void Click_RandomizeSingleColor(UIMouseEvent evt, UIElement listeningElement)
void SelectColorPicker(CategoryId selection)
void Click_CopyPlayerTemplate(UIMouseEvent evt, UIElement listeningElement)
UIElement _pasteTemplateButton
UIColoredImageButton _hairStylesCategoryButton
void ApplyPendingColor(Color pendingColor)
void MakeCharPreview(UIPanel container)
UIColoredSlider CreateHSLSlider(HSLSliderId id)
UIElement _middleContainer
void FadedMouseOut(UIMouseEvent evt, UIElement listeningElement)
static readonly Color FancyUIFatButtonMouseOver
static PlayerFileData CreateAndSave(Player player)
static float HandleSliderHorizontalInput(float currentValue, float min, float max, float deadZone=0.2f, float sensitivity=0.5f)
bool Prefix(int prefixWeWant)
void SetDefaults(int Type=0)
static LocalizedText[] menu
static LocalizedText GetText(string key)
static string GetTextValue(string key)
static readonly LocalizedText Empty
static Microsoft.Xna.Framework.Color hcColor
static UserInterface MenuUI
static void LoadPlayers()
static Microsoft.Xna.Framework.Color creativeModeColor
static Microsoft.Xna.Framework.Color mcColor
static Vector2 MouseScreen
static byte mouseTextColor
static void OpenCharacterSelectUI()
static UnifiedRandom rand
static Vector3 rgbToHsl(Microsoft.Xna.Framework.Color newColor)
static Microsoft.Xna.Framework.Color hslToRgb(Vector3 hslVector)
static IAssetRepository Assets
static HairstyleUnlocksHelper Hairstyles
static bool runningCollectorsEdition
void AddBuff(int type, int timeToAdd, bool quiet=true, bool foodHack=false)
static void ChangePoint(int PointID)
static Dictionary< int, UILinkPoint > Points
static void SetPosition(int ID, Vector2 Position)
void Append(UIElement element)
void SetSnapPoint(string name, int id, Vector2? anchor=null, Vector2? offset=null)
virtual List< SnapPoint > GetSnapPoints()
static void DrawBorderStringFourWay(SpriteBatch sb, DynamicSpriteFont font, string text, float x, float y, Color textColor, Color borderColor, Vector2 origin, float scale=1f)
static Color Lerp(Color value1, Color value2, float amount)
static float Distance(Vector2 value1, Vector2 value2)
static Vector3 Clamp(Vector3 value1, Vector3 min, Vector3 max)
void CullPointsOutOfElementArea(SpriteBatch spriteBatch, List< SnapPoint > pointsAtMiddle, UIElement container)
static StyleDimension FromPixels(float pixels)
static StyleDimension FromPercent(float percent)
static StyleDimension FromPixelsAndPercent(float pixels, float percent)