diff --git a/THEMES.md b/THEMES.md index 196e0d03b..b472a41d3 100644 --- a/THEMES.md +++ b/THEMES.md @@ -243,6 +243,7 @@ Reference * `fontPath` - type: PATH. * `fontSize` - type: FLOAT. * `scrollSound` - type: PATH. + * `center` - type: BOOLEAN. #### container * `pos` - type: NORMALIZED_PAIR. diff --git a/src/ThemeData.cpp b/src/ThemeData.cpp index 8d68dec20..d345253fb 100644 --- a/src/ThemeData.cpp +++ b/src/ThemeData.cpp @@ -34,7 +34,8 @@ std::map< std::string, std::map > T ("secondaryColor", COLOR) ("fontPath", PATH) ("fontSize", FLOAT) - ("scrollSound", PATH)) + ("scrollSound", PATH) + ("center", BOOLEAN)) ("container", boost::assign::map_list_of ("pos", NORMALIZED_PAIR) ("size", NORMALIZED_PAIR)) diff --git a/src/components/TextListComponent.h b/src/components/TextListComponent.h index 97e55e4ff..4c4279a38 100644 --- a/src/components/TextListComponent.h +++ b/src/components/TextListComponent.h @@ -433,6 +433,9 @@ void TextListComponent::applyTheme(const std::shared_ptr& theme, c if(properties & SOUND && elem->has("scrollSound")) setSound(Sound::get(elem->get("scrollSound"))); + + if(properties & CENTER && elem->has("center")) + mCentered = elem->get("center"); } #endif