Commit 98f6ce2a authored by cutealien's avatar cutealien

Write (subjectively) nicer xml's by using slightly different linebreak rules.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4731 dfc29bdd-3216-0410-991c-e03cc46cb475
parent d2d60889
...@@ -929,11 +929,9 @@ void CGUIEnvironment::writeGUIElement(io::IXMLWriter* writer, IGUIElement* node) ...@@ -929,11 +929,9 @@ void CGUIEnvironment::writeGUIElement(io::IXMLWriter* writer, IGUIElement* node)
core::stringw(node->getTypeName()).c_str()); core::stringw(node->getTypeName()).c_str());
} }
writer->writeLineBreak();
writer->writeLineBreak(); writer->writeLineBreak();
attr->write(writer); attr->write(writer);
writer->writeLineBreak();
} }
// write children // write children
...@@ -942,15 +940,17 @@ void CGUIEnvironment::writeGUIElement(io::IXMLWriter* writer, IGUIElement* node) ...@@ -942,15 +940,17 @@ void CGUIEnvironment::writeGUIElement(io::IXMLWriter* writer, IGUIElement* node)
for (; it != node->getChildren().end(); ++it) for (; it != node->getChildren().end(); ++it)
{ {
if (!(*it)->isSubElement()) if (!(*it)->isSubElement())
{
writer->writeLineBreak();
writeGUIElement(writer, (*it)); writeGUIElement(writer, (*it));
} }
}
// write closing brace if required // write closing brace if required
if (attr->getAttributeCount() != 0) if (attr->getAttributeCount() != 0)
{ {
writer->writeClosingTag(name); writer->writeClosingTag(name);
writer->writeLineBreak(); writer->writeLineBreak();
writer->writeLineBreak();
} }
attr->drop(); attr->drop();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment