aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2012-02-27 22:50:01 +0200
committerJohannes Schickel2012-03-19 20:32:34 +0100
commitc84cd8dee83fe42263f82ae3bb603360b99e0b0a (patch)
treec9e2b3328dc198620b3d0cc77d2ae6802a866562 /engines
parentbe8c557645bf73e96a463c60bd0422b39a3edfef (diff)
downloadscummvm-rg350-c84cd8dee83fe42263f82ae3bb603360b99e0b0a.tar.gz
scummvm-rg350-c84cd8dee83fe42263f82ae3bb603360b99e0b0a.tar.bz2
scummvm-rg350-c84cd8dee83fe42263f82ae3bb603360b99e0b0a.zip
GUI: Add per-engine and per-game options
Diffstat (limited to 'engines')
-rw-r--r--engines/metaengine.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/engines/metaengine.h b/engines/metaengine.h
index d9c1360042..632c204978 100644
--- a/engines/metaengine.h
+++ b/engines/metaengine.h
@@ -24,6 +24,7 @@
#include "common/scummsys.h"
#include "common/error.h"
+#include "common/array.h"
#include "engines/game.h"
#include "engines/savestate.h"
@@ -39,6 +40,19 @@ class String;
}
/**
+ * Per-game extra GUI options structure.
+ * Currently, this can only be used for options with checkboxes.
+ */
+struct ExtraGuiOption {
+ const char *label; // option label, e.g. "Fullscreen mode"
+ const char *tooltip; // option tooltip (when the mouse hovers above it)
+ const char *configOption; // confMan key, e.g. "fullscreen"
+ bool defaultState; // the detault state of the checkbox (checked or not)
+};
+
+typedef Common::Array<ExtraGuiOption> ExtraGuiOptions;
+
+/**
* A meta engine is essentially a factory for Engine instances with the
* added ability of listing and detecting supported games.
* Every engine "plugin" provides a hook to get an instance of a MetaEngine
@@ -98,6 +112,16 @@ public:
}
/**
+ * Return a list of extra GUI options.
+ * Currently, this only supports options with checkboxes.
+ *
+ * The default implementation returns an empty list.
+ */
+ virtual const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const {
+ return ExtraGuiOptions();
+ }
+
+ /**
* Return the maximum save slot that the engine supports.
*
* @note MetaEngines must indicate that this function has been implemented