From a974ca096ce878faab16f13ba474f1dbc669c386 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Thu, 14 May 2015 07:30:49 -0400 Subject: [PATCH] Allow setting the label of a flyout button dynamically in code. --- indra/llui/llflyoutbutton.cpp | 4 ++++ indra/llui/llflyoutbutton.h | 1 + 2 files changed, 5 insertions(+) diff --git a/indra/llui/llflyoutbutton.cpp b/indra/llui/llflyoutbutton.cpp index 1290f6b62..52f443d91 100644 --- a/indra/llui/llflyoutbutton.cpp +++ b/indra/llui/llflyoutbutton.cpp @@ -173,4 +173,8 @@ void LLFlyoutButton::setToggleState(BOOL state) mToggleState = state; } +void LLFlyoutButton::setLabel(const std::string& label) +{ + mActionButton->setLabel(label); +} diff --git a/indra/llui/llflyoutbutton.h b/indra/llui/llflyoutbutton.h index 0d9ce80bf..d74a7eb3a 100644 --- a/indra/llui/llflyoutbutton.h +++ b/indra/llui/llflyoutbutton.h @@ -45,6 +45,7 @@ public: virtual void setEnabled(BOOL enabled); void setToggleState(BOOL state); + void setLabel(const std::string& label); // Not to be confused with LLComboBox::setLabel virtual LLXMLNodePtr getXML(bool save_children = true) const; static LLView* fromXML(LLXMLNodePtr node, LLView* parent, LLUICtrlFactory* factory);