diff options
author | Richard Linden <none@none> | 2010-08-25 16:47:07 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2010-08-25 16:47:07 -0700 |
commit | 3604f7fe4b35758db3a730e5efa4a06b2326bdfb (patch) | |
tree | ee8d4d7078c33eb20a773686a1c367e5a2e00cdb /indra/newview/lloutfitslist.cpp | |
parent | c1405887c982f5a7396892017e4ea426ede9af23 (diff) | |
parent | a0b15c827ee7704c1557c9c882ec236d5d67f948 (diff) |
merge
Diffstat (limited to 'indra/newview/lloutfitslist.cpp')
-rw-r--r-- | indra/newview/lloutfitslist.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index d35739d436..8a2073e661 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -68,9 +68,18 @@ bool LLOutfitTabNameComparator::compare(const LLAccordionCtrlTab* tab1, const LL return name1 < name2; } -const LLAccordionCtrlTab::Params& get_accordion_tab_params() +struct outfit_accordion_tab_params : public LLInitParam::Block<outfit_accordion_tab_params, LLAccordionCtrlTab::Params> { - static LLAccordionCtrlTab::Params tab_params; + Mandatory<LLWearableItemsList::Params> wearable_list; + + outfit_accordion_tab_params() + : wearable_list("wearable_items_list") + {} +}; + +const outfit_accordion_tab_params& get_accordion_tab_params() +{ + static outfit_accordion_tab_params tab_params; static bool initialized = false; if (!initialized) { @@ -79,7 +88,8 @@ const LLAccordionCtrlTab::Params& get_accordion_tab_params() LLXMLNodePtr xmlNode; if (LLUICtrlFactory::getLayeredXMLNode("outfit_accordion_tab.xml", xmlNode)) { - LLXUIParser::instance().readXUI(xmlNode, tab_params, "outfit_accordion_tab.xml"); + LLXUIParser parser; + parser.readXUI(xmlNode, tab_params, "outfit_accordion_tab.xml"); } else { @@ -465,8 +475,11 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) std::string name = cat->getName(); - LLAccordionCtrlTab::Params tab_params(get_accordion_tab_params()); + outfit_accordion_tab_params tab_params(get_accordion_tab_params()); LLAccordionCtrlTab* tab = LLUICtrlFactory::create<LLAccordionCtrlTab>(tab_params); + LLWearableItemsList* wearable_list = LLUICtrlFactory::create<LLWearableItemsList>(tab_params.wearable_list); + wearable_list->setShape(tab->getLocalRect()); + tab->addChild(wearable_list); tab->setName(name); tab->setTitle(name); |