| 175 | } |
| 176 | |
| 177 | void SdlBaseManager::setupResources() |
| 178 | { |
| 179 | MyGUI::xml::Document doc; |
| 180 | |
| 181 | if (!doc.open(std::string("resources.xml"))) |
| 182 | MYGUI_LOG(Warning, "Failed to load resources.xml: " << doc.getLastError()); |
| 183 | |
| 184 | MyGUI::xml::ElementPtr root = doc.getRoot(); |
| 185 | if (root == nullptr || root->getName() != "Paths") |
| 186 | return; |
| 187 | |
| 188 | MyGUI::xml::ElementEnumerator node = root->getElementEnumerator(); |
| 189 | while (node.next()) |
| 190 | { |
| 191 | if (node->getName() == "Path") |
| 192 | { |
| 193 | if (!node->findAttribute("root").empty()) |
| 194 | { |
| 195 | bool rootAttribute = MyGUI::utility::parseBool(node->findAttribute("root")); |
| 196 | if (rootAttribute) |
| 197 | mRootMedia = node->getContent(); |
| 198 | } |
| 199 | addResourceLocation(node->getContent(), false); |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | addResourceLocation(getRootMedia() + "/Common/Base"); |
| 204 | } |
| 205 | |
| 206 | MyGUI::MapString SdlBaseManager::getStatistic() |
| 207 | { |
nothing calls this directly
no test coverage detected