From 54a54eb5317650fc3306d200517bcc48bb7f1d9c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 30 Nov 2013 22:59:30 +0300 Subject: fix styled drawing after update. --- src/gui/widgets/setupitem.cpp | 8 ++++---- src/gui/widgets/tabs/setup_colors.cpp | 16 ++++++++-------- src/gui/widgets/tabs/setup_video.cpp | 12 ++++++------ src/gui/windows/buydialog.cpp | 14 +++++++------- src/gui/windows/itemamountwindow.cpp | 10 +++++----- src/gui/windows/selldialog.cpp | 12 ++++++------ 6 files changed, 36 insertions(+), 36 deletions(-) (limited to 'src') diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp index 043d0870f..9b552d568 100644 --- a/src/gui/widgets/setupitem.cpp +++ b/src/gui/widgets/setupitem.cpp @@ -696,7 +696,7 @@ void SetupItemSlider::createControls() mSlider = new Slider(mMin, mMax); mSlider->setActionEventId(mEventName); mSlider->addActionListener(mParent); - mSlider->setValue(atof(mValue.c_str())); + mSlider->setValue2(atof(mValue.c_str())); mSlider->setHeight(30); mWidget = mSlider; @@ -725,7 +725,7 @@ void SetupItemSlider::toWidget() if (!mSlider) return; - mSlider->setValue(atof(mValue.c_str())); + mSlider->setValue2(atof(mValue.c_str())); } void SetupItemSlider::action(const gcn::ActionEvent &event A_UNUSED) @@ -820,7 +820,7 @@ void SetupItemSlider2::createControls() mSlider = new Slider(mMin, mMax); mSlider->setActionEventId(mEventName); mSlider->addActionListener(mParent); - mSlider->setValue(atof(mValue.c_str())); + mSlider->setValue2(atof(mValue.c_str())); mSlider->setHeight(30); mWidget = mSlider; @@ -879,7 +879,7 @@ void SetupItemSlider2::toWidget() int val = roundDouble(atof(mValue.c_str())); if (mInvert) val = mInvertValue - val; - mSlider->setValue(val); + mSlider->setValue2(val); updateLabel(); } diff --git a/src/gui/widgets/tabs/setup_colors.cpp b/src/gui/widgets/tabs/setup_colors.cpp index 9b7036222..2629d084d 100644 --- a/src/gui/widgets/tabs/setup_colors.cpp +++ b/src/gui/widgets/tabs/setup_colors.cpp @@ -94,7 +94,7 @@ Setup_Colors::Setup_Colors(const Widget2 *const widget) : mGradTypeSlider->setWidth(180); mGradTypeSlider->setActionEventId("slider_grad"); - mGradTypeSlider->setValue(0); + mGradTypeSlider->setValue2(0); mGradTypeSlider->addActionListener(this); mGradTypeSlider->setEnabled(false); @@ -126,7 +126,7 @@ Setup_Colors::Setup_Colors(const Widget2 *const widget) : mGradDelayText->setEnabled(false); mGradDelaySlider->setWidth(180); - mGradDelaySlider->setValue(mGradDelayText->getValue()); + mGradDelaySlider->setValue2(mGradDelayText->getValue()); mGradDelaySlider->setActionEventId("slider_graddelay"); mGradDelaySlider->addActionListener(this); mGradDelaySlider->setEnabled(false); @@ -137,7 +137,7 @@ Setup_Colors::Setup_Colors(const Widget2 *const widget) : mRedText->setEnabled(false); mRedSlider->setWidth(180); - mRedSlider->setValue(mRedText->getValue()); + mRedSlider->setValue2(mRedText->getValue()); mRedSlider->setActionEventId("slider_red"); mRedSlider->addActionListener(this); mRedSlider->setEnabled(false); @@ -148,7 +148,7 @@ Setup_Colors::Setup_Colors(const Widget2 *const widget) : mGreenText->setEnabled(false); mGreenSlider->setWidth(180); - mGreenSlider->setValue(mGreenText->getValue()); + mGreenSlider->setValue2(mGreenText->getValue()); mGreenSlider->setActionEventId("slider_green"); mGreenSlider->addActionListener(this); mGreenSlider->setEnabled(false); @@ -159,7 +159,7 @@ Setup_Colors::Setup_Colors(const Widget2 *const widget) : mBlueText->setEnabled(false); mBlueSlider->setWidth(180); - mBlueSlider->setValue(mBlueText->getValue()); + mBlueSlider->setValue2(mBlueText->getValue()); mBlueSlider->setActionEventId("slider_blue"); mBlueSlider->addActionListener(this); mBlueSlider->setEnabled(false); @@ -354,7 +354,7 @@ void Setup_Colors::valueChanged(const gcn::SelectionEvent &event A_UNUSED) setEntry(mGreenSlider, mGreenText, col->g); setEntry(mBlueSlider, mBlueText, col->b); - mGradTypeSlider->setValue(grad); + mGradTypeSlider->setValue2(grad); updateGradType(); mGradTypeSlider->setEnabled(true); } @@ -363,7 +363,7 @@ void Setup_Colors::setEntry(Slider *const s, TextField *const t, const int value) { if (s) - s->setValue(value); + s->setValue2(value); if (t) t->setText(toString(value)); } @@ -382,7 +382,7 @@ void Setup_Colors::cancel() userPalette->rollback(); const int type = userPalette->getColorTypeAt(mSelected); const gcn::Color *const col = &userPalette->getColor(type); - mGradTypeSlider->setValue(userPalette->getGradientType(type)); + mGradTypeSlider->setValue2(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 2eb0e4ef0..d6532fb86 100644 --- a/src/gui/widgets/tabs/setup_video.cpp +++ b/src/gui/widgets/tabs/setup_video.cpp @@ -236,10 +236,10 @@ Setup_Video::Setup_Video(const Widget2 *const widget) : mAltFpsLabel->setCaption(_("Alt FPS limit: ") + (mAltFps > 0 ? toString(mAltFps) : _("None"))); mAltFpsLabel->setWidth(150); - mFpsSlider->setValue(mFps); mFpsSlider->setEnabled(mFps > 0); - mAltFpsSlider->setValue(mAltFps); + mFpsSlider->setValue2(mFps); mAltFpsSlider->setEnabled(mAltFps > 0); + mAltFpsSlider->setValue2(mAltFps); mFpsCheckBox->setSelected(mFps > 0); // Pre-select the current video mode. @@ -413,10 +413,10 @@ void Setup_Video::cancel() mFsCheckBox->setSelected(mFullScreenEnabled); mOpenGLDropDown->setSelected(renderToIndex[mOpenGLEnabled]); mCustomCursorCheckBox->setSelected(mCustomCursorEnabled); - mFpsSlider->setValue(mFps); mFpsSlider->setEnabled(mFps > 0); - mAltFpsSlider->setValue(mAltFps); + mFpsSlider->setValue2(mFps); mAltFpsSlider->setEnabled(mAltFps > 0); + mAltFpsSlider->setValue2(mAltFps); mFpsLabel->setCaption(mFpsCheckBox->isSelected() // TRANSLATORS: video settings label ? toString(mFps) : _("None")); @@ -535,8 +535,8 @@ void Setup_Video::action(const gcn::ActionEvent &event) const std::string text = mFps > 0 ? toString(mFps) : _("None"); mFpsLabel->setCaption(text); - mFpsSlider->setValue(mFps); mFpsSlider->setEnabled(mFps > 0); + mFpsSlider->setValue2(mFps); } else if (id == "altfpslimitslider") { @@ -549,8 +549,8 @@ void Setup_Video::action(const gcn::ActionEvent &event) // TRANSLATORS: video settings label mAltFpsLabel->setCaption(_("Alt FPS limit: ") + text); - mAltFpsSlider->setValue(mAltFps); mAltFpsSlider->setEnabled(mAltFps > 0); + mAltFpsSlider->setValue2(mAltFps); } else if (id == "enableresize") { diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp index dcd94be81..21c3aedf7 100644 --- a/src/gui/windows/buydialog.cpp +++ b/src/gui/windows/buydialog.cpp @@ -344,7 +344,7 @@ void BuyDialog::reset() // Reset previous selected items to prevent failing asserts mShopItemList->setSelected(-1); - mSlider->setValue(0); + mSlider->setValue2(0); setMoney(0); } @@ -419,28 +419,28 @@ void BuyDialog::action(const gcn::ActionEvent &event) else if (eventId == "inc" && mAmountItems < mMaxItems) { mAmountItems++; - mSlider->setValue(mAmountItems); + mSlider->setValue2(mAmountItems); mAmountField->setValue(mAmountItems); updateButtonsAndLabels(); } else if (eventId == "dec" && mAmountItems > 1) { mAmountItems--; - mSlider->setValue(mAmountItems); + mSlider->setValue2(mAmountItems); mAmountField->setValue(mAmountItems); updateButtonsAndLabels(); } else if (eventId == "max") { mAmountItems = mMaxItems; - mSlider->setValue(mAmountItems); + mSlider->setValue2(mAmountItems); mAmountField->setValue(mAmountItems); updateButtonsAndLabels(); } else if (eventId == "amount") { mAmountItems = mAmountField->getValue(); - mSlider->setValue(mAmountItems); + mSlider->setValue2(mAmountItems); updateButtonsAndLabels(); } else if (eventId == "buy" && mAmountItems > 0 && mAmountItems <= mMaxItems) @@ -465,8 +465,8 @@ void BuyDialog::action(const gcn::ActionEvent &event) // Reset selection mAmountItems = 1; - mSlider->setValue(1); mSlider->setScale(1, mMaxItems); + mSlider->setValue2(1); } else if (tradeWindow) { @@ -486,7 +486,7 @@ void BuyDialog::valueChanged(const gcn::SelectionEvent &event A_UNUSED) { // Reset amount of items and update labels mAmountItems = 1; - mSlider->setValue(1); + mSlider->setValue2(1); updateButtonsAndLabels(); mSlider->setScale(1, mMaxItems); diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp index 9800379b1..5e613cc62 100644 --- a/src/gui/windows/itemamountwindow.cpp +++ b/src/gui/windows/itemamountwindow.cpp @@ -391,7 +391,7 @@ void ItemAmountWindow::action(const gcn::ActionEvent &event) else if (eventId == "slide") amount = static_cast(mItemAmountSlide->getValue()); mItemAmountTextField->setValue(amount); - mItemAmountSlide->setValue(amount); + mItemAmountSlide->setValue2(amount); if (mItemPriceTextField && mItemPriceSlide) { @@ -407,14 +407,14 @@ void ItemAmountWindow::action(const gcn::ActionEvent &event) mPrice++; price = static_cast(pow(10.0, mPrice)); mItemPriceTextField->setValue(price); - mItemPriceSlide->setValue(price); + mItemPriceSlide->setValue2(price); } else if (eventId == "decPrice") { mPrice--; price = static_cast(pow(10.0, mPrice)); mItemPriceTextField->setValue(price); - mItemPriceSlide->setValue(price); + mItemPriceSlide->setValue2(price); } else if (eventId == "slidePrice") { @@ -424,7 +424,7 @@ void ItemAmountWindow::action(const gcn::ActionEvent &event) else mPrice = 0; mItemPriceTextField->setValue(price); - mItemPriceSlide->setValue(price); + mItemPriceSlide->setValue2(price); } } } @@ -437,7 +437,7 @@ void ItemAmountWindow::close() void ItemAmountWindow::keyReleased(gcn::KeyEvent &keyEvent A_UNUSED) { - mItemAmountSlide->setValue(mItemAmountTextField->getValue()); + mItemAmountSlide->setValue2(mItemAmountTextField->getValue()); } void ItemAmountWindow::showWindow(const Usage usage, Window *const parent, diff --git a/src/gui/windows/selldialog.cpp b/src/gui/windows/selldialog.cpp index 5cca9892f..727c94108 100644 --- a/src/gui/windows/selldialog.cpp +++ b/src/gui/windows/selldialog.cpp @@ -161,7 +161,7 @@ SellDialog::~SellDialog() void SellDialog::reset() { mShopItems->clear(); - mSlider->setValue(0); + mSlider->setValue2(0); mShopItemList->setSelected(-1); updateButtonsAndLabels(); } @@ -212,19 +212,19 @@ void SellDialog::action(const gcn::ActionEvent &event) else if (eventId == "inc" && mAmountItems < mMaxItems) { mAmountItems++; - mSlider->setValue(mAmountItems); + mSlider->setValue2(mAmountItems); updateButtonsAndLabels(); } else if (eventId == "dec" && mAmountItems > 1) { mAmountItems--; - mSlider->setValue(mAmountItems); + mSlider->setValue2(mAmountItems); updateButtonsAndLabels(); } else if (eventId == "max") { mAmountItems = mMaxItems; - mSlider->setValue(mAmountItems); + mSlider->setValue2(mAmountItems); updateButtonsAndLabels(); } else if ((eventId == "presell" || eventId == "sell" || eventId == "yes") @@ -278,7 +278,7 @@ void SellDialog::action(const gcn::ActionEvent &event) mPlayerMoney += mAmountItems * mShopItems->at(selectedItem)->getPrice(); mAmountItems = 1; - mSlider->setValue(0); + mSlider->setValue2(0); if (mMaxItems) { @@ -313,7 +313,7 @@ void SellDialog::valueChanged(const gcn::SelectionEvent &event A_UNUSED) { // Reset amount of items and update labels mAmountItems = 1; - mSlider->setValue(0); + mSlider->setValue2(0); updateButtonsAndLabels(); mSlider->setScale(1, mMaxItems); -- cgit v1.2.3-70-g09d2