Skip to content

Commit

Permalink
Add Masteries to Player panel (EtienneLamoureux#234)
Browse files Browse the repository at this point in the history
and fix Classes/Masteries french translations
  • Loading branch information
hguy committed Oct 26, 2019
1 parent 0334e60 commit 3808af7
Show file tree
Hide file tree
Showing 4 changed files with 874 additions and 29 deletions.
13 changes: 9 additions & 4 deletions src/TQVaultAE.GUI/Components/StashPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ public StashPanel(ItemDragInfo dragInfo, Size panelSize, IServiceProvider servic
Size = new Size(PLAYERINFO_WIDTH, PLAYERINFO_HEIGHT),
//CellBorderStyle = TableLayoutPanelCellBorderStyle.Single,
Margin = new Padding(0),
Padding = new Padding(3),
Padding = new Padding(1),
BackColor = Color.Transparent,
};
table.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 60F));
table.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 40F));
table.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
table.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));

this.Controls.Add(table);
this.PlayerPanel = table;
Expand Down Expand Up @@ -206,10 +206,14 @@ private void DisplayPlayerInfo()
if (this.Player?.PlayerInfo != null)
{
DisplayPlayerInfoLastName = this.Player.PlayerName;
var pclass = Resources.ResourceManager.GetString(this.Player.PlayerInfo.Class) ?? string.Empty;
var mclass = Resources.ResourceManager.GetString($"Masteries{this.Player.PlayerInfo.Class}") ?? string.Empty;
mclass = mclass == Resources.Masteries ? string.Empty : mclass;
var pi = new Dictionary<string, string>
{
[Resources.CurrentLevel] = this.Player.PlayerInfo.CurrentLevel.ToString(),
[Resources.Class] = Resources.ResourceManager.GetString(this.Player.PlayerInfo.Class) ?? string.Empty,
[Resources.Class] = pclass,
[Resources.Masteries] = mclass,
[Resources.CurrentXP] = this.Player.PlayerInfo.CurrentXP.ToString(),
[Resources.DifficultyUnlocked] = Resources.ResourceManager.GetString($"Difficulty{this.Player.PlayerInfo.DifficultyUnlocked}") ?? "unknown",
[Resources.Money] = this.Player.PlayerInfo.Money.ToString(),
Expand Down Expand Up @@ -259,6 +263,7 @@ private void DisplayPlayerInfo()
UseVisualStyleBackColor = false,
Font = FontService.GetFontAlbertusMTLight(11F),
Margin = new Padding(0, 0, 0, 10),
Padding = new Padding(10, 0, 10, 0),
Visible = Config.Settings.Default.AllowCharacterEdit,
};
editButton.FlatAppearance.BorderSize = 0;
Expand Down
Loading

0 comments on commit 3808af7

Please sign in to comment.