diff options
author | Vicent Marti | 2008-08-08 18:30:16 +0000 |
---|---|---|
committer | Vicent Marti | 2008-08-08 18:30:16 +0000 |
commit | dab1fa0942cffa82c1944170774b659b8bcfb6b2 (patch) | |
tree | 443690e96619facaa839d57c45e7f094d8d356fd /common/xmlparser.h | |
parent | 3ca6f76f7be2ef8c982c83ed0c1a1da633033c35 (diff) | |
download | scummvm-rg350-dab1fa0942cffa82c1944170774b659b8bcfb6b2.tar.gz scummvm-rg350-dab1fa0942cffa82c1944170774b659b8bcfb6b2.tar.bz2 scummvm-rg350-dab1fa0942cffa82c1944170774b659b8bcfb6b2.zip |
Resolution-dependence in XML files.
G1X scaler GUI now loads. Added layout for the launcher menu.
MILESTONE: All core GUI dialogs/widgets working on G2x/G3x
MILESTONE: Completely removed old Evaluator/Parser.
Improved layout expanding again.
Improved XML parser.
Several bugfixes.
svn-id: r33704
Diffstat (limited to 'common/xmlparser.h')
-rw-r--r-- | common/xmlparser.h | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/common/xmlparser.h b/common/xmlparser.h index 2f73b5905d..e26ea1eb53 100644 --- a/common/xmlparser.h +++ b/common/xmlparser.h @@ -182,12 +182,12 @@ namespace Common { #define XML_KEY(keyName) {\ lay = new XMLKeyLayout; \ - lay->anyProps = false; \ - lay->anyKeys = false; \ lay->custom = new kLocalParserName::CustomParserCallback; \ ((kLocalParserName::CustomParserCallback*)(lay->custom))->callback = (&kLocalParserName::parserCallback_##keyName); \ layout.top()->children[#keyName] = lay; \ - layout.push(lay); + layout.push(lay); \ + for (Common::List<XMLKeyLayout::XMLKeyProperty>::const_iterator p = globalProps.begin(); p != globalProps.end(); ++p){\ + layout.top()->properties.push_back(*p);} #define XML_KEY_RECURSIVE(keyName) {\ layout.top()->children[#keyName] = layout.top();\ @@ -199,13 +199,13 @@ namespace Common { #define XML_PROP(propName, req) {\ prop.name = #propName; \ prop.required = req; \ - layout.top()->properties.push_back(prop); }\ + layout.top()->properties.push_back(prop); } + +#define XML_GLOBAL_PROP(propName, req) {\ + prop.name = #propName; \ + prop.required = req;\ + globalProps.push_back(prop); } -#define XML_PROP_ANY() {\ - layout.top()->anyProps = true; } - -#define XML_KEY_ANY() {\ - layout.top()->anyKeys = true; } #define CUSTOM_XML_PARSER(parserName) \ protected: \ @@ -217,9 +217,8 @@ namespace Common { Common::Stack<XMLKeyLayout*> layout; \ XMLKeyLayout *lay = 0; \ XMLKeyLayout::XMLKeyProperty prop; \ + Common::List<XMLKeyLayout::XMLKeyProperty> globalProps; \ _XMLkeys = new XMLKeyLayout; \ - _XMLkeys->anyProps = false; \ - _XMLkeys->anyKeys = false; \ layout.push(_XMLkeys); #define PARSER_END() layout.clear(); } @@ -310,14 +309,11 @@ public: }; Common::List<XMLKeyProperty> properties; - bool anyProps; - bool anyKeys; ChildMap children; ~XMLKeyLayout() { properties.clear(); children.clear(); -// delete custom; } } *_XMLkeys; |