summaryrefslogtreecommitdiff
path: root/indra/llui/llcombobox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llcombobox.cpp')
-rw-r--r--indra/llui/llcombobox.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp
index ae676251ff..01463b4962 100644
--- a/indra/llui/llcombobox.cpp
+++ b/indra/llui/llcombobox.cpp
@@ -1323,6 +1323,39 @@ bool LLComboBox::selectItemRange( S32 first, S32 last )
return mList->selectItemRange(first, last);
}
+void LLComboBox::addInfo(LLSD& info)
+{
+ LLUICtrl::addInfo(info);
+
+ if (mList && mList->getItemCount() > 0)
+ {
+ LLSD items_array;
+ std::vector<LLScrollListItem*> item_list = mList->getAllData();
+ for (std::vector<LLScrollListItem*>::iterator iter = item_list.begin(); iter != item_list.end(); ++iter)
+ {
+ if (LLScrollListItem* item = *iter)
+ {
+ LLSD item_info;
+ item_info["value"] = item->getValue();
+ if (item->getNumColumns() > 0)
+ {
+ if (LLScrollListCell* cell = item->getColumn(0))
+ {
+ item_info["label"] = cell->getValue();
+ }
+ }
+ items_array.append(item_info);
+ }
+ }
+ info["items"] = items_array;
+ info["item_count"] = mList->getItemCount();
+ info["current_selection"] = getSelectedItemLabel();
+ }
+ else
+ {
+ info["item_count"] = 0;
+ }
+}
static LLDefaultChildRegistry::Register<LLIconsComboBox> register_icons_combo_box("icons_combo_box");