diff options
author | Yohann Ferreira <bertram@cegetel.net> | 2006-10-09 01:15:05 +0000 |
---|---|---|
committer | Yohann Ferreira <bertram@cegetel.net> | 2006-10-09 01:15:05 +0000 |
commit | 2060b23e04f5facecbec6822e1f6d806981b74f8 (patch) | |
tree | 67e26190fcc8ac42703eee973eb5e312c989272b | |
parent | 479f674875455fbe26e712d22518cc896b020c16 (diff) | |
download | mana-2060b23e04f5facecbec6822e1f6d806981b74f8.tar.gz mana-2060b23e04f5facecbec6822e1f6d806981b74f8.tar.bz2 mana-2060b23e04f5facecbec6822e1f6d806981b74f8.tar.xz mana-2060b23e04f5facecbec6822e1f6d806981b74f8.zip |
little tweaks to buy and buy/sell dialogs.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/gui/buy.cpp | 11 | ||||
-rw-r--r-- | src/gui/buysell.cpp | 2 |
3 files changed, 15 insertions, 4 deletions
@@ -1,3 +1,8 @@ +2006-10-09 Yohann Ferreira <bertram@cegetel.net> + + * src/gui/buysell.cpp, src/gui/buy.cpp : A little tweak to the buy + dialogs. + 2006-10-07 Bjørn Lindeijer <bjorn@lindeijer.nl> * src/resources/mapreader.cpp: Added support for gzip compressed map @@ -57,6 +62,7 @@ * data/graphics/maps/new_2-1.tmx.gz: Matt Howe fixed up cave map. +>>>>>>> .r2727 2006-09-26 Eugenio Favalli <elvenprogrammer@gmail.com> * data/graphics/maps/new_6-1.tmx.gz: Alderan fixed a map issue. 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(); } } diff --git a/src/gui/buysell.cpp b/src/gui/buysell.cpp index 394dcd04..e2e0e686 100644 --- a/src/gui/buysell.cpp +++ b/src/gui/buysell.cpp @@ -48,6 +48,8 @@ BuySellDialog::BuySellDialog(): setContentSize(x, 2 * y + buyButton->getHeight()); setLocationRelativeTo(getParent()); + + requestFocus(); } void BuySellDialog::action(const std::string& eventId, gcn::Widget* widget) |