Display Name UIs as links when they can be interacted with

Adds font style member to line editors, might be useful in the future?
This commit is contained in:
Liru Færs
2019-10-10 03:31:31 -04:00
parent d16ff5cb5c
commit 9824cc7068
9 changed files with 40 additions and 8 deletions

View File

@@ -76,6 +76,16 @@ BOOL LLNameEditor::handleRightMouseDown(S32 x, S32 y, MASK mask)
return LLLineEditor::handleRightMouseDown(x, y, mask);
}
void LLNameEditor::displayAsLink(bool link)
{
static const LLUICachedControl<LLColor4> color("HTMLAgentColor");
setReadOnlyFgColor(link ? color : LLUI::sColorsGroup->getColor("TextFgReadOnlyColor"));
if (link)
mFontStyle |= LLFontGL::UNDERLINE;
else
mFontStyle &= ~LLFontGL::UNDERLINE;
}
void LLNameEditor::setText(const std::string& text)
{
setToolTip(text);