summaryrefslogtreecommitdiff
path: root/indra/llui/llmenugl.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-04-20 18:14:37 +0000
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-04-20 18:14:37 +0000
commit9634bcf488f45675e53a761808f59881b57cbe8c (patch)
tree40b695d7acb23e381331bda92c9f7550d655749e /indra/llui/llmenugl.cpp
parentde17c53ae32fef76827201ed24a5af137af12313 (diff)
parentd7f1c88c35849e56f5b352f13c16a08467d1533b (diff)
Merged master into DRTVWR-508
Diffstat (limited to 'indra/llui/llmenugl.cpp')
-rw-r--r--indra/llui/llmenugl.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 732fa9feb1..5568a84494 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -2723,6 +2723,15 @@ void LLMenuGL::setItemVisible( const std::string& name, BOOL visible )
}
}
+
+void LLMenuGL::setItemLabel(const std::string &name, const std::string &label)
+{
+ LLMenuItemGL *item = getItem(name);
+
+ if (item)
+ item->setLabel(label);
+}
+
void LLMenuGL::setItemLastSelected(LLMenuItemGL* item)
{
if (getVisible())
@@ -2767,6 +2776,19 @@ LLMenuItemGL* LLMenuGL::getItem(S32 number)
return NULL;
}
+LLMenuItemGL* LLMenuGL::getItem(std::string name)
+{
+ item_list_t::iterator item_iter;
+ for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter)
+ {
+ if ((*item_iter)->getName() == name)
+ {
+ return (*item_iter);
+ }
+ }
+ return NULL;
+}
+
LLMenuItemGL* LLMenuGL::getHighlightedItem()
{
item_list_t::iterator item_iter;