65 _playerPanel.OnLeftDoubleClick +=
PlayGame;
70 uIImageButton.VAlign = 1f;
71 uIImageButton.
Left.
Set(num, 0f);
72 uIImageButton.OnLeftClick +=
PlayGame;
78 uIImageButton2.VAlign = 1f;
79 uIImageButton2.
Left.
Set(num, 0f);
89 uIImageButton3.VAlign = 1f;
90 uIImageButton3.
Left.
Set(num, 0f);
99 uIImageButton4.VAlign = 1f;
100 uIImageButton4.
Left.
Set(num, 0f);
121 _buttonLabel.VAlign = 1f;
126 _deleteButtonLabel.VAlign = 1f;
127 _deleteButtonLabel.HAlign = 1f;
132 uIImageButton2.
SetSnapPoint(
"Favorite", snapPointIndex);
200 if (base.Parent.Parent is
UIList uIList)
202 uIList.UpdateOrder();
208 string newName = name.Trim();
247 Main.selectedPlayer = i;
277 if (base.Parent.Parent is
UIList uIList)
279 uIList.UpdateOrder();
287 if (
IsFavorite && !uICharacterListItem.IsFavorite)
291 if (!
IsFavorite && uICharacterListItem.IsFavorite)
295 if (
_data.
Name.CompareTo(uICharacterListItem._data.Name) != 0)
297 return _data.
Name.CompareTo(uICharacterListItem._data.Name);
299 return _data.
GetFileName().CompareTo(uICharacterListItem._data.GetFileName());
301 return base.CompareTo(
obj);
323 spriteBatch.
Draw(
_innerPanelTexture.
Value,
new Vector2(position.
X + 8f, position.
Y),
new Rectangle(8, 0, 8,
_innerPanelTexture.Height()),
Color.
White, 0f,
Vector2.
Zero,
new Vector2((width - 16f) / 8f, 1f),
SpriteEffects.None, 0f);
329 base.DrawSelf(spriteBatch);
332 float num = dimensions.X + dimensions.
Width;
342 spriteBatch.
Draw(
_dividerTexture.
Value,
new Vector2(num, innerDimensions.
Y + 21f),
null,
Color.
White, 0f,
Vector2.
Zero,
new Vector2((
GetDimensions().
X +
GetDimensions().
Width - num) / 8f, 1f),
SpriteEffects.None, 0f);
354 vector.X += num2 + 5f;
384 vector.X += num3 + 5f;
386 float num4 = innerDimensions.X + innerDimensions.Width - vector4.
X;
389 int num5 = playTime.Days * 24 + playTime.
Hours;
390 string text3 = ((num5 < 10) ?
"0" :
"") + num5 + playTime.
ToString(
"\\:mm\\:ss");
void Draw(Texture2D texture, Vector2 position, Color color)
static void PlaySound(int type, Vector2 position, int style=1)
static Asset< DynamicSpriteFont > MouseText
static Asset< Texture2D > Mana
static Asset< Texture2D > Heart
Asset< Texture2D > _buttonDeleteTexture
void PlayGame(UIMouseEvent evt, UIElement listeningElement)
Asset< Texture2D > _dividerTexture
void FavoriteMouseOver(UIMouseEvent evt, UIElement listeningElement)
void DeleteMouseOut(UIMouseEvent evt, UIElement listeningElement)
void DeleteMouseOver(UIMouseEvent evt, UIElement listeningElement)
void FavoriteButtonClick(UIMouseEvent evt, UIElement listeningElement)
Asset< Texture2D > _buttonFavoriteActiveTexture
void PlayMouseOver(UIMouseEvent evt, UIElement listeningElement)
Asset< Texture2D > _buttonCloudInactiveTexture
UIText _deleteButtonLabel
override void MouseOut(UIMouseEvent evt)
UICharacterListItem(PlayerFileData data, int snapPointIndex)
Asset< Texture2D > _innerPanelTexture
override void DrawSelf(SpriteBatch spriteBatch)
Asset< Texture2D > _buttonRenameTexture
void ButtonMouseOut(UIMouseEvent evt, UIElement listeningElement)
override int CompareTo(object obj)
Asset< Texture2D > _buttonFavoriteInactiveTexture
void RenameButtonClick(UIMouseEvent evt, UIElement listeningElement)
void OnFinishedSettingName(string name)
UIImageButton _deleteButton
void CloudButtonClick(UIMouseEvent evt, UIElement listeningElement)
Asset< Texture2D > _buttonCloudActiveTexture
void DrawPanel(SpriteBatch spriteBatch, Vector2 position, float width)
Asset< Texture2D > _buttonPlayTexture
void RenameMouseOver(UIMouseEvent evt, UIElement listeningElement)
void DeleteButtonClick(UIMouseEvent evt, UIElement listeningElement)
override void MouseOver(UIMouseEvent evt)
void CloudMouseOver(UIMouseEvent evt, UIElement listeningElement)
void SetAnimated(bool animated)
void SetVisibility(float whenActive, float whenInactive)
void SetText(string text)
void SetMaxInputLength(int length)
static readonly IdDictionary Search
string GetFileName(bool includeExtension=true)
override void MoveToLocal()
override void MoveToCloud()
void Rename(string newName)
static LocalizedText[] menu
static GameCulture FromCultureName(CultureName name)
static string GetTextValue(string key)
static Microsoft.Xna.Framework.Color hcColor
static UserInterface MenuUI
static Microsoft.Xna.Framework.Color creativeModeColor
static Microsoft.Xna.Framework.Color mcColor
static List< PlayerFileData > PlayerList
static void SelectPlayer(PlayerFileData data)
static void OpenCharacterSelectUI()
static IAssetRepository Assets
static Terraria.Social.Base.CloudSocialModule Cloud
void Append(UIElement element)
CalculatedStyle GetInnerDimensions()
void SetSnapPoint(string name, int id, Vector2? anchor=null, Vector2? offset=null)
CalculatedStyle GetDimensions()
void SetPadding(float pixels)
readonly UIElement Target
static Vector2 DrawBorderString(SpriteBatch sb, string text, Vector2 pos, Color color, float scale=1f, float anchorx=0f, float anchory=0f, int maxCharactersDisplayed=-1)
override string ToString()
void Set(float pixels, float precent)