aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorEugene Sandulenko2011-08-20 12:51:22 +0100
committerEugene Sandulenko2011-08-20 12:52:36 +0100
commit4294c6c67a0cc13abed0c7894e9ae72803523149 (patch)
tree670da88c573aaf9d1c65963d58fb16efcb6620f8 /engines/scumm
parent52147dc0c0e33bc426d44ad30bad99197fe4433e (diff)
downloadscummvm-rg350-4294c6c67a0cc13abed0c7894e9ae72803523149.tar.gz
scummvm-rg350-4294c6c67a0cc13abed0c7894e9ae72803523149.tar.bz2
scummvm-rg350-4294c6c67a0cc13abed0c7894e9ae72803523149.zip
SCUMM: Added support for localization in Y/N dialog
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/dialogs.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index aff1cb7351..680bac43d0 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -23,6 +23,7 @@
#include "common/savefile.h"
#include "common/system.h"
#include "common/events.h"
+#include "common/localization.h"
#include "common/translation.h"
#include "graphics/scaler.h"
@@ -482,10 +483,14 @@ ConfirmDialog::ConfirmDialog(ScummEngine *scumm, int res)
}
void ConfirmDialog::handleKeyDown(Common::KeyState state) {
- if (state.keycode == Common::KEYCODE_n || state.ascii == _noKey) {
+ Common::KeyCode keyYes, keyNo;
+
+ Common::getLanguageYesNo(Common::parseLanguageFromLocale(TransMan.getCurrentLanguage().c_str()), keyYes, keyNo);
+
+ if (state.keycode == Common::KEYCODE_n || state.ascii == _noKey || state.ascii == keyNo) {
setResult(0);
close();
- } else if (state.keycode == Common::KEYCODE_y || state.ascii == _yesKey) {
+ } else if (state.keycode == Common::KEYCODE_y || state.ascii == _yesKey || state.ascii == keyYes) {
setResult(1);
close();
} else