void CGUI::Xeromyces_ReadRootObjects(XMBElement Element, CXeromyces* pFile, boost::unordered_set<VfsPath>& Paths) { int el_script = pFile->GetElementID("script"); std::vector<std::pair<CStr, CStr> > subst; // Iterate main children // they should all be <object> or <script> elements for (XMBElement child : Element.GetChildNodes()) { if (child.GetNodeName() == el_script) // Execute the inline script Xeromyces_ReadScript(child, pFile, Paths); else // Read in this whole object into the GUI Xeromyces_ReadObject(child, pFile, m_BaseObject, subst, Paths, 0); } }
void CGUI::Xeromyces_ReadRootObjects(XMBElement Element, CXeromyces* pFile, boost::unordered_set<VfsPath>& Paths) { int el_script = pFile->GetElementID("script"); std::vector<std::pair<CStr, CStr> > subst; // Iterate main children // they should all be <object> or <script> elements XMBElementList children = Element.GetChildNodes(); for (int i=0; i<children.Count; ++i) { //debug_printf(L"Object %d\n", i); XMBElement child = children.Item(i); if (child.GetNodeName() == el_script) // Execute the inline script Xeromyces_ReadScript(child, pFile, Paths); else // Read in this whole object into the GUI Xeromyces_ReadObject(child, pFile, m_BaseObject, subst, Paths); } }