diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-08-12 08:52:03 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-08-12 08:52:03 +0000 |
commit | ebd331e0db4b7488efe572e93e1de5ae7fa15eca (patch) | |
tree | 13d2f1a3d93de9958ae2a5e3bad42a7603d1305e /src | |
parent | be53fc074afd6bfc2a9e2b16dadbde372fb7cd09 (diff) | |
download | Mana-ebd331e0db4b7488efe572e93e1de5ae7fa15eca.tar.gz Mana-ebd331e0db4b7488efe572e93e1de5ae7fa15eca.tar.bz2 Mana-ebd331e0db4b7488efe572e93e1de5ae7fa15eca.tar.xz Mana-ebd331e0db4b7488efe572e93e1de5ae7fa15eca.zip |
Resetting quantity to 0 after selecting other items in buy/sell dialogs.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/buy.cpp | 8 | ||||
-rw-r--r-- | src/gui/sell.cpp | 5 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp index 86ea764b..ecb1343e 100644 --- a/src/gui/buy.cpp +++ b/src/gui/buy.cpp @@ -164,6 +164,14 @@ void BuyDialog::action(const std::string& eventId) slider->setEnabled(true); increaseButton->setEnabled(true); m_amountItems = 0; + slider->setValue(0); + oss << m_amountItems; + quantityLabel->setCaption(oss.str()); + quantityLabel->adjustSize(); + oss.str("price : 0 GP"); + moneyLabel->setCaption(oss.str()); + moneyLabel->adjustSize(); + decreaseButton->setEnabled(false); m_maxItems = m_money / shopInventory[selectedItem].price; } else diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp index ae432a43..ed7658f2 100644 --- a/src/gui/sell.cpp +++ b/src/gui/sell.cpp @@ -148,9 +148,14 @@ void SellDialog::action(const std::string& eventId) { slider->setEnabled(true); increaseButton->setEnabled(true); + decreaseButton->setEnabled(false); m_maxItems = shopInventory[selectedItem].quantity; m_amountItems = 0; + slider->setValue(0); + oss << m_amountItems; + quantityLabel->setCaption(oss.str()); + quantityLabel->adjustSize(); } else { |