diff options
author | grbr404 <166065505+grbr404@users.noreply.github.com> | 2025-06-05 22:08:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-05 22:08:15 +0200 |
commit | aafc44a77e46c25e6097b98e7fdae76ef4aee7cd (patch) | |
tree | d96948397fc137a147f7a4dcb889281ffd560a88 | |
parent | f4217740b311b24d4bc0aa51633a0d342ab76086 (diff) |
made it support up to max posible stack amount
-rw-r--r-- | source/windowing/StarItemSlotWidget.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/source/windowing/StarItemSlotWidget.cpp b/source/windowing/StarItemSlotWidget.cpp index bd2e26b..232f5e1 100644 --- a/source/windowing/StarItemSlotWidget.cpp +++ b/source/windowing/StarItemSlotWidget.cpp @@ -188,14 +188,20 @@ void ItemSlotWidget::renderImpl() { if (m_item->count() > 1 && m_showCount) { // we don't need to tell people that there's only 1 of something std::string formattedCount; - if (m_item->count() >= 1000000000000000) { // Quadrillions (Q) - formattedCount = toString(m_item->count() / 1000000000000000) + "Q"; - } else if (m_item->count() >= 1000000000) { // Billions (B) - formattedCount = toString(m_item->count() / 1000000000) + "B"; - } else if (m_item->count() >= 1000000) { // Millions (M) - formattedCount = toString(m_item->count() / 1000000) + "M"; - } else if (m_item->count() >= 1000) { // Thousands (K) - formattedCount = toString(m_item->count() / 1000) + "K"; + if (m_item->count() >= 1000000000000000000000) { // Sextillion (S) + formattedCount = toString(m_item->count() / 1000000000000000000000) + "S"; + } else if (m_item->count() >= 1000000000000000000) { // Quintillion (Q) + formattedCount = toString(m_item->count() / 1000000000000000000) + "Q"; + } else if (m_item->count() >= 1000000000000000) { // Quadrillion (q) + formattedCount = toString(m_item->count() / 1000000000000000) + "q"; + } else if (m_item->count() >= 1000000000000) { // Trillion (t) + formattedCount = toString(m_item->count() / 1000000000000) + "t"; + } else if (m_item->count() >= 1000000000) { // Billion (b) + formattedCount = toString(m_item->count() / 1000000000) + "b"; + } else if (m_item->count() >= 1000000) { // Million (m) + formattedCount = toString(m_item->count() / 1000000) + "m"; + } else if (m_item->count() >= 1000) { // Thousand (k) + formattedCount = toString(m_item->count() / 1000) + "k"; } else { formattedCount = toString(m_item->count()); } |