diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-03-06 00:39:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-03-06 23:06:15 +0300 |
commit | 6b291b6515825f4ce0e09df5dec7ea1b619b63a7 (patch) | |
tree | f26a35a21cde34f45538a191b2196bf7c81d2693 /src/gui/widgets/tabs | |
parent | 833e498f54c1d33be94c09214315b368cccaec06 (diff) | |
download | manaverse-6b291b6515825f4ce0e09df5dec7ea1b619b63a7.tar.gz manaverse-6b291b6515825f4ce0e09df5dec7ea1b619b63a7.tar.bz2 manaverse-6b291b6515825f4ce0e09df5dec7ea1b619b63a7.tar.xz manaverse-6b291b6515825f4ce0e09df5dec7ea1b619b63a7.zip |
improve a bit different code.
Diffstat (limited to 'src/gui/widgets/tabs')
-rw-r--r-- | src/gui/widgets/tabs/setup_colors.cpp | 16 | ||||
-rw-r--r-- | src/gui/widgets/tabs/setup_video.cpp | 12 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/gui/widgets/tabs/setup_colors.cpp b/src/gui/widgets/tabs/setup_colors.cpp index 940d0cd3f..eb7e695f4 100644 --- a/src/gui/widgets/tabs/setup_colors.cpp +++ b/src/gui/widgets/tabs/setup_colors.cpp @@ -96,7 +96,7 @@ Setup_Colors::Setup_Colors(const Widget2 *const widget) : mGradTypeSlider->setWidth(180); mGradTypeSlider->setActionEventId("slider_grad"); - mGradTypeSlider->setValue2(0); + mGradTypeSlider->setValue(0); mGradTypeSlider->addActionListener(this); mGradTypeSlider->setEnabled(false); @@ -128,7 +128,7 @@ Setup_Colors::Setup_Colors(const Widget2 *const widget) : mGradDelayText->setEnabled(false); mGradDelaySlider->setWidth(180); - mGradDelaySlider->setValue2(mGradDelayText->getValue()); + mGradDelaySlider->setValue(mGradDelayText->getValue()); mGradDelaySlider->setActionEventId("slider_graddelay"); mGradDelaySlider->addActionListener(this); mGradDelaySlider->setEnabled(false); @@ -139,7 +139,7 @@ Setup_Colors::Setup_Colors(const Widget2 *const widget) : mRedText->setEnabled(false); mRedSlider->setWidth(180); - mRedSlider->setValue2(mRedText->getValue()); + mRedSlider->setValue(mRedText->getValue()); mRedSlider->setActionEventId("slider_red"); mRedSlider->addActionListener(this); mRedSlider->setEnabled(false); @@ -150,7 +150,7 @@ Setup_Colors::Setup_Colors(const Widget2 *const widget) : mGreenText->setEnabled(false); mGreenSlider->setWidth(180); - mGreenSlider->setValue2(mGreenText->getValue()); + mGreenSlider->setValue(mGreenText->getValue()); mGreenSlider->setActionEventId("slider_green"); mGreenSlider->addActionListener(this); mGreenSlider->setEnabled(false); @@ -161,7 +161,7 @@ Setup_Colors::Setup_Colors(const Widget2 *const widget) : mBlueText->setEnabled(false); mBlueSlider->setWidth(180); - mBlueSlider->setValue2(mBlueText->getValue()); + mBlueSlider->setValue(mBlueText->getValue()); mBlueSlider->setActionEventId("slider_blue"); mBlueSlider->addActionListener(this); mBlueSlider->setEnabled(false); @@ -356,7 +356,7 @@ void Setup_Colors::valueChanged(const SelectionEvent &event A_UNUSED) setEntry(mGreenSlider, mGreenText, col->g); setEntry(mBlueSlider, mBlueText, col->b); - mGradTypeSlider->setValue2(grad); + mGradTypeSlider->setValue(grad); updateGradType(); mGradTypeSlider->setEnabled(true); } @@ -365,7 +365,7 @@ void Setup_Colors::setEntry(Slider *const s, TextField *const t, const int value) { if (s) - s->setValue2(value); + s->setValue(value); if (t) t->setText(toString(value)); } @@ -384,7 +384,7 @@ void Setup_Colors::cancel() userPalette->rollback(); const int type = userPalette->getColorTypeAt(mSelected); const Color *const col = &userPalette->getColor(type); - mGradTypeSlider->setValue2(userPalette->getGradientType(type)); + mGradTypeSlider->setValue(userPalette->getGradientType(type)); const int delay = userPalette->getGradientDelay(type); setEntry(mGradDelaySlider, mGradDelayText, delay); setEntry(mRedSlider, mRedText, col->r); diff --git a/src/gui/widgets/tabs/setup_video.cpp b/src/gui/widgets/tabs/setup_video.cpp index d09704203..416ae8c3c 100644 --- a/src/gui/widgets/tabs/setup_video.cpp +++ b/src/gui/widgets/tabs/setup_video.cpp @@ -241,9 +241,9 @@ Setup_Video::Setup_Video(const Widget2 *const widget) : ? toString(mAltFps) : _("None"))); mAltFpsLabel->setWidth(150); mFpsSlider->setEnabled(mFps > 0); - mFpsSlider->setValue2(mFps); + mFpsSlider->setValue(mFps); mAltFpsSlider->setEnabled(mAltFps > 0); - mAltFpsSlider->setValue2(mAltFps); + mAltFpsSlider->setValue(mAltFps); mFpsCheckBox->setSelected(mFps > 0); // Pre-select the current video mode. @@ -419,9 +419,9 @@ void Setup_Video::cancel() mOpenGLDropDown->setSelected(renderToIndex[mOpenGLEnabled]); mCustomCursorCheckBox->setSelected(mCustomCursorEnabled); mFpsSlider->setEnabled(mFps > 0); - mFpsSlider->setValue2(mFps); + mFpsSlider->setValue(mFps); mAltFpsSlider->setEnabled(mAltFps > 0); - mAltFpsSlider->setValue2(mAltFps); + mAltFpsSlider->setValue(mAltFps); mFpsLabel->setCaption(mFpsCheckBox->isSelected() // TRANSLATORS: video settings label ? toString(mFps) : _("None")); @@ -542,7 +542,7 @@ void Setup_Video::action(const ActionEvent &event) mFpsLabel->setCaption(text); mFpsSlider->setEnabled(mFps > 0); - mFpsSlider->setValue2(mFps); + mFpsSlider->setValue(mFps); } else if (id == "altfpslimitslider") { @@ -556,7 +556,7 @@ void Setup_Video::action(const ActionEvent &event) // TRANSLATORS: video settings label mAltFpsLabel->setCaption(_("Alt FPS limit: ") + text); mAltFpsSlider->setEnabled(mAltFps > 0); - mAltFpsSlider->setValue2(mAltFps); + mAltFpsSlider->setValue(mAltFps); } else if (id == "enableresize") { |