summaryrefslogtreecommitdiff
path: root/src/gui/buy.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-11-02 21:26:57 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-11-02 21:26:57 +0000
commit19e15c87a1fc74f71fd6f9a743201a24ac582997 (patch)
treea615525476ef6bad8a2af4d8b90c8aea935f9109 /src/gui/buy.cpp
parent29f07d2f98b82674708f1185f26ed3c482992b04 (diff)
downloadmana-client-19e15c87a1fc74f71fd6f9a743201a24ac582997.tar.gz
mana-client-19e15c87a1fc74f71fd6f9a743201a24ac582997.tar.bz2
mana-client-19e15c87a1fc74f71fd6f9a743201a24ac582997.tar.xz
mana-client-19e15c87a1fc74f71fd6f9a743201a24ac582997.zip
Merged trunk changes from revision 2716 to 2756 into the 0.1.0 branch.
Diffstat (limited to 'src/gui/buy.cpp')
-rw-r--r--src/gui/buy.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp
index 41bdd67e..73f696b7 100644
--- a/src/gui/buy.cpp
+++ b/src/gui/buy.cpp
@@ -49,7 +49,7 @@ BuyDialog::BuyDialog():
mScrollArea = new ScrollArea(mItemList);
mSlider = new Slider(1.0);
mQuantityLabel = new gcn::Label("0");
- mMoneyLabel = new gcn::Label("Price: 0 GP");
+ mMoneyLabel = new gcn::Label("Price : 0 GP / 0 GP");
mIncreaseButton = new Button("+", "+", this);
mDecreaseButton = new Button("-", "-", this);
mBuyButton = new Button("Buy", "buy", this);
@@ -113,6 +113,8 @@ BuyDialog::~BuyDialog()
void BuyDialog::setMoney(int amount)
{
mMoney = amount;
+ mMoneyLabel->setCaption("Price : 0 GP / " + toString(mMoney) + " GP");
+ mMoneyLabel->adjustSize();
}
void BuyDialog::reset()
@@ -128,7 +130,7 @@ void BuyDialog::reset()
mDecreaseButton->setEnabled(false);
mQuantityLabel->setCaption("0");
mQuantityLabel->adjustSize();
- mMoneyLabel->setCaption("Price: 0");
+ mMoneyLabel->setCaption("Price : 0 GP / " + toString(mMoney) + " GP");
mMoneyLabel->adjustSize();
mItemDescLabel->setCaption("");
mItemEffectLabel->setCaption("");
@@ -158,7 +160,7 @@ void BuyDialog::action(const std::string &eventId, gcn::Widget *widget)
mSlider->setValue(0);
mQuantityLabel->setCaption("0");
mQuantityLabel->adjustSize();
- mMoneyLabel->setCaption("Price : 0 GP");
+ mMoneyLabel->setCaption("Price : 0 GP / " + toString(mMoney) + " GP");
mMoneyLabel->adjustSize();
// Disable buttons for buying and decreasing
@@ -259,7 +261,8 @@ void BuyDialog::action(const std::string &eventId, gcn::Widget *widget)
mQuantityLabel->adjustSize();
int price = mAmountItems * mShopItems->at(selectedItem).price;
- mMoneyLabel->setCaption("Price : " + toString(price) + " GP");
+ mMoneyLabel->setCaption("Price : " + toString(price) + " GP / "
+ + toString(mMoney) + " GP" );
mMoneyLabel->adjustSize();
}
}