void CGUI::Xeromyces_ReadRootSetup(XMBElement Element, CXeromyces* pFile) { for (XMBElement child : Element.GetChildNodes()) { CStr name(pFile->GetElementString(child.GetNodeName())); if (name == "scrollbar") Xeromyces_ReadScrollBarStyle(child, pFile); else if (name == "icon") Xeromyces_ReadIcon(child, pFile); else if (name == "tooltip") Xeromyces_ReadTooltip(child, pFile); else if (name == "color") Xeromyces_ReadColor(child, pFile); else debug_warn(L"Invalid data - DTD shouldn't allow this"); } }
void CGUI::Xeromyces_ReadRootSetup(XMBElement Element, CXeromyces* pFile) { // Iterate main children // they should all be <icon>, <scrollbar> or <tooltip>. XMBElementList children = Element.GetChildNodes(); for (int i=0; i<children.Count; ++i) { XMBElement child = children.Item(i); // Read in this whole object into the GUI CStr name (pFile->GetElementString(child.GetNodeName())); if (name == "scrollbar") { Xeromyces_ReadScrollBarStyle(child, pFile); } else if (name == "icon") { Xeromyces_ReadIcon(child, pFile); } else if (name == "tooltip") { Xeromyces_ReadTooltip(child, pFile); } else if (name == "color") { Xeromyces_ReadColor(child, pFile); } else { debug_warn(L"Invalid data - DTD shouldn't allow this"); } } }