From 79e803232438d41cce80467a97e9efde8e6c0c70 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sun, 15 Feb 2009 11:29:40 +0000 Subject: Add configurable units system --- src/gui/sell.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/gui/sell.cpp') 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())); } -- cgit v1.2.3-70-g09d2