summaryrefslogtreecommitdiff
path: root/indra/llui/lltextbox.cpp
diff options
context:
space:
mode:
authorMonroe Linden <monroe@lindenlab.com>2010-07-15 16:32:50 -0700
committerMonroe Linden <monroe@lindenlab.com>2010-07-15 16:32:50 -0700
commit6ad6f9116311ffb565003f7cceb0188ba7115fc8 (patch)
treedd88ed62b786f891ad48d4302b4fdb3fea4fdf19 /indra/llui/lltextbox.cpp
parent88edd15674ca62bcb26bd28c38bfba25ef72e90c (diff)
Changes to allow disabling an LLTextBox (or LLTextBox subclass) to gray out the text.
Due to some legacy issues, text boxes will not gray out on disable unless they have their text_readonly_color property in xui set to "LabelDisabledColor" (or some other color distinct from their text color). Reviewed by Richard.
Diffstat (limited to 'indra/llui/lltextbox.cpp')
-rw-r--r--indra/llui/lltextbox.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/llui/lltextbox.cpp b/indra/llui/lltextbox.cpp
index a1f5b5726b..686179b94e 100644
--- a/indra/llui/lltextbox.cpp
+++ b/indra/llui/lltextbox.cpp
@@ -119,6 +119,17 @@ BOOL LLTextBox::handleHover(S32 x, S32 y, MASK mask)
return handled;
}
+void LLTextBox::setEnabled(BOOL enabled)
+{
+ // just treat enabled as read-only flag
+ bool read_only = !enabled;
+ if (read_only != mReadOnly)
+ {
+ LLTextBase::setReadOnly(read_only);
+ updateSegments();
+ }
+}
+
void LLTextBox::setText(const LLStringExplicit& text , const LLStyle::Params& input_params )
{
// does string argument insertion