summaryrefslogtreecommitdiff
path: root/src/gui/buy.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2006-10-09 01:15:05 +0000
committerYohann Ferreira <bertram@cegetel.net>2006-10-09 01:15:05 +0000
commit2060b23e04f5facecbec6822e1f6d806981b74f8 (patch)
tree67e26190fcc8ac42703eee973eb5e312c989272b /src/gui/buy.cpp
parent479f674875455fbe26e712d22518cc896b020c16 (diff)
downloadmana-client-2060b23e04f5facecbec6822e1f6d806981b74f8.tar.gz
mana-client-2060b23e04f5facecbec6822e1f6d806981b74f8.tar.bz2
mana-client-2060b23e04f5facecbec6822e1f6d806981b74f8.tar.xz
mana-client-2060b23e04f5facecbec6822e1f6d806981b74f8.zip
little tweaks to buy and buy/sell dialogs.
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 ddbfe90a..cad2e06f 100644
--- a/src/gui/buy.cpp
+++ b/src/gui/buy.cpp
@@ -52,7 +52,7 @@ BuyDialog::BuyDialog(Network *network):
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);
@@ -116,6 +116,8 @@ BuyDialog::~BuyDialog()
void BuyDialog::setMoney(int amount)
{
mMoney = amount;
+ mMoneyLabel->setCaption("Price : 0 GP / " + toString(mMoney) + " GP");
+ mMoneyLabel->adjustSize();
}
void BuyDialog::reset()
@@ -131,7 +133,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("");
@@ -161,7 +163,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
@@ -260,7 +262,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();
}
}