diff options
author | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2023-04-14 07:44:56 +0200 |
---|---|---|
committer | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2023-04-14 17:27:30 +0200 |
commit | ff7ebf08922293c1623b7bdb8c9923c14fc9db48 (patch) | |
tree | 0ea63b12ec8cbd8d495c85c141fc783306d7dde1 /indra/newview/llfloaterimsessiontab.cpp | |
parent | 638a45cbb1aeb228a0cf910571f1af8759c003a9 (diff) |
SL-19575 Create emoji gallery access icon
Diffstat (limited to 'indra/newview/llfloaterimsessiontab.cpp')
-rw-r--r-- | indra/newview/llfloaterimsessiontab.cpp | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 78271369d2..3d9751dd35 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -40,6 +40,7 @@ #include "llchicletbar.h" #include "lldraghandle.h" #include "llfloaterreg.h" +#include "llfloateremojipicker.h" #include "llfloaterimsession.h" #include "llfloaterimcontainer.h" // to replace separate IM Floaters with multifloater container #include "lllayoutstack.h" @@ -250,10 +251,13 @@ BOOL LLFloaterIMSessionTab::postBuild() mTearOffBtn = getChild<LLButton>("tear_off_btn"); mTearOffBtn->setCommitCallback(boost::bind(&LLFloaterIMSessionTab::onTearOffClicked, this)); + mEmojiBtn = getChild<LLButton>("emoji_panel_btn"); + mEmojiBtn->setClickedCallback(boost::bind(&LLFloaterIMSessionTab::onEmojiPanelBtnClicked, this)); + mGearBtn = getChild<LLButton>("gear_btn"); mAddBtn = getChild<LLButton>("add_btn"); mVoiceButton = getChild<LLButton>("voice_call_btn"); - + mParticipantListPanel = getChild<LLLayoutPanel>("speakers_list_panel"); mRightPartPanel = getChild<LLLayoutPanel>("right_part_holder"); @@ -424,6 +428,30 @@ void LLFloaterIMSessionTab::onInputEditorClicked() gToolBarView->flashCommand(LLCommandId("chat"), false); } +void LLFloaterIMSessionTab::onEmojiPanelBtnClicked(LLFloaterIMSessionTab* self) +{ + if (LLFloaterEmojiPicker* picker = LLFloaterEmojiPicker::getInstance()) + { + if (!picker->isShown()) + { + picker->show(boost::bind(&LLFloaterIMSessionTab::onEmojiSelected, self, _1)); + if (LLFloater* root_floater = gFloaterView->getParentFloater(self)) + { + root_floater->addDependentFloater(picker); + } + } + else + { + picker->closeFloater(); + } + } +} + +void LLFloaterIMSessionTab::onEmojiSelected(llwchar emoji) +{ + mInputEditor->insertEmoji(emoji); +} + std::string LLFloaterIMSessionTab::appendTime() { time_t utc_time; |