MCPcopy Create free account
hub / github.com/MyGUI/mygui / setupResources

Method setupResources

Common/Base/PlatformBaseManager/SdlBaseManager.cpp:177–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 8

parseBoolFunction · 0.85
getLastErrorMethod · 0.80
getElementEnumeratorMethod · 0.80
findAttributeMethod · 0.80
openMethod · 0.45
getRootMethod · 0.45
nextMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected