summaryrefslogtreecommitdiff
path: root/scripts/GUI/LeaderboardItem.cs
diff options
context:
space:
mode:
authorMatheus <matheus.guedes.mg.m@gmail.com>2025-11-10 12:56:00 -0300
committerMatheus <matheus.guedes.mg.m@gmail.com>2025-11-10 12:56:00 -0300
commit0f3c49b7743f7c7fabf41fdf4cb3ffe1a4ac3bf4 (patch)
treedf940efb7502899441295acd5039311b9e6e4927 /scripts/GUI/LeaderboardItem.cs
parentc4f5404211ef654944d5615e9055c714441f8234 (diff)
Placar.
Diffstat (limited to 'scripts/GUI/LeaderboardItem.cs')
-rw-r--r--scripts/GUI/LeaderboardItem.cs41
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;
+ }
+}