From 7f88aedbc3b53496bc99d8e0e64a818c7a3f6d6f Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Fri, 24 Jan 2025 00:26:00 +0100 Subject: #3423 Add Lua as Compile Target in Viewer Script Editor --- indra/llui/llscrolllistctrl.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'indra/llui/llscrolllistctrl.cpp') diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 93bd3c6bed..deaf2fe188 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -1281,6 +1281,19 @@ LLScrollListItem* LLScrollListCtrl::getItemByLabel(const std::string& label, boo return NULL; } +LLScrollListItem* LLScrollListCtrl::getItemByValue(const std::string& value) +{ + for (LLScrollListItem* item : mItemList) + { + if (item->getValue().asString() == value) + { + return item; + } + } + + return NULL; +} + LLScrollListItem* LLScrollListCtrl::getItemByIndex(S32 index) { if (index >= 0 && index < (S32)mItemList.size()) -- cgit v1.3