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

summaryrefslogtreecommitdiff
path: root/source/windowing/StarItemSlotWidget.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-06-27 20:23:44 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-06-27 20:23:44 +1000
commit332983c97b7a729c4dc5f19aa9ee4a22c420f7d8 (patch)
treefd9c441b796b522bdd5c7f8fbd32f51b8eff2a28 /source/windowing/StarItemSlotWidget.cpp
parent14b9689b6d4f4ad5276c88130dc6e449bedc0709 (diff)
The Formatting String Catastrophe
Diffstat (limited to 'source/windowing/StarItemSlotWidget.cpp')
-rw-r--r--source/windowing/StarItemSlotWidget.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/windowing/StarItemSlotWidget.cpp b/source/windowing/StarItemSlotWidget.cpp
index a828838..cf12a8d 100644
--- a/source/windowing/StarItemSlotWidget.cpp
+++ b/source/windowing/StarItemSlotWidget.cpp
@@ -178,20 +178,20 @@ void ItemSlotWidget::renderImpl() {
}
int frame = (int)roundf(m_progress * 18); // TODO: Hardcoded lol
- context()->drawInterfaceQuad(String(strf("/interface/cooldown.png:%d", frame)), Vec2F(screenPosition()));
+ context()->drawInterfaceQuad(String(strf("/interface/cooldown.png:{}", frame)), Vec2F(screenPosition()));
if (m_item->count() > 1 && m_showCount) { // we don't need to tell people that there's only 1 of something
context()->setFont(m_font);
context()->setFontSize(m_fontSize);
context()->setFontColor(m_fontColor.toRgba());
context()->setFontMode(m_countFontMode);
- context()->renderInterfaceText(strf("%d", m_item->count()), m_countPosition.translated(Vec2F(screenPosition())));
+ context()->renderInterfaceText(strf("{}", m_item->count()), m_countPosition.translated(Vec2F(screenPosition())));
}
} else if (m_drawBackingImageWhenEmpty && m_backingImage != "") {
context()->drawInterfaceQuad(m_backingImage, Vec2F(screenPosition()));
int frame = (int)roundf(m_progress * 18); // TODO: Hardcoded lol
- context()->drawInterfaceQuad(String(strf("/interface/cooldown.png:%d", frame)), Vec2F(screenPosition()));
+ context()->drawInterfaceQuad(String(strf("/interface/cooldown.png:{}", frame)), Vec2F(screenPosition()));
}
if (m_highlightEnabled) {