summaryrefslogtreecommitdiff
path: root/src/gui/windows/buydialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-03-06 00:39:58 +0300
committerAndrei Karas <akaras@inbox.ru>2014-03-06 23:06:15 +0300
commit6b291b6515825f4ce0e09df5dec7ea1b619b63a7 (patch)
treef26a35a21cde34f45538a191b2196bf7c81d2693 /src/gui/windows/buydialog.cpp
parent833e498f54c1d33be94c09214315b368cccaec06 (diff)
downloadmanaverse-6b291b6515825f4ce0e09df5dec7ea1b619b63a7.tar.gz
manaverse-6b291b6515825f4ce0e09df5dec7ea1b619b63a7.tar.bz2
manaverse-6b291b6515825f4ce0e09df5dec7ea1b619b63a7.tar.xz
manaverse-6b291b6515825f4ce0e09df5dec7ea1b619b63a7.zip
improve a bit different code.
Diffstat (limited to 'src/gui/windows/buydialog.cpp')
-rw-r--r--src/gui/windows/buydialog.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp
index 7b1a1f6c0..772f08d32 100644
--- a/src/gui/windows/buydialog.cpp
+++ b/src/gui/windows/buydialog.cpp
@@ -311,7 +311,7 @@ void BuyDialog::reset()
// Reset previous selected items to prevent failing asserts
mShopItemList->setSelected(-1);
- mSlider->setValue2(0);
+ mSlider->setValue(0);
setMoney(0);
}
@@ -386,28 +386,28 @@ void BuyDialog::action(const ActionEvent &event)
else if (eventId == "inc" && mAmountItems < mMaxItems)
{
mAmountItems++;
- mSlider->setValue2(mAmountItems);
+ mSlider->setValue(mAmountItems);
mAmountField->setValue(mAmountItems);
updateButtonsAndLabels();
}
else if (eventId == "dec" && mAmountItems > 1)
{
mAmountItems--;
- mSlider->setValue2(mAmountItems);
+ mSlider->setValue(mAmountItems);
mAmountField->setValue(mAmountItems);
updateButtonsAndLabels();
}
else if (eventId == "max")
{
mAmountItems = mMaxItems;
- mSlider->setValue2(mAmountItems);
+ mSlider->setValue(mAmountItems);
mAmountField->setValue(mAmountItems);
updateButtonsAndLabels();
}
else if (eventId == "amount")
{
mAmountItems = mAmountField->getValue();
- mSlider->setValue2(mAmountItems);
+ mSlider->setValue(mAmountItems);
updateButtonsAndLabels();
}
else if (eventId == "buy" && mAmountItems > 0 && mAmountItems <= mMaxItems)
@@ -433,7 +433,7 @@ void BuyDialog::action(const ActionEvent &event)
// Reset selection
mAmountItems = 1;
mSlider->setScale(1, mMaxItems);
- mSlider->setValue2(1);
+ mSlider->setValue(1);
}
else if (tradeWindow)
{
@@ -453,7 +453,7 @@ void BuyDialog::valueChanged(const SelectionEvent &event A_UNUSED)
{
// Reset amount of items and update labels
mAmountItems = 1;
- mSlider->setValue2(1);
+ mSlider->setValue(1);
updateButtonsAndLabels();
mSlider->setScale(1, mMaxItems);