summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTametomo <irarice@gmail.com>2009-05-02 00:49:24 -0600
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-05-11 21:49:49 +0200
commitbbb5a9f343987c6952ca5ca5466dbd40ddf80997 (patch)
tree2869a62ffd2d6225f3f5ae58f82911516bedebb8
parent90ff9f4ec3ccebd0758d990b960a9550ecc36bba (diff)
downloadmana-bbb5a9f343987c6952ca5ca5466dbd40ddf80997.tar.gz
mana-bbb5a9f343987c6952ca5ca5466dbd40ddf80997.tar.bz2
mana-bbb5a9f343987c6952ca5ca5466dbd40ddf80997.tar.xz
mana-bbb5a9f343987c6952ca5ca5466dbd40ddf80997.zip
Removed scroll laziness and scroll radius options. Both of these were
partially broken, and my experience has been that players have been frustrated more by accidentally setting them than actually wanting them. They'll still be settable in the configuration file for anyone who needs them, but they seem more like a programmer's debugger than a useful option. Signed-off-by: Tametomo <irarice@gmail.com> Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl>
-rw-r--r--src/gui/setup_video.cpp90
-rw-r--r--src/gui/setup_video.h11
2 files changed, 10 insertions, 91 deletions
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp
index 170d0f63..52d1a4c2 100644
--- a/src/gui/setup_video.cpp
+++ b/src/gui/setup_video.cpp
@@ -203,12 +203,6 @@ Setup_Video::Setup_Video():
mFpsCheckBox(new CheckBox(_("FPS Limit:"))),
mFpsSlider(new Slider(10, 120)),
mFpsField(new TextField),
- mOriginalScrollLaziness((int) config.getValue("ScrollLaziness", 16)),
- mScrollLazinessSlider(new Slider(1, 64)),
- mScrollLazinessField(new TextField),
- mOriginalScrollRadius((int) config.getValue("ScrollRadius", 0)),
- mScrollRadiusSlider(new Slider(0, 128)),
- mScrollRadiusField(new TextField),
mOverlayDetail((int) config.getValue("OverlayDetail", 2)),
mOverlayDetailSlider(new Slider(0, 2)),
mOverlayDetailField(new Label("")),
@@ -224,8 +218,6 @@ Setup_Video::Setup_Video():
speechLabel = new Label(_("Overhead text"));
alphaLabel = new Label(_("Gui opacity"));
- scrollRadiusLabel = new Label(_("Scroll radius"));
- scrollLazinessLabel = new Label(_("Scroll laziness"));
overlayDetailLabel = new Label(_("Ambient FX"));
particleDetailLabel = new Label(_("Particle Detail"));
fontSizeLabel = new Label(_("Font size"));
@@ -259,10 +251,6 @@ Setup_Video::Setup_Video():
mFpsCheckBox->setActionEventId("fpslimitcheckbox");
mSpeechSlider->setActionEventId("speech");
mFpsSlider->setActionEventId("fpslimitslider");
- mScrollRadiusSlider->setActionEventId("scrollradiusslider");
- mScrollRadiusField->setActionEventId("scrollradiusfield");
- mScrollLazinessSlider->setActionEventId("scrolllazinessslider");
- mScrollLazinessField->setActionEventId("scrolllazinessfield");
mOverlayDetailSlider->setActionEventId("overlaydetailslider");
mOverlayDetailField->setActionEventId("overlaydetailfield");
mParticleDetailSlider->setActionEventId("particledetailslider");
@@ -279,22 +267,11 @@ Setup_Video::Setup_Video():
mFpsCheckBox->addActionListener(this);
mSpeechSlider->addActionListener(this);
mFpsSlider->addActionListener(this);
- mFpsField->addKeyListener(this);
- mScrollRadiusSlider->addActionListener(this);
- mScrollRadiusField->addKeyListener(this);
- mScrollLazinessSlider->addActionListener(this);
- mScrollLazinessField->addKeyListener(this);
mOverlayDetailSlider->addActionListener(this);
mOverlayDetailField->addKeyListener(this);
mParticleDetailSlider->addActionListener(this);
mParticleDetailField->addKeyListener(this);
- mScrollRadiusField->setText(toString(mOriginalScrollRadius));
- mScrollRadiusSlider->setValue(mOriginalScrollRadius);
-
- mScrollLazinessField->setText(toString(mOriginalScrollLaziness));
- mScrollLazinessSlider->setValue(mOriginalScrollLaziness);
-
mSpeechLabel->setCaption(speechModeToString(mSpeechMode));
mSpeechSlider->setValue(mSpeechMode);
@@ -331,7 +308,7 @@ Setup_Video::Setup_Video():
LayoutHelper h(this);
ContainerPlacer place = h.getPlacer(0, 0);
- place(0, 0, scrollArea, 1, 6).setPadding(2);
+ place(0, 0, scrollArea, 1, 5).setPadding(2);
place(1, 0, mFsCheckBox, 2);
place(3, 0, mOpenGLCheckBox, 1);
@@ -357,25 +334,17 @@ Setup_Video::Setup_Video():
place(1, 8, mFpsCheckBox).setPadding(3);
place(2, 8, mFpsField).setPadding(1);
- place(0, 9, mScrollRadiusSlider);
- place(1, 9, scrollRadiusLabel);
- place(2, 9, mScrollRadiusField).setPadding(1);
-
- place(0, 10, mScrollLazinessSlider);
- place(1, 10, scrollLazinessLabel);
- place(2, 10, mScrollLazinessField).setPadding(1);
-
- place(0, 11, mSpeechSlider);
- place(1, 11, speechLabel);
- place(2, 11, mSpeechLabel, 3).setPadding(2);
+ place(0, 9, mSpeechSlider);
+ place(1, 9, speechLabel);
+ place(2, 9, mSpeechLabel, 3).setPadding(2);
- place(0, 12, mOverlayDetailSlider);
- place(1, 12, overlayDetailLabel);
- place(2, 12, mOverlayDetailField, 3).setPadding(2);
+ place(0, 10, mOverlayDetailSlider);
+ place(1, 10, overlayDetailLabel);
+ place(2, 10, mOverlayDetailField, 3).setPadding(2);
- place(0, 13, mParticleDetailSlider);
- place(1, 13, particleDetailLabel);
- place(2, 13, mParticleDetailField, 3).setPadding(2);
+ place(0, 11, mParticleDetailSlider);
+ place(1, 11, particleDetailLabel);
+ place(2, 11, mParticleDetailField, 3).setPadding(2);
setDimension(gcn::Rectangle(0, 0, 325, 300));
}
@@ -452,26 +421,6 @@ void Setup_Video::apply()
mPickupParticleEnabled = config.getValue("showpickupparticle", false);
}
-int Setup_Video::updateSlider(gcn::Slider *slider, gcn::TextField *field,
- const std::string &configName)
-{
- int value;
- std::stringstream temp(field->getText());
- temp >> value;
- if (value < slider->getScaleStart())
- {
- value = (int) slider->getScaleStart();
- }
- else if (value > slider->getScaleEnd())
- {
- value = (int) slider->getScaleEnd();
- }
- field->setText(toString(value));
- slider->setValue(value);
- config.setValue(configName, value);
- return value;
-}
-
void Setup_Video::cancel()
{
mFsCheckBox->setSelected(mFullScreenEnabled);
@@ -485,11 +434,6 @@ void Setup_Video::cancel()
mOverlayDetailSlider->setValue(mOverlayDetail);
mParticleDetailSlider->setValue(mParticleDetail);
- mScrollRadiusField->setText(toString(mOriginalScrollRadius));
- mScrollLazinessField->setText(toString(mOriginalScrollLaziness));
- updateSlider(mScrollRadiusSlider, mScrollRadiusField, "ScrollRadius");
- updateSlider(mScrollLazinessSlider, mScrollLazinessField, "ScrollLaziness");
-
config.setValue("screen", mFullScreenEnabled);
config.setValue("customcursor", mCustomCursorEnabled);
config.setValue("visiblenames", mVisibleNamesEnabled);
@@ -574,18 +518,6 @@ void Setup_Video::action(const gcn::ActionEvent &event)
mFps = (int) mFpsSlider->getValue();
mFpsField->setText(toString(mFps));
}
- else if (event.getId() == "scrollradiusslider")
- {
- int val = (int) mScrollRadiusSlider->getValue();
- mScrollRadiusField->setText(toString(val));
- config.setValue("ScrollRadius", val);
- }
- else if (event.getId() == "scrolllazinessslider")
- {
- int val = (int) mScrollLazinessSlider->getValue();
- mScrollLazinessField->setText(toString(val));
- config.setValue("ScrollLaziness", val);
- }
else if (event.getId() == "overlaydetailslider")
{
int val = (int) mOverlayDetailSlider->getValue();
@@ -638,6 +570,4 @@ void Setup_Video::keyPressed(gcn::KeyEvent &event)
mFpsField->setText("");
mFps = 0;
}
- updateSlider(mScrollRadiusSlider, mScrollRadiusField, "ScrollRadius");
- updateSlider(mScrollLazinessSlider, mScrollLazinessField, "ScrollLaziness");
}
diff --git a/src/gui/setup_video.h b/src/gui/setup_video.h
index 9570d726..01b9cd4f 100644
--- a/src/gui/setup_video.h
+++ b/src/gui/setup_video.h
@@ -45,9 +45,6 @@ class Setup_Video : public SetupTab, public gcn::ActionListener,
void keyPressed(gcn::KeyEvent &event);
private:
- int updateSlider(gcn::Slider *slider, gcn::TextField *field,
- const std::string &configName);
-
bool mFullScreenEnabled;
bool mOpenGLEnabled;
bool mCustomCursorEnabled;
@@ -89,14 +86,6 @@ class Setup_Video : public SetupTab, public gcn::ActionListener,
gcn::Slider *mFpsSlider;
gcn::TextField *mFpsField;
- int mOriginalScrollLaziness;
- gcn::Slider *mScrollLazinessSlider;
- gcn::TextField *mScrollLazinessField;
-
- int mOriginalScrollRadius;
- gcn::Slider *mScrollRadiusSlider;
- gcn::TextField *mScrollRadiusField;
-
int mOverlayDetail;
gcn::Slider *mOverlayDetailSlider;
gcn::Label *mOverlayDetailField;