From 4dc2f2d43305f29cd1deee924abca7a95c723b53 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 25 Mar 2012 16:31:27 +0300 Subject: [PATCH] SWORD2: Add a custom game option to toggle object labels --- engines/sword2/sword2.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp index c3951865702..458a2d33edb 100644 --- a/engines/sword2/sword2.cpp +++ b/engines/sword2/sword2.cpp @@ -32,6 +32,7 @@ #include "common/savefile.h" #include "common/system.h" #include "common/textconsole.h" +#include "common/translation.h" #include "engines/metaengine.h" #include "engines/util.h" @@ -74,6 +75,13 @@ static const GameSettings sword2_settings[] = { } // End of namespace Sword2 +static const ExtraGuiOption sword2ExtraGuiOption = { + _s("Show object labels"), + _s("Show labels for objects on mouse hover"), + "object_labels", + false +}; + class Sword2MetaEngine : public MetaEngine { public: virtual const char *getName() const { @@ -85,6 +93,7 @@ public: virtual bool hasFeature(MetaEngineFeature f) const; virtual GameList getSupportedGames() const; + virtual const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const; virtual GameDescriptor findGame(const char *gameid) const; virtual GameList detectGames(const Common::FSList &fslist) const; virtual SaveStateList listSaves(const char *target) const; @@ -119,6 +128,12 @@ GameList Sword2MetaEngine::getSupportedGames() const { return games; } +const ExtraGuiOptions Sword2MetaEngine::getExtraGuiOptions(const Common::String &target) const { + ExtraGuiOptions options; + options.push_back(sword2ExtraGuiOption); + return options; +} + GameDescriptor Sword2MetaEngine::findGame(const char *gameid) const { const Sword2::GameSettings *g = Sword2::sword2_settings; while (g->gameid) {