diff --git a/THEMES.md b/THEMES.md index 92f1090b5..ec7edb0b0 100644 --- a/THEMES.md +++ b/THEMES.md @@ -46,7 +46,7 @@ Here is a very simple theme that changes the description text's color: ```xml - 3 + 3 00FF00 @@ -66,7 +66,7 @@ How it works Everything must be inside a `` tag. -**The `` tag *must* be specified**. This is the version of the theming system the theme was designed for. The current version is 3. +**The `` tag *must* be specified**. This is the version of the theming system the theme was designed for. The current version is 3. @@ -121,7 +121,7 @@ You can include theme files within theme files, similar to `#include` in C (thou `~/.emulationstation/all_themes.xml`: ```xml - 3 + 3 ./all_themes/myfont.ttf @@ -134,7 +134,7 @@ You can include theme files within theme files, similar to `#include` in C (thou `~/.emulationstation/snes/theme.xml`: ```xml - 3 + 3 ./../all_themes.xml @@ -147,7 +147,7 @@ You can include theme files within theme files, similar to `#include` in C (thou Is equivalent to this `snes/theme.xml`: ```xml - 3 + 3 ./all_themes/myfont.ttf @@ -157,7 +157,7 @@ Is equivalent to this `snes/theme.xml`: ``` -Notice that properties that were not specified got merged (``) and the `snes/theme.xml` could overwrite the included files' values (``). Also notice the included file still needed the `` tag. +Notice that properties that were not specified got merged (``) and the `snes/theme.xml` could overwrite the included files' values (``). Also notice the included file still needed the `` tag. @@ -167,7 +167,7 @@ Sometimes you want to apply the same properties to the same elements across mult ```xml - 3 + 3 ./snes_art/snes_header.png @@ -184,7 +184,7 @@ Sometimes you want to apply the same properties to the same elements across mult This is equivalent to: ```xml - 3 + 3 ./snes_art/snes_header.png @@ -217,7 +217,7 @@ You can theme multiple elements *of the same type* simultaneously. The `name` a ```xml - 3 + 3 48474D diff --git a/src/ThemeData.cpp b/src/ThemeData.cpp index cd3ee320e..513a26c8c 100644 --- a/src/ThemeData.cpp +++ b/src/ThemeData.cpp @@ -86,8 +86,8 @@ std::map< std::string, ElementMapType > ThemeData::sElementMap = boost::assign:: namespace fs = boost::filesystem; -#define MINIMUM_THEME_VERSION 3 -#define CURRENT_THEME_VERSION 3 +#define MINIMUM_THEME_FORMAT_VERSION 3 +#define CURRENT_THEME_FORMAT_VERSION 3 // helper unsigned int getHexColor(const char* str) @@ -164,12 +164,12 @@ void ThemeData::loadFile(const std::string& path) throw error << "Missing tag!"; // parse version - mVersion = root.child("version").text().as_float(-404); + mVersion = root.child("formatVersion").text().as_float(-404); if(mVersion == -404) - throw error << " tag missing!\n It's either out of date or you need to add " << CURRENT_THEME_VERSION << " inside your tag."; + throw error << " tag missing!\n It's either out of date or you need to add " << CURRENT_THEME_FORMAT_VERSION << " inside your tag."; - if(mVersion < MINIMUM_THEME_VERSION) - throw error << "Theme is version " << mVersion << ". Minimum supported version is " << MINIMUM_THEME_VERSION << "."; + if(mVersion < MINIMUM_THEME_FORMAT_VERSION) + throw error << "Theme uses format version " << mVersion << ". Minimum supported version is " << MINIMUM_THEME_FORMAT_VERSION << "."; parseIncludes(root); parseViews(root);