From 4294c6c67a0cc13abed0c7894e9ae72803523149 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 20 Aug 2011 12:51:22 +0100 Subject: SCUMM: Added support for localization in Y/N dialog --- engines/scumm/dialogs.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'engines') 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 -- cgit v1.2.3