diff options
author | Neeraj Kumar | 2010-08-06 20:13:41 +0000 |
---|---|---|
committer | Neeraj Kumar | 2010-08-06 20:13:41 +0000 |
commit | 7e126ed299cb789340cb2f8d409338dbdd6c8235 (patch) | |
tree | 91f6e4be633fd579922ddf270443011582b8f9ec /gui/KeysDialog.cpp | |
parent | 6c0855f3d3efc52478ba9ce019fbd4c9287f4691 (diff) | |
parent | 4ae7427eed781613e2cda096d0f61c77883bca05 (diff) | |
download | scummvm-rg350-7e126ed299cb789340cb2f8d409338dbdd6c8235.tar.gz scummvm-rg350-7e126ed299cb789340cb2f8d409338dbdd6c8235.tar.bz2 scummvm-rg350-7e126ed299cb789340cb2f8d409338dbdd6c8235.zip |
TESTBED: Merged changes from trunk to my branch
svn-id: r51798
Diffstat (limited to 'gui/KeysDialog.cpp')
-rw-r--r-- | gui/KeysDialog.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/gui/KeysDialog.cpp b/gui/KeysDialog.cpp index b80dd200bb..897dd8c741 100644 --- a/gui/KeysDialog.cpp +++ b/gui/KeysDialog.cpp @@ -25,6 +25,7 @@ #include "gui/KeysDialog.h" #include "gui/Actions.h" +#include "common/translation.h" #include <SDL_keyboard.h> #ifdef _WIN32_WCE @@ -40,15 +41,15 @@ enum { KeysDialog::KeysDialog(const Common::String &title) : GUI::Dialog("KeysDialog") { - new ButtonWidget(this, "KeysDialog.Map", "Map", kMapCmd, 0); - new ButtonWidget(this, "KeysDialog.Ok", "OK", kOKCmd, 0); - new ButtonWidget(this, "KeysDialog.Cancel", "Cancel", kCloseCmd, 0); + new ButtonWidget(this, "KeysDialog.Map", _("Map"), 0, kMapCmd); + new ButtonWidget(this, "KeysDialog.Ok", _("OK"), 0, kOKCmd); + new ButtonWidget(this, "KeysDialog.Cancel", _("Cancel"), 0, kCloseCmd); _actionsList = new ListWidget(this, "KeysDialog.List"); _actionsList->setNumberingMode(kListNumberingZero); _actionTitle = new StaticTextWidget(this, "KeysDialog.Action", title); - _keyMapping = new StaticTextWidget(this, "KeysDialog.Mapping", "Select an action and click 'Map'"); + _keyMapping = new StaticTextWidget(this, "KeysDialog.Mapping", _("Select an action and click 'Map'")); _actionTitle->setFlags(WIDGET_CLEARBG); _keyMapping->setFlags(WIDGET_CLEARBG); @@ -79,9 +80,9 @@ void KeysDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { key = key - Common::ASCII_F1 + SDLK_F1; #endif if (key != 0) - sprintf(selection, "Associated key : %s", SDL_GetKeyName((SDLKey)key)); + sprintf(selection, _("Associated key : %s"), SDL_GetKeyName((SDLKey)key)); else - sprintf(selection, "Associated key : none"); + sprintf(selection, _("Associated key : none")); _keyMapping->setLabel(selection); _keyMapping->draw(); @@ -89,7 +90,7 @@ void KeysDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { break; case kMapCmd: if (_actionsList->getSelected() < 0) { - _actionTitle->setLabel("Please select an action"); + _actionTitle->setLabel(_("Please select an action")); } else { char selection[100]; @@ -101,11 +102,11 @@ void KeysDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { key = key - Common::ASCII_F1 + SDLK_F1; #endif if (key != 0) - sprintf(selection, "Associated key : %s", SDL_GetKeyName((SDLKey)key)); + sprintf(selection, _("Associated key : %s"), SDL_GetKeyName((SDLKey)key)); else - sprintf(selection, "Associated key : none"); + sprintf(selection, _("Associated key : none")); - _actionTitle->setLabel("Press the key to associate"); + _actionTitle->setLabel(_("Press the key to associate")); _keyMapping->setLabel(selection); _keyMapping->draw(); Actions::Instance()->beginMapping(true); @@ -140,11 +141,11 @@ void KeysDialog::handleKeyUp(Common::KeyState state) { Actions::Instance()->setMapping((ActionType)_actionSelected, state.ascii); if (state.ascii != 0) - sprintf(selection, "Associated key : %s", SDL_GetKeyName((SDLKey) state.keycode)); + sprintf(selection, _("Associated key : %s"), SDL_GetKeyName((SDLKey) state.keycode)); else - sprintf(selection, "Associated key : none"); + sprintf(selection, _("Associated key : none")); - _actionTitle->setLabel("Choose an action to map"); + _actionTitle->setLabel(_("Choose an action to map")); _keyMapping->setLabel(selection); _keyMapping->draw(); _actionTitle->draw(); |