summaryrefslogtreecommitdiff
path: root/src/gui/buy.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-01-05 21:16:23 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-02-09 19:45:29 +0100
commit0fd9aef8bf376d44132edded2cdcb41ba7ee5b2f (patch)
tree24c19cd4af285fd8ede2d9d866668d005b5f6e26 /src/gui/buy.cpp
parent1a769276ce68285040bffd63bd1c01495ce411a7 (diff)
downloadmana-client-0fd9aef8bf376d44132edded2cdcb41ba7ee5b2f.tar.gz
mana-client-0fd9aef8bf376d44132edded2cdcb41ba7ee5b2f.tar.bz2
mana-client-0fd9aef8bf376d44132edded2cdcb41ba7ee5b2f.tar.xz
mana-client-0fd9aef8bf376d44132edded2cdcb41ba7ee5b2f.zip
Mostly whitespace and formatting changes
(merged from eAthena client)
Diffstat (limited to 'src/gui/buy.cpp')
-rw-r--r--src/gui/buy.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp
index 008c7bb9..cc2262ec 100644
--- a/src/gui/buy.cpp
+++ b/src/gui/buy.cpp
@@ -165,15 +165,15 @@ void BuyDialog::action(const gcn::ActionEvent &event)
Net::GameServer::Player::tradeWithNPC
(mShopItems->at(selectedItem)->getId(), mAmountItems);
- // Reset selection
- mAmountItems = 1;
- mSlider->setValue(1);
- mSlider->gcn::Slider::setScale(1, mMaxItems);
-
// Update money and adjust the max number of items that can be bought
mMaxItems -= mAmountItems;
setMoney(mMoney -
mAmountItems * mShopItems->at(selectedItem)->getPrice());
+
+ // Reset selection
+ mAmountItems = 1;
+ mSlider->setValue(1);
+ mSlider->gcn::Slider::setScale(1, mMaxItems);
}
}
@@ -187,8 +187,7 @@ void BuyDialog::valueChanged(const gcn::SelectionEvent &event)
mSlider->gcn::Slider::setScale(1, mMaxItems);
}
-void
-BuyDialog::updateButtonsAndLabels()
+void BuyDialog::updateButtonsAndLabels()
{
const int selectedItem = mShopItemList->getSelected();
int price = 0;