Inventory panels can have filename parameter now

This commit is contained in:
Lirusaito
2019-03-05 13:14:48 -05:00
parent ee465c4169
commit c639b4cf6c
2 changed files with 12 additions and 4 deletions

View File

@@ -309,6 +309,14 @@ public:
LLView* LLInventoryPanel::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
{
std::string filename;
if (node->getAttributeString("filename", filename) && !filename.empty())
{
LLXMLNodePtr node;
if (LLUICtrlFactory::getLayeredXMLNode(filename, node))
return factory->createCtrlWidget(static_cast<LLPanel*>(parent), node);
}
LLInventoryPanel* panel;
std::string name("inventory_panel");

View File

@@ -76,10 +76,10 @@
tab_group="1"
tab_position="top"
tab_min_width="10">
<inventory_panel label="All" name="All Items" filename="panel_marketplace_listings_inventory.xml"/>
<inventory_panel label="Active" name="Active Items" filename="panel_marketplace_listings_listed.xml"/>
<inventory_panel label="Inactive" name="Inactive Items" filename="panel_marketplace_listings_unlisted.xml"/>
<inventory_panel label="Unassociated" name="Unassociated Items" filename="panel_marketplace_listings_unassociated.xml"/>
<inventory_panel filename="panel_marketplace_listings_inventory.xml"/>
<inventory_panel filename="panel_marketplace_listings_listed.xml"/>
<inventory_panel filename="panel_marketplace_listings_unlisted.xml"/>
<inventory_panel filename="panel_marketplace_listings_unassociated.xml"/>
</tab_container>
</panel>
<panel