diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-02-02 19:42:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-02-02 19:42:02 +0300 |
commit | e8f92c8a476c35f76212ccaccbbb55901a49058e (patch) | |
tree | 741bdd9b2068ded23ab92a06586422b400c53d24 /src/gui/setup_video.cpp | |
parent | 2d0696abd547cf00fda04f070fb713c92acaf91b (diff) | |
download | ManaVerse-e8f92c8a476c35f76212ccaccbbb55901a49058e.tar.gz ManaVerse-e8f92c8a476c35f76212ccaccbbb55901a49058e.tar.bz2 ManaVerse-e8f92c8a476c35f76212ccaccbbb55901a49058e.tar.xz ManaVerse-e8f92c8a476c35f76212ccaccbbb55901a49058e.zip |
Add "no frame" option to hide window frame. Disabled by default.
Diffstat (limited to 'src/gui/setup_video.cpp')
-rw-r--r-- | src/gui/setup_video.cpp | 50 |
1 files changed, 31 insertions, 19 deletions
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp index 48d489513..9a5b30ea7 100644 --- a/src/gui/setup_video.cpp +++ b/src/gui/setup_video.cpp @@ -282,6 +282,7 @@ Setup_Video::Setup_Video(): mFps(config.getIntValue("fpslimit")), mAltFps(config.getIntValue("altfpslimit")), mEnableResize(config.getBoolValue("enableresize")), + mNoFrame(config.getBoolValue("noframe")), mSpeechMode(static_cast<Being::Speech>( config.getIntValue("speech"))), mModeListModel(new ModeListModel), @@ -298,6 +299,7 @@ Setup_Video::Setup_Video(): mPickupParticleCheckBox(new CheckBox(_("as particle"), mPickupParticleEnabled)), mEnableResizeCheckBox(new CheckBox(_("Enable resize"), mEnableResize)), + mNoFrameCheckBox(new CheckBox(_("No frame"), mNoFrame)), mSpeechSlider(new Slider(0, 3)), mSpeechLabel(new Label("")), mAlphaSlider(new Slider(0.1, 1.0)), @@ -370,6 +372,7 @@ Setup_Video::Setup_Video(): mParticleDetailField->setActionEventId("particledetailfield"); mOpenGLDropDown->setActionEventId("opengl"); mEnableResizeCheckBox->setActionEventId("enableresize"); + mNoFrameCheckBox->setActionEventId("noframe"); mModeList->addActionListener(this); mCustomCursorCheckBox->addActionListener(this); @@ -387,6 +390,7 @@ Setup_Video::Setup_Video(): mParticleDetailField->addKeyListener(this); mOpenGLDropDown->addActionListener(this); mEnableResizeCheckBox->addActionListener(this); + mNoFrameCheckBox->addActionListener(this); mSpeechLabel->setCaption(speechModeToString(mSpeechMode)); mSpeechSlider->setValue(mSpeechMode); @@ -410,35 +414,36 @@ Setup_Video::Setup_Video(): place(1, 1, mCustomCursorCheckBox, 3); - place(1, 2, mParticleEffectsCheckBox, 2); + place(1, 2, mEnableResizeCheckBox, 2); + place(1, 3, mNoFrameCheckBox, 2); - place(1, 3, mEnableResizeCheckBox, 2); + place(1, 4, mParticleEffectsCheckBox, 2); - place(1, 4, mPickupNotifyLabel, 4); - place(1, 5, mPickupChatCheckBox, 1); - place(2, 5, mPickupParticleCheckBox, 2); + place(1, 5, mPickupNotifyLabel, 4); + place(1, 6, mPickupChatCheckBox, 1); + place(2, 6, mPickupParticleCheckBox, 2); place(0, 7, mAlphaSlider); place(1, 7, alphaLabel, 3); - place(0, 8, mFpsSlider); - place(1, 8, mFpsCheckBox).setPadding(3); - place(2, 8, mFpsLabel).setPadding(1); + place(0, 9, mFpsSlider); + place(1, 9, mFpsCheckBox).setPadding(3); + place(2, 9, mFpsLabel).setPadding(1); - place(0, 9, mAltFpsSlider); - place(1, 9, mAltFpsLabel).setPadding(3); + place(0, 10, mAltFpsSlider); + place(1, 10, mAltFpsLabel).setPadding(3); - place(0, 10, mSpeechSlider); - place(1, 10, speechLabel); - place(2, 10, mSpeechLabel, 3).setPadding(2); + place(0, 11, mSpeechSlider); + place(1, 11, speechLabel); + place(2, 11, mSpeechLabel, 3).setPadding(2); - place(0, 11, mOverlayDetailSlider); - place(1, 11, overlayDetailLabel); - place(2, 11, mOverlayDetailField, 3).setPadding(2); + place(0, 12, mOverlayDetailSlider); + place(1, 12, overlayDetailLabel); + place(2, 12, mOverlayDetailField, 3).setPadding(2); - place(0, 12, mParticleDetailSlider); - place(1, 12, particleDetailLabel); - place(2, 12, mParticleDetailField, 3).setPadding(2); + place(0, 13, mParticleDetailSlider); + place(1, 13, particleDetailLabel); + place(2, 13, mParticleDetailField, 3).setPadding(2); int width = 600; @@ -546,6 +551,7 @@ void Setup_Video::apply() mPickupChatEnabled = config.getBoolValue("showpickupchat"); mPickupParticleEnabled = config.getBoolValue("showpickupparticle"); mEnableResize = config.getBoolValue("enableresize"); + mNoFrame = config.getBoolValue("noframe"); } void Setup_Video::cancel() @@ -567,6 +573,7 @@ void Setup_Video::cancel() ? toString(mFps) : _("None")); mAltFpsLabel->setCaption(_("Alt FPS limit: ") + toString(mAltFps)); mEnableResizeCheckBox->setSelected(mEnableResize); + mNoFrameCheckBox->setSelected(mNoFrame); config.setValue("screen", mFullScreenEnabled); @@ -586,6 +593,7 @@ void Setup_Video::cancel() config.setValue("showpickupchat", mPickupChatEnabled); config.setValue("showpickupparticle", mPickupParticleEnabled); config.setValue("enableresize", mEnableResize); + config.setValue("noframe", mNoFrame); } void Setup_Video::action(const gcn::ActionEvent &event) @@ -727,6 +735,10 @@ void Setup_Video::action(const gcn::ActionEvent &event) { config.setValue("enableresize", mEnableResizeCheckBox->isSelected()); } + else if (id == "noframe") + { + config.setValue("noframe", mNoFrameCheckBox->isSelected()); + } } void Setup_Video::externalUpdated() |