Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/frontend/StarInventory.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-04-23 11:46:21 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2024-04-23 11:46:21 +1000
commited3793ab004e1c6d21225f34c8369d12f6525334 (patch)
tree8d93b7aa540b729005ffdb5b2ea9fc77f358933e /source/frontend/StarInventory.cpp
parent85a23231d4e482f80a213c6f839e11963a6caa62 (diff)
reduce armor stat to 1 decimal place since it was spilling a little
Diffstat (limited to 'source/frontend/StarInventory.cpp')
-rw-r--r--source/frontend/StarInventory.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/frontend/StarInventory.cpp b/source/frontend/StarInventory.cpp
index 80055ee..55f99d6 100644
--- a/source/frontend/StarInventory.cpp
+++ b/source/frontend/StarInventory.cpp
@@ -364,16 +364,16 @@ void InventoryPane::update(float dt) {
techOverlay->setVisibility(m_player->techOverridden());
auto healthLabel = fetchChild<LabelWidget>("healthtext");
- healthLabel->setText(strf("{:.2f}", m_player->maxHealth()));
+ healthLabel->setText(strf("{:.1f}", m_player->maxHealth()));
auto energyLabel = fetchChild<LabelWidget>("energytext");
- energyLabel->setText(strf("{:.2f}", m_player->maxEnergy()));
+ energyLabel->setText(strf("{:.1f}", m_player->maxEnergy()));
auto weaponLabel = fetchChild<LabelWidget>("weapontext");
- weaponLabel->setText(strf("{:.2f}%", m_player->powerMultiplier() * 100));
+ weaponLabel->setText(strf("{:.1f}%", m_player->powerMultiplier() * 100));
auto defenseLabel = fetchChild<LabelWidget>("defensetext");
if (m_player->protection() == 0)
defenseLabel->setText("--");
else
- defenseLabel->setText(strf("{:.2f}", m_player->protection()));
+ defenseLabel->setText(strf("{:.1f}", m_player->protection()));
auto moneyLabel = fetchChild<LabelWidget>("lblMoney");
moneyLabel->setText(toString(m_player->currency("money")));
@@ -406,14 +406,14 @@ void InventoryPane::update(float dt) {
auto attackLabel = fetchChild<LabelWidget>("companionAttackStat");
if (auto attack = pet->stat("attack")) {
- attackLabel->setText(strf("{:.2f}", *attack));
+ attackLabel->setText(strf("{:.1f}", *attack));
} else {
attackLabel->setText("");
}
auto defenseLabel = fetchChild<LabelWidget>("companionDefenseStat");
if (auto defense = pet->stat("defense")) {
- defenseLabel->setText(strf("{:.2f}", *defense));
+ defenseLabel->setText(strf("{:.1f}", *defense));
} else {
defenseLabel->setText("");
}