summaryrefslogtreecommitdiff
path: root/src/gui/sell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/sell.cpp')
-rw-r--r--src/gui/sell.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp
index e4be7921..a46f3ce6 100644
--- a/src/gui/sell.cpp
+++ b/src/gui/sell.cpp
@@ -31,6 +31,7 @@
#include "widgets/layout.h"
#include "../npc.h"
+#include "../units.h"
#include "../net/messageout.h"
#include "../net/protocol.h"
@@ -55,8 +56,8 @@ SellDialog::SellDialog(Network *network):
mScrollArea = new ScrollArea(mShopItemList);
mSlider = new Slider(1.0);
mQuantityLabel = new gcn::Label("0");
- mMoneyLabel = new gcn::Label(
- strprintf(_("Price: %d GP / Total: %d GP"), 0, 0));
+ mMoneyLabel = new gcn::Label(strprintf(_("Price: %s / Total: %s"),
+ "", ""));
mIncreaseButton = new Button("+", "+", this);
mDecreaseButton = new Button("-", "-", this);
mSellButton = new Button(_("Sell"), "sell", this);
@@ -249,7 +250,7 @@ void SellDialog::updateButtonsAndLabels()
// Update the quantity and money labels
mQuantityLabel->setCaption(strprintf("%d / %d", mAmountItems, mMaxItems));
- mMoneyLabel->setCaption
- (strprintf(_("Price: %d GP / Total: %d GP"),
- income, mPlayerMoney + income));
+ mMoneyLabel->setCaption(strprintf(_("Price: %s / Total: %s"),
+ Units::formatCurrency(income).c_str(),
+ Units::formatCurrency(mPlayerMoney - income).c_str()));
}