Skip to content
Snippets Groups Projects
Commit 8d08f417 authored by Kitty Barnett's avatar Kitty Barnett
Browse files

Show tooltip when hovering over an emoji text segment (currently will show its shortcode)

parent f6f52d32
No related branches found
No related tags found
No related merge requests found
......@@ -3557,6 +3557,20 @@ LLEmojiTextSegment::LLEmojiTextSegment(const LLColor4& color, S32 start, S32 end
{
}
BOOL LLEmojiTextSegment::handleToolTip(S32 x, S32 y, MASK mask)
{
if (mTooltip.empty())
{
LLWString emoji = getWText().substr(getStart(), getEnd() - getStart());
if (!emoji.empty())
{
mTooltip = LLEmojiHelper::instance().getToolTip(emoji[0]);
}
}
return LLNormalTextSegment::handleToolTip(x, y, mask);
}
//
// LLOnHoverChangeableTextSegment
//
......
......@@ -187,6 +187,7 @@ class LLEmojiTextSegment : public LLNormalTextSegment
LLEmojiTextSegment(const LLColor4& color, S32 start, S32 end, LLTextBase& editor, BOOL is_visible = TRUE);
bool canEdit() const override { return false; }
BOOL handleToolTip(S32 x, S32 y, MASK mask);
};
// Text segment that changes it's style depending of mouse pointer position ( is it inside or outside segment)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment