summaryrefslogtreecommitdiff
path: root/src/gui/setup_video.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/setup_video.cpp')
-rw-r--r--src/gui/setup_video.cpp55
1 files changed, 28 insertions, 27 deletions
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp
index 23d2d9c2..cc39caed 100644
--- a/src/gui/setup_video.cpp
+++ b/src/gui/setup_video.cpp
@@ -43,6 +43,7 @@
#include "../main.h"
#include "../particle.h"
+#include "../utils/gettext.h"
#include "../utils/tostring.h"
extern Graphics *graphics;
@@ -108,11 +109,11 @@ Setup_Video::Setup_Video():
mFps((int) config.getValue("fpslimit", 0)),
mModeListModel(new ModeListModel),
mModeList(new ListBox(mModeListModel)),
- mFsCheckBox(new CheckBox("Full screen", mFullScreenEnabled)),
- mOpenGLCheckBox(new CheckBox("OpenGL", mOpenGLEnabled)),
- mCustomCursorCheckBox(new CheckBox("Custom cursor", mCustomCursorEnabled)),
+ mFsCheckBox(new CheckBox(_("Full screen"), mFullScreenEnabled)),
+ mOpenGLCheckBox(new CheckBox(_("OpenGL"), mOpenGLEnabled)),
+ mCustomCursorCheckBox(new CheckBox(_("Custom cursor"), mCustomCursorEnabled)),
mAlphaSlider(new Slider(0.2, 1.0)),
- mFpsCheckBox(new CheckBox("FPS Limit: ")),
+ mFpsCheckBox(new CheckBox(_("FPS Limit:"))),
mFpsSlider(new Slider(10, 200)),
mFpsField(new TextField),
mOriginalScrollLaziness((int) config.getValue("ScrollLaziness", 16)),
@@ -131,7 +132,7 @@ Setup_Video::Setup_Video():
setOpaque(false);
ScrollArea *scrollArea = new ScrollArea(mModeList);
- gcn::Label *alphaLabel = new gcn::Label("Gui opacity");
+ gcn::Label *alphaLabel = new gcn::Label(_("Gui opacity"));
mModeList->setEnabled(false);
#ifndef USE_OPENGL
@@ -188,7 +189,7 @@ Setup_Video::Setup_Video():
mParticleDetailField->addKeyListener(this);
mScrollRadiusSlider->setDimension(gcn::Rectangle(10, 120, 75, 10));
- gcn::Label *scrollRadiusLabel = new gcn::Label("Scroll radius");
+ gcn::Label *scrollRadiusLabel = new gcn::Label(_("Scroll radius"));
scrollRadiusLabel->setPosition(90, 120);
mScrollRadiusField->setPosition(mFpsField->getX(), 120);
mScrollRadiusField->setWidth(30);
@@ -196,7 +197,7 @@ Setup_Video::Setup_Video():
mScrollRadiusSlider->setValue(mOriginalScrollRadius);
mScrollLazinessSlider->setDimension(gcn::Rectangle(10, 140, 75, 10));
- gcn::Label *scrollLazinessLabel = new gcn::Label("Scroll laziness");
+ gcn::Label *scrollLazinessLabel = new gcn::Label(_("Scroll laziness"));
scrollLazinessLabel->setPosition(90, 140);
mScrollLazinessField->setPosition(mFpsField->getX(), 140);
mScrollLazinessField->setWidth(30);
@@ -204,42 +205,42 @@ Setup_Video::Setup_Video():
mScrollLazinessSlider->setValue(mOriginalScrollLaziness);
mOverlayDetailSlider->setDimension(gcn::Rectangle(10, 160, 75, 10));
- gcn::Label *overlayDetailLabel = new gcn::Label("Ambient FX");
+ gcn::Label *overlayDetailLabel = new gcn::Label(_("Ambient FX"));
overlayDetailLabel->setPosition(90, 160);
mOverlayDetailField->setPosition(180, 160);
mOverlayDetailField->setWidth(30);
switch (mOverlayDetail)
{
case 0:
- mOverlayDetailField->setCaption("off");
+ mOverlayDetailField->setCaption(_("off"));
break;
case 1:
- mOverlayDetailField->setCaption("low");
+ mOverlayDetailField->setCaption(_("low"));
break;
case 2:
- mOverlayDetailField->setCaption("high");
+ mOverlayDetailField->setCaption(_("high"));
break;
}
mOverlayDetailSlider->setValue(mOverlayDetail);
mParticleDetailSlider->setDimension(gcn::Rectangle(10, 180, 75, 10));
- gcn::Label *particleDetailLabel = new gcn::Label("Particle Detail");
+ gcn::Label *particleDetailLabel = new gcn::Label(_("Particle Detail"));
particleDetailLabel->setPosition(90, 180);
mParticleDetailField->setPosition(180, 180);
mParticleDetailField->setWidth(60);
switch (mParticleDetail)
{
case 0:
- mParticleDetailField->setCaption("low");
+ mParticleDetailField->setCaption(_("low"));
break;
case 1:
- mParticleDetailField->setCaption("medium");
+ mParticleDetailField->setCaption(_("medium"));
break;
case 2:
- mParticleDetailField->setCaption("high");
+ mParticleDetailField->setCaption(_("high"));
break;
case 3:
- mParticleDetailField->setCaption("max");
+ mParticleDetailField->setCaption(_("max"));
break;
}
mParticleDetailSlider->setValue(mParticleDetail);
@@ -305,8 +306,8 @@ void Setup_Video::apply()
}
#if defined(WIN32) || defined(__APPLE__)
} else {
- new OkDialog("Switching to full screen",
- "Restart needed for changes to take effect.");
+ new OkDialog(_("Switching to full screen"),
+ _("Restart needed for changes to take effect."));
}
#endif
config.setValue("screen", fullscreen ? 1 : 0);
@@ -318,8 +319,8 @@ void Setup_Video::apply()
config.setValue("opengl", mOpenGLCheckBox->isSelected() ? 1 : 0);
// OpenGL can currently only be changed by restarting, notify user.
- new OkDialog("Changing OpenGL",
- "Applying change to OpenGL requires restart.");
+ new OkDialog(_("Changing OpenGL"),
+ _("Applying change to OpenGL requires restart."));
}
// FPS change
@@ -408,13 +409,13 @@ void Setup_Video::action(const gcn::ActionEvent &event)
switch (val)
{
case 0:
- mOverlayDetailField->setCaption("off");
+ mOverlayDetailField->setCaption(_("off"));
break;
case 1:
- mOverlayDetailField->setCaption("low");
+ mOverlayDetailField->setCaption(_("low"));
break;
case 2:
- mOverlayDetailField->setCaption("high");
+ mOverlayDetailField->setCaption(_("high"));
break;
}
config.setValue("OverlayDetail", val);
@@ -425,16 +426,16 @@ void Setup_Video::action(const gcn::ActionEvent &event)
switch (val)
{
case 0:
- mParticleDetailField->setCaption("low");
+ mParticleDetailField->setCaption(_("low"));
break;
case 1:
- mParticleDetailField->setCaption("medium");
+ mParticleDetailField->setCaption(_("medium"));
break;
case 2:
- mParticleDetailField->setCaption("high");
+ mParticleDetailField->setCaption(_("high"));
break;
case 3:
- mParticleDetailField->setCaption("max");
+ mParticleDetailField->setCaption(_("max"));
break;
}
config.setValue("particleEmitterSkip", 3 - val);