diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/credits.h | 3 | ||||
-rw-r--r-- | gui/debugger.cpp | 5 | ||||
-rw-r--r-- | gui/dialog.cpp | 7 | ||||
-rw-r--r-- | gui/dialog.h | 9 | ||||
-rw-r--r-- | gui/gui-manager.cpp | 3 | ||||
-rw-r--r-- | gui/options.cpp | 31 | ||||
-rw-r--r-- | gui/options.h | 2 | ||||
-rw-r--r-- | gui/themes/translations.dat | bin | 289269 -> 309938 bytes |
8 files changed, 27 insertions, 33 deletions
diff --git a/gui/credits.h b/gui/credits.h index 154f577fba..ecfe280d20 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -459,6 +459,9 @@ static const char *credits[] = { "C1""Translations", "C0""Thierry Crozat", "C2""Translation Lead", +"C1""Basque", +"C0""Mikel Iturbe Urretxa", +"", "C1""Catalan", "C0""Jordi Vilalta Prat", "", diff --git a/gui/debugger.cpp b/gui/debugger.cpp index 26e62dc1d9..972163df6f 100644 --- a/gui/debugger.cpp +++ b/gui/debugger.cpp @@ -200,9 +200,8 @@ void Debugger::enter() { bool Debugger::handleCommand(int argc, const char **argv, bool &result) { if (_cmds.contains(argv[0])) { - Debuglet *debuglet = _cmds[argv[0]].get(); - assert(debuglet); - result = (*debuglet)(argc, argv); + assert(_cmds[argv[0]]); + result = (*_cmds[argv[0]])(argc, argv); return true; } diff --git a/gui/dialog.cpp b/gui/dialog.cpp index fd15ba5e09..2201e83ca5 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -21,6 +21,10 @@ #include "common/rect.h" +#ifdef ENABLE_KEYMAPPER +#include "common/events.h" +#endif + #include "gui/gui-manager.h" #include "gui/dialog.h" #include "gui/widget.h" @@ -314,6 +318,9 @@ void Dialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { } } +#ifdef ENABLE_KEYMAPPER +void Dialog::handleOtherEvent(Common::Event evt) { } +#endif /* * Determine the widget at location (x,y) if any. Assumes the coordinates are * in the local coordinate system, i.e. relative to the top left of the dialog. diff --git a/gui/dialog.h b/gui/dialog.h index a324450996..f5a5f94a68 100644 --- a/gui/dialog.h +++ b/gui/dialog.h @@ -29,6 +29,12 @@ #include "gui/object.h" #include "gui/ThemeEngine.h" +#ifdef ENABLE_KEYMAPPER +namespace Common { +struct Event; +} +#endif + namespace GUI { class Widget; @@ -82,6 +88,9 @@ protected: virtual void handleKeyUp(Common::KeyState state); virtual void handleMouseMoved(int x, int y, int button); virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data); +#ifdef ENABLE_KEYMAPPER + virtual void handleOtherEvent(Common::Event evt); +#endif Widget *findWidget(int x, int y); // Find the widget at pos x,y if any Widget *findWidget(const char *name); diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp index 4fa60bfe07..ffecd928bc 100644 --- a/gui/gui-manager.cpp +++ b/gui/gui-manager.cpp @@ -366,6 +366,9 @@ void GuiManager::runLoop() { screenChange(); break; default: +#ifdef ENABLE_KEYMAPPER + activeDialog->handleOtherEvent(event); +#endif break; } diff --git a/gui/options.cpp b/gui/options.cpp index 5085f9cdd9..6747195a1b 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -750,7 +750,7 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr } // RenderMode popup - const Common::String allFlags = renderType2GUIO((uint32)-1); + const Common::String allFlags = Common::allRenderModesGUIOs(); bool renderingTypeDefined = (strpbrk(_guioptions.c_str(), allFlags.c_str()) != NULL); _renderModePopUpDesc = new StaticTextWidget(boss, prefix + "grRenderPopupDesc", _("Render mode:"), _("Special dithering modes supported by some games")); @@ -759,7 +759,7 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr _renderModePopUp->appendEntry(""); const Common::RenderModeDescription *rm = Common::g_renderModes; for (; rm->code; ++rm) { - Common::String renderGuiOption = renderType2GUIO(rm->id); + Common::String renderGuiOption = Common::renderMode2GUIO(rm->id); if ((_domain == Common::ConfigManager::kApplicationDomain) || (_domain != Common::ConfigManager::kApplicationDomain && !renderingTypeDefined) || (_guioptions.contains(renderGuiOption))) _renderModePopUp->appendEntry(_c(rm->description, context), rm->id); } @@ -1010,7 +1010,7 @@ bool OptionsDialog::loadMusicDeviceSetting(PopUpWidget *popup, Common::String se for (MusicDevices::iterator d = i.begin(); d != i.end(); ++d) { if (setting.empty() ? (preferredType == d->getMusicType()) : (drv == d->getCompleteId())) { popup->setSelectedTag(d->getHandle()); - return popup->getSelected() == -1 ? false : true; + return popup->getSelected() != -1; } } } @@ -1040,31 +1040,6 @@ void OptionsDialog::saveMusicDeviceSetting(PopUpWidget *popup, Common::String se ConfMan.removeKey(setting, _domain); } -Common::String OptionsDialog::renderType2GUIO(uint32 renderType) { - static const struct { - Common::RenderMode type; - const char *guio; - } renderGUIOMapping[] = { - { Common::kRenderHercG, GUIO_RENDERHERCGREEN }, - { Common::kRenderHercA, GUIO_RENDERHERCAMBER }, - { Common::kRenderCGA, GUIO_RENDERCGA }, - { Common::kRenderEGA, GUIO_RENDEREGA }, - { Common::kRenderVGA, GUIO_RENDERVGA }, - { Common::kRenderAmiga, GUIO_RENDERAMIGA }, - { Common::kRenderFMTowns, GUIO_RENDERFMTOWNS }, - { Common::kRenderPC9821, GUIO_RENDERPC9821 }, - { Common::kRenderPC9801, GUIO_RENDERPC9801 } - }; - Common::String res; - - for (int i = 0; i < ARRAYSIZE(renderGUIOMapping); i++) { - if (renderType == renderGUIOMapping[i].type || renderType == (uint32)-1) - res += renderGUIOMapping[i].guio; - } - - return res; -} - int OptionsDialog::getSubtitleMode(bool subtitles, bool speech_mute) { if (_guioptions.contains(GUIO_NOSUBTITLES)) return kSubtitlesSpeech; // Speech only diff --git a/gui/options.h b/gui/options.h index 83c9d60d59..05b3cac617 100644 --- a/gui/options.h +++ b/gui/options.h @@ -85,8 +85,6 @@ protected: bool loadMusicDeviceSetting(PopUpWidget *popup, Common::String setting, MusicType preferredType = MT_AUTO); void saveMusicDeviceSetting(PopUpWidget *popup, Common::String setting); - Common::String renderType2GUIO(uint32 renderType); - TabWidget *_tabWidget; int _graphicsTabId; int _midiTabId; diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat Binary files differindex 65ca204393..d3a384ef77 100644 --- a/gui/themes/translations.dat +++ b/gui/themes/translations.dat |