Add special SceneDefaultOptions class, used for setting default options for all other scenes.
diff --git a/src/scene.h b/src/scene.h
index fd98855..e9418c8 100644
--- a/src/scene.h
+++ b/src/scene.h
@@ -36,6 +36,7 @@
#include <string>
#include <map>
+#include <list>
class Scene
{
@@ -79,8 +80,9 @@
bool is_running();
const std::string &name() { return mName; }
- bool set_option(const std::string &opt, const std::string &val);
+ virtual bool set_option(const std::string &opt, const std::string &val);
void reset_options();
+ bool set_option_default(const std::string &opt, const std::string &val);
const std::map<std::string, Option> &options() { return mOptions; }
static Scene &dummy()
@@ -114,6 +116,20 @@
double mDuration; // Duration of run in seconds
};
+/*
+ * Special Scene used for setting the default options
+ */
+class SceneDefaultOptions : public Scene
+{
+public:
+ SceneDefaultOptions(Screen &pScreen) : Scene(pScreen, "") {}
+ bool set_option(const std::string &opt, const std::string &val);
+ void setup();
+
+private:
+ std::list<std::pair<std::string, std::string> > mDefaultOptions;
+};
+
class SceneBuild : public Scene
{
public: