#include "tags.hpp" #include namespace Gui { bool replaceTag(const MyGUI::UString& tag, MyGUI::UString& out, const std::map& fallbackSettings) { std::string fontcolour = "fontcolour="; size_t fontcolourLength = fontcolour.length(); std::string fontcolourhtml = "fontcolourhtml="; size_t fontcolourhtmlLength = fontcolourhtml.length(); if (tag.compare(0, fontcolourLength, fontcolour) == 0) { std::string fallbackName = "FontColor_color_" + tag.substr(fontcolourLength); std::map::const_iterator it = fallbackSettings.find(fallbackName); if (it == fallbackSettings.end()) throw std::runtime_error("Unknown fallback name: " + fallbackName); std::string str = it->second; std::string ret[3]; unsigned int j=0; for(unsigned int i=0;i::const_iterator it = fallbackSettings.find(fallbackName); if (it == fallbackSettings.end()) throw std::runtime_error("Unknown fallback name: " + fallbackName); std::string str = it->second; std::string ret[3]; unsigned int j=0; for(unsigned int i=0;i