Hud fixes

This commit is contained in:
Marco 2025-04-09 09:30:49 +02:00
commit c8cbad3268
2 changed files with 4 additions and 4 deletions

View file

@ -187,7 +187,7 @@ anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
offset_left = 4.0 offset_left = 4.0
offset_top = 6.0 offset_top = 6.0
offset_right = -235.0 offset_right = -160.0
offset_bottom = -3.0 offset_bottom = -3.0
grow_horizontal = 2 grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2

View file

@ -139,7 +139,7 @@ public partial class Hud : CanvasLayer
_fairyTerminatedPanel.Hide(); _fairyTerminatedPanel.Hide();
} }
_healthLabel.Text = $"{newHealth}/{maxHealth}"; _healthLabel.Text = $"{newHealth:N0}/{maxHealth:N0}";
if (_healthBar != null) if (_healthBar != null)
{ {
_healthBar.Value = newHealth; _healthBar.Value = newHealth;
@ -148,7 +148,7 @@ public partial class Hud : CanvasLayer
public void UpdateShield(float newValue, float maxValue) public void UpdateShield(float newValue, float maxValue)
{ {
_shieldLabel.Text = $"{newValue}/{maxValue}"; _shieldLabel.Text = $"{newValue:N0}/{maxValue:N0}";
if (_shieldBar != null) if (_shieldBar != null)
{ {
_shieldBar.Value = newValue; _shieldBar.Value = newValue;
@ -157,7 +157,7 @@ public partial class Hud : CanvasLayer
public void UpdateMotivation(float newValue, float maxValue) public void UpdateMotivation(float newValue, float maxValue)
{ {
_motivationLabel.Text = $"{newValue}%"; _motivationLabel.Text = $"{newValue:N0}%";
} }
public void UpdateInteractable(Interactable interactable) { public void UpdateInteractable(Interactable interactable) {