summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--src/gui/buy.cpp11
-rw-r--r--src/gui/buysell.cpp2
3 files changed, 15 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 32d07a62..e3195d8b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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)