diff options
| author | Gustavoeklund01 <eklundgu@gmail.com> | 2025-11-10 17:25:59 -0300 |
|---|---|---|
| committer | Gustavoeklund01 <eklundgu@gmail.com> | 2025-11-10 17:25:59 -0300 |
| commit | 1a042d7303081e8bc72e9e3c341db3e528c8d998 (patch) | |
| tree | cb56eafbd73ab8c7f8ba231fd512ae246b4dd64b /scripts/GUI/LeaderboardItem.cs | |
| parent | de99779d19b77d174c561cb3795538412f53bcbc (diff) | |
| parent | f46d058571d453ccf7ddf884ccb5d8694f970d7c (diff) | |
Diffstat (limited to 'scripts/GUI/LeaderboardItem.cs')
| -rw-r--r-- | scripts/GUI/LeaderboardItem.cs | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/scripts/GUI/LeaderboardItem.cs b/scripts/GUI/LeaderboardItem.cs new file mode 100644 index 0000000..c05bf58 --- /dev/null +++ b/scripts/GUI/LeaderboardItem.cs @@ -0,0 +1,41 @@ +using Godot; + +namespace TheLegendOfGustav.GUI; + +public partial class LeaderboardItem : HBoxContainer +{ + [Export] + public string PlayerName { get; set; } = "Jogador"; + [Export] + public string Floor { get; set; } = "Andar Máximo"; + [Export] + public string Kills { get; set; } = "Inimigos Mortos"; + [Export] + public string Damage { get; set; } = "Dano tomado"; + + private Label nameLabel; + private Label floorLabel; + private Label killsLabel; + private Label damageLabel; + + + // Called when the node enters the scene tree for the first time. + public override void _Ready() + { + nameLabel = GetNode<Label>("hdNome"); + floorLabel = GetNode<Label>("hdAndar"); + killsLabel = GetNode<Label>("hdkills"); + damageLabel = GetNode<Label>("hddamage"); + + + UpdateLabels(); + } + + public void UpdateLabels() + { + nameLabel.Text = PlayerName; + floorLabel.Text = Floor; + killsLabel.Text = Kills; + damageLabel.Text = Damage; + } +} |
