Update StarItemTooltip.cpp

This commit is contained in:
Kae 2024-10-28 15:04:46 +11:00 committed by GitHub
parent e065981ce2
commit 391f148f11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -205,7 +205,7 @@ void ItemTooltipBuilder::describePersistentEffect(
auto listItem = container->addItem();
listItem->fetchChild<ImageWidget>("statusImage")
->setImage(statsConfig.get(valueModifier->statName).getString("icon"));
listItem->setLabel("statusLabel", strf("{}{}", valueModifier->value < 0 ? "-" : "", valueModifier->value));
listItem->setLabel("statusLabel", strf("{}{:.2f}", valueModifier->value < 0 ? "-" : "", valueModifier->value));
}
} else if (auto effectiveMultiplier = modifierEffect->ptr<StatEffectiveMultiplier>()) {
if (statsConfig.contains(effectiveMultiplier->statName)) {