diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-02-21 03:33:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-02-21 03:33:54 +0300 |
commit | e4dabfe2b75a20378bdb1bf32b53249b5d55740b (patch) | |
tree | 8c14cc39a4f0a5b730d377a1d89b0304c9b8122d /src/gui/setup_visual.cpp | |
parent | 2eef004b8b70861fd377ad50393a9a0ccbbbc152 (diff) | |
download | mv-e4dabfe2b75a20378bdb1bf32b53249b5d55740b.tar.gz mv-e4dabfe2b75a20378bdb1bf32b53249b5d55740b.tar.bz2 mv-e4dabfe2b75a20378bdb1bf32b53249b5d55740b.tar.xz mv-e4dabfe2b75a20378bdb1bf32b53249b5d55740b.zip |
Bit cleanup visual settings page.
Diffstat (limited to 'src/gui/setup_visual.cpp')
-rw-r--r-- | src/gui/setup_visual.cpp | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/src/gui/setup_visual.cpp b/src/gui/setup_visual.cpp index 9c172da04..5e072b53b 100644 --- a/src/gui/setup_visual.cpp +++ b/src/gui/setup_visual.cpp @@ -62,7 +62,7 @@ Setup_Visual::Setup_Visual() "", "grabinput", this, "grabinputEvent"); new SetupItemSlider(_("Gui opacity"), "", "guialpha", - this, "guialphaEvent", 0.1, 1.0); + this, "guialphaEvent", 0.1, 1.0, 150, true); mSpeachList = new SetupItemNames(); mSpeachList->push_back(_("No text")); @@ -89,7 +89,10 @@ Setup_Visual::Setup_Visual() mParticleList->push_back(_("max")); (new SetupItemSlider2(_("Particle detail"), "", "particleEmitterSkip", this, "particleEmitterSkipEvent", 0, 3, - mParticleList))->setInvertValue(3); + mParticleList, true))->setInvertValue(3); + + new SetupItemSlider(_("Gamma"), "", "gamma", + this, "gammeEvent", 1, 20, 350, true); setDimension(gcn::Rectangle(0, 0, 550, 350)); } @@ -107,28 +110,5 @@ Setup_Visual::~Setup_Visual() void Setup_Visual::apply() { SetupTabScroll::apply(); - Image::setEnableAlpha(config.getFloatValue("guialpha") != 1.0f); Client::applyGrabMode(); } - -void Setup_Visual::action(const gcn::ActionEvent &event) -{ - if (event.getId() == "guialphaEvent") - { - Slider *slider = static_cast<Slider*>(event.getSource()); - if (slider) - { - config.setValue("guialpha", slider->getValue()); - Image::setEnableAlpha(config.getFloatValue("guialpha") != 1.0f); - } - } - else if (event.getId() == "particleEmitterSkipEvent") - { - Slider *slider = static_cast<Slider*>(event.getSource()); - if (slider) - { - int val = static_cast<int>(slider->getValue()); - Particle::emitterSkip = 4 - val; - } - } -} |