38 bool loadFromFile(
const std::string &mapData,
IAssetLoader *assetsLoader);
39 const std::vector<Context> &getContexts()
const;
41 static UILayoutDirection parseLayoutDirection(std::string alignString);
43 static UIAlign parseAlign(std::string alignString);
45 static UIPadding parsePadding(std::string value);
47 static Color parseColor(
const std::string &value);
49 static bool parseBool(
const std::string &value);
51 static bool parseFloat(
const std::string &invalue,
float &outValue);
52 static bool parseInt(
const std::string &invalue,
int &outValue);
55 std::vector<Context> m_contexts;
57 Node parseNode(tinyxml2::XMLElement *nodeElement);
59 static Color parseRGBColor(
const std::string &value);
60 static Color parseRGBAColor(
const std::string &value);
62 std::string resolvePath(
const std::string &basePath,
const std::string &relativePath);
64 static constexpr std::pair<const char *, Color> preDefinedColors[] = {
65 {
"white", Colors::white},
66 {
"black", Colors::black},
67 {
"red", Colors::red},
68 {
"green", Colors::green},
69 {
"blue", Colors::blue},
70 {
"yellow", Colors::yellow},
71 {
"cyan", Colors::cyan},
72 {
"magenta", Colors::magenta},
73 {
"transparent", Colors::transparent}