Allow v3 xui style strings for anything panel derived. <panel.string/>

This commit is contained in:
Inusaito Sayori
2013-11-04 22:54:44 -05:00
parent 7129d97ee5
commit f935453859

View File

@@ -530,11 +530,13 @@ BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *f
void LLPanel::initChildrenXML(LLXMLNodePtr node, LLUICtrlFactory* factory) void LLPanel::initChildrenXML(LLXMLNodePtr node, LLUICtrlFactory* factory)
{ {
std::string kidstring(node->getName()->mString);
kidstring += ".string";
LLXMLNodePtr child; LLXMLNodePtr child;
for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling()) for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling())
{ {
// look for string declarations for programmatic text // look for string declarations for programmatic text
if (child->hasName("string")) if (child->hasName("string") || child->hasName(kidstring))
{ {
std::string string_name; std::string string_name;
child->getAttributeString("name", string_name); child->getAttributeString("name", string_name);