summaryrefslogtreecommitdiff
path: root/src/gui/buy.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/buy.cpp
parent0a106989bd16c48525f01cb8515809e74f37a8d8 (diff)
downloadmana-79e803232438d41cce80467a97e9efde8e6c0c70.tar.gz
mana-79e803232438d41cce80467a97e9efde8e6c0c70.tar.bz2
mana-79e803232438d41cce80467a97e9efde8e6c0c70.tar.xz
mana-79e803232438d41cce80467a97e9efde8e6c0c70.zip
Add configurable units system
Diffstat (limited to 'src/gui/buy.cpp')
-rw-r--r--src/gui/buy.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp
index 0c8c4d9d..23bf89f5 100644
--- a/src/gui/buy.cpp
+++ b/src/gui/buy.cpp
@@ -31,6 +31,7 @@
#include "widgets/layout.h"
#include "../npc.h"
+#include "../units.h"
#include "../net/messageout.h"
#include "../net/protocol.h"
@@ -54,7 +55,8 @@ BuyDialog::BuyDialog(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);
mBuyButton = new Button(_("Buy"), "buy", this);
@@ -235,5 +237,7 @@ void BuyDialog::updateButtonsAndLabels()
// Update quantity and money labels
mQuantityLabel->setCaption(strprintf("%d / %d", mAmountItems, mMaxItems));
mMoneyLabel->setCaption
- (strprintf(_("Price: %d GP / Total: %d GP"), price, mMoney - price));
+ (strprintf(_("Price: %s / Total: %s"),
+ Units::formatCurrency(price).c_str(),
+ Units::formatCurrency(mMoney - price).c_str()));
}