diff options
Diffstat (limited to 'indra/llui/llmenugl.cpp')
-rw-r--r-- | indra/llui/llmenugl.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 92543b952e..4f8c83cba7 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -2717,6 +2717,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()) @@ -2761,6 +2770,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; |