aboutsummaryrefslogtreecommitdiff
path: root/gui/options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/options.cpp')
-rw-r--r--gui/options.cpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index 5cb70bc5e4..b0b9fe6c90 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -138,7 +138,7 @@ void OptionsDialog::init() {
_subSpeedDesc = 0;
_subSpeedSlider = 0;
_subSpeedLabel = 0;
- _oldTheme = ConfMan.get("gui_theme");
+ _oldTheme = g_gui.theme()->getThemeId();
// Retrieve game GUI options
_guioptions = 0;
@@ -241,11 +241,8 @@ void OptionsDialog::open() {
}
// MIDI gain setting
- char buf[10];
-
_midiGainSlider->setValue(ConfMan.getInt("midi_gain", _domain));
- sprintf(buf, "%.2f", (double)_midiGainSlider->getValue() / 100.0);
- _midiGainLabel->setLabel(buf);
+ _midiGainLabel->setLabel(Common::String::format("%.2f", (double)_midiGainSlider->getValue() / 100.0));
}
// MT-32 options
@@ -372,7 +369,7 @@ void OptionsDialog::close() {
if (gfxError != OSystem::kTransactionSuccess) {
// Revert ConfMan to what OSystem is using.
- Common::String message = "Failed to apply some of the graphic options changes:";
+ Common::String message = _("Failed to apply some of the graphic options changes:");
if (gfxError & OSystem::kTransactionModeSwitchFailed) {
const OSystem::GraphicsMode *gm = g_system->getSupportedGraphicsModes();
@@ -383,17 +380,20 @@ void OptionsDialog::close() {
}
gm++;
}
- message += "\nthe video mode could not be changed.";
+ message += "\n";
+ message += _("the video mode could not be changed.");
}
if (gfxError & OSystem::kTransactionAspectRatioFailed) {
ConfMan.setBool("aspect_ratio", g_system->getFeatureState(OSystem::kFeatureAspectRatioCorrection), _domain);
- message += "\nthe fullscreen setting could not be changed";
+ message += "\n";
+ message += _("the fullscreen setting could not be changed");
}
if (gfxError & OSystem::kTransactionFullscreenFailed) {
ConfMan.setBool("fullscreen", g_system->getFeatureState(OSystem::kFeatureFullscreenMode), _domain);
- message += "\nthe aspect ratio setting could not be changed";
+ message += "\n";
+ message += _("the aspect ratio setting could not be changed");
}
// And display the error
@@ -530,12 +530,9 @@ void OptionsDialog::close() {
}
void OptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
- char buf[10];
-
switch (cmd) {
case kMidiGainChanged:
- sprintf(buf, "%.2f", (double)_midiGainSlider->getValue() / 100.0);
- _midiGainLabel->setLabel(buf);
+ _midiGainLabel->setLabel(Common::String::format("%.2f", (double)_midiGainSlider->getValue() / 100.0));
_midiGainLabel->draw();
break;
case kMusicVolumeChanged:
@@ -1295,7 +1292,7 @@ void GlobalOptionsDialog::close() {
// only become active *after* the options dialog has closed.
g_gui.loadNewTheme(g_gui.theme()->getThemeId(), ThemeEngine::kGfxDisabled, true);
#else
- MessageDialog error(_("You have to restart ScummVM to take the effect."));
+ MessageDialog error(_("You have to restart ScummVM before your changes will take effect."));
error.runModal();
#endif
}