summaryrefslogtreecommitdiff
path: root/src/gui/sell.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-02-15 11:29:40 +0000
committerJared Adams <jaxad0127@gmail.com>2009-02-15 11:29:40 +0000
commit79e803232438d41cce80467a97e9efde8e6c0c70 (patch)
treef8fd399a13913ccbc6942f6385f9852426f9ebf1 /src/gui/sell.cpp
parent0a106989bd16c48525f01cb8515809e74f37a8d8 (diff)
downloadmana-client-79e803232438d41cce80467a97e9efde8e6c0c70.tar.gz
mana-client-79e803232438d41cce80467a97e9efde8e6c0c70.tar.bz2
mana-client-79e803232438d41cce80467a97e9efde8e6c0c70.tar.xz
mana-client-79e803232438d41cce80467a97e9efde8e6c0c70.zip
Add configurable units system
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()));
}