summaryrefslogtreecommitdiff
path: root/src/gui/windows/selldialog.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/selldialog.cpp
parent833e498f54c1d33be94c09214315b368cccaec06 (diff)
downloadmv-6b291b6515825f4ce0e09df5dec7ea1b619b63a7.tar.gz
mv-6b291b6515825f4ce0e09df5dec7ea1b619b63a7.tar.bz2
mv-6b291b6515825f4ce0e09df5dec7ea1b619b63a7.tar.xz
mv-6b291b6515825f4ce0e09df5dec7ea1b619b63a7.zip
improve a bit different code.
Diffstat (limited to 'src/gui/windows/selldialog.cpp')
-rw-r--r--src/gui/windows/selldialog.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/windows/selldialog.cpp b/src/gui/windows/selldialog.cpp
index 1607733a4..7cd6fd49f 100644
--- a/src/gui/windows/selldialog.cpp
+++ b/src/gui/windows/selldialog.cpp
@@ -162,7 +162,7 @@ SellDialog::~SellDialog()
void SellDialog::reset()
{
mShopItems->clear();
- mSlider->setValue2(0);
+ mSlider->setValue(0);
mShopItemList->setSelected(-1);
updateButtonsAndLabels();
}
@@ -213,19 +213,19 @@ void SellDialog::action(const ActionEvent &event)
else if (eventId == "inc" && mAmountItems < mMaxItems)
{
mAmountItems++;
- mSlider->setValue2(mAmountItems);
+ mSlider->setValue(mAmountItems);
updateButtonsAndLabels();
}
else if (eventId == "dec" && mAmountItems > 1)
{
mAmountItems--;
- mSlider->setValue2(mAmountItems);
+ mSlider->setValue(mAmountItems);
updateButtonsAndLabels();
}
else if (eventId == "max")
{
mAmountItems = mMaxItems;
- mSlider->setValue2(mAmountItems);
+ mSlider->setValue(mAmountItems);
updateButtonsAndLabels();
}
else if ((eventId == "presell" || eventId == "sell" || eventId == "yes")
@@ -269,7 +269,7 @@ void SellDialog::action(const ActionEvent &event)
mPlayerMoney +=
mAmountItems * mShopItems->at(selectedItem)->getPrice();
mAmountItems = 1;
- mSlider->setValue2(0);
+ mSlider->setValue(0);
if (mMaxItems)
{
@@ -304,7 +304,7 @@ void SellDialog::valueChanged(const SelectionEvent &event A_UNUSED)
{
// Reset amount of items and update labels
mAmountItems = 1;
- mSlider->setValue2(0);
+ mSlider->setValue(0);
updateButtonsAndLabels();
mSlider->setScale(1, mMaxItems);