diff options
Diffstat (limited to 'indra/newview/llfloateremojipicker.cpp')
-rw-r--r-- | indra/newview/llfloateremojipicker.cpp | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/indra/newview/llfloateremojipicker.cpp b/indra/newview/llfloateremojipicker.cpp index 1578caa39c..96908df2ab 100644 --- a/indra/newview/llfloateremojipicker.cpp +++ b/indra/newview/llfloateremojipicker.cpp @@ -80,7 +80,7 @@ public: addChild(mList); } - virtual void updatePanel(BOOL allow_modify) override {} + virtual void updatePanel(bool allow_modify) override {} public: LLScrollingPanelList* mList; @@ -114,7 +114,7 @@ public: mText.size()); // max_chars } - virtual void updatePanel(BOOL allow_modify) override {} + virtual void updatePanel(bool allow_modify) override {} private: const LLWString mText; @@ -151,7 +151,7 @@ public: 1); // max_chars } - virtual void updatePanel(BOOL allow_modify) override {} + virtual void updatePanel(bool allow_modify) override {} const LLEmojiSearchResult& getData() const { return mData; } LLWString getText() const { return mText; } @@ -298,14 +298,14 @@ LLFloaterEmojiPicker::LLFloaterEmojiPicker(const LLSD& key) : super(key) { // This floater should hover on top of our dependent (with the dependent having the focus) - setFocusStealsFrontmost(FALSE); - setBackgroundVisible(FALSE); - setAutoFocus(FALSE); + setFocusStealsFrontmost(false); + setBackgroundVisible(false); + setAutoFocus(false); loadState(); } -BOOL LLFloaterEmojiPicker::postBuild() +bool LLFloaterEmojiPicker::postBuild() { mGroups = getChild<LLPanel>("Groups"); mBadge = getChild<LLPanel>("Badge"); @@ -314,7 +314,7 @@ BOOL LLFloaterEmojiPicker::postBuild() mDummy = getChild<LLTextBox>("Dummy"); mPreview = new LLEmojiPreviewPanel(); - mPreview->setVisible(FALSE); + mPreview->setVisible(false); addChild(mPreview); return LLFloater::postBuild(); @@ -329,7 +329,7 @@ void LLFloaterEmojiPicker::onOpen(const LLSD& key) initialize(); - gFloaterView->adjustToFitScreen(this, FALSE); + gFloaterView->adjustToFitScreen(this, false); } void LLFloaterEmojiPicker::dirtyRect() @@ -374,7 +374,7 @@ void LLFloaterEmojiPicker::initialize() return; } - mGroups->setVisible(FALSE); + mGroups->setVisible(false); mFocusedIconRow = -1; mFocusedIconCol = -1; mFocusedIcon = nullptr; @@ -396,7 +396,7 @@ void LLFloaterEmojiPicker::initialize() return; } - mGroups->setVisible(TRUE); + mGroups->setVisible(true); mPreview->setIcon(nullptr); showPreview(true); @@ -405,8 +405,8 @@ void LLFloaterEmojiPicker::initialize() std::find(mFilteredEmojiGroups.begin(), mFilteredEmojiGroups.end(), groupIndex))) % (1 + mFilteredEmojiGroups.size()); - mGroupButtons[mSelectedGroupIndex]->setToggleState(TRUE); - mGroupButtons[mSelectedGroupIndex]->setUseFontColor(TRUE); + mGroupButtons[mSelectedGroupIndex]->setToggleState(true); + mGroupButtons[mSelectedGroupIndex]->setUseFontColor(true); fillEmojis(); } @@ -576,9 +576,9 @@ void LLFloaterEmojiPicker::createGroupButton(LLButton::Params& params, const LLR button->setMouseLeaveCallback([this](LLUICtrl* ctrl, const LLSD&) { onGroupButtonMouseLeave(ctrl); }); button->setRect(rect); - button->setTabStop(FALSE); + button->setTabStop(false); button->setLabel(LLUIString(LLWString(1, emoji))); - button->setUseFontColor(FALSE); + button->setUseFontColor(false); mGroupButtons.push_back(button); mGroups->addChild(button); @@ -615,13 +615,13 @@ void LLFloaterEmojiPicker::selectEmojiGroup(U32 index) if (mSelectedGroupIndex < mGroupButtons.size()) { - mGroupButtons[mSelectedGroupIndex]->setUseFontColor(FALSE); - mGroupButtons[mSelectedGroupIndex]->setToggleState(FALSE); + mGroupButtons[mSelectedGroupIndex]->setUseFontColor(false); + mGroupButtons[mSelectedGroupIndex]->setToggleState(false); } mSelectedGroupIndex = index; - mGroupButtons[mSelectedGroupIndex]->setToggleState(TRUE); - mGroupButtons[mSelectedGroupIndex]->setUseFontColor(TRUE); + mGroupButtons[mSelectedGroupIndex]->setToggleState(true); + mGroupButtons[mSelectedGroupIndex]->setUseFontColor(true); LLButton* button = mGroupButtons[mSelectedGroupIndex]; LLRect rect = mBadge->getRect(); @@ -675,7 +675,7 @@ void LLFloaterEmojiPicker::fillEmojis(bool fromResize) LLScrollingPanelList::Params row_list_params; row_list_params.rect = row_panel_params.rect; - row_list_params.is_horizontal = TRUE; + row_list_params.is_horizontal = true; row_list_params.padding = 0; row_list_params.spacing = icon_spacing; @@ -832,8 +832,8 @@ void LLFloaterEmojiPicker::createEmojiIcon(const LLEmojiSearchResult& emoji, void LLFloaterEmojiPicker::showPreview(bool show) { //mPreview->setIcon(nullptr); - mDummy->setVisible(show ? FALSE : TRUE); - mPreview->setVisible(show ? TRUE : FALSE); + mDummy->setVisible(show); + mPreview->setVisible(show); } void LLFloaterEmojiPicker::onGroupButtonClick(LLUICtrl* ctrl) @@ -855,7 +855,7 @@ void LLFloaterEmojiPicker::onGroupButtonMouseEnter(LLUICtrl* ctrl) { if (LLButton* button = dynamic_cast<LLButton*>(ctrl)) { - button->setUseFontColor(TRUE); + button->setUseFontColor(true); } } @@ -929,7 +929,7 @@ void LLFloaterEmojiPicker::onEmojiMouseUp(LLUICtrl* ctrl) onCommit(); - if (!mHint.empty() || !(gKeyboard->currentMask(TRUE) & MASK_SHIFT)) + if (!mHint.empty() || !(gKeyboard->currentMask(true) & MASK_SHIFT)) { hideFloater(); } @@ -1054,18 +1054,18 @@ bool LLFloaterEmojiPicker::moveFocusedIconNext() void LLFloaterEmojiPicker::selectGridIcon(LLEmojiGridIcon* icon) { - icon->setBackgroundVisible(TRUE); + icon->setBackgroundVisible(true); mPreview->setIcon(icon); } void LLFloaterEmojiPicker::unselectGridIcon(LLEmojiGridIcon* icon) { - icon->setBackgroundVisible(FALSE); + icon->setBackgroundVisible(false); mPreview->setIcon(nullptr); } // virtual -BOOL LLFloaterEmojiPicker::handleKey(KEY key, MASK mask, BOOL called_from_parent) +bool LLFloaterEmojiPicker::handleKey(KEY key, MASK mask, bool called_from_parent) { if (mask == MASK_NONE) { @@ -1073,19 +1073,19 @@ BOOL LLFloaterEmojiPicker::handleKey(KEY key, MASK mask, BOOL called_from_parent { case KEY_UP: moveFocusedIconUp(); - return TRUE; + return true; case KEY_DOWN: moveFocusedIconDown(); - return TRUE; + return true; case KEY_LEFT: moveFocusedIconPrev(); - return TRUE; + return true; case KEY_RIGHT: moveFocusedIconNext(); - return TRUE; + return true; case KEY_ESCAPE: hideFloater(); - return TRUE; + return true; } } @@ -1095,10 +1095,10 @@ BOOL LLFloaterEmojiPicker::handleKey(KEY key, MASK mask, BOOL called_from_parent { case KEY_LEFT: selectEmojiGroup((mSelectedGroupIndex + mFilteredEmojis.size()) % mGroupButtons.size()); - return TRUE; + return true; case KEY_RIGHT: selectEmojiGroup((mSelectedGroupIndex + 1) % mGroupButtons.size()); - return TRUE; + return true; } } @@ -1112,7 +1112,7 @@ BOOL LLFloaterEmojiPicker::handleKey(KEY key, MASK mask, BOOL called_from_parent onEmojiMouseUp(mFocusedIcon); } mRecentReturnPressedMs = time; - return TRUE; + return true; } if (mHint.empty()) @@ -1128,7 +1128,7 @@ BOOL LLFloaterEmojiPicker::handleKey(KEY key, MASK mask, BOOL called_from_parent mFilterPattern += (char)key; initialize(); } - return TRUE; + return true; } else if (key == KEY_BACKSPACE) { @@ -1141,7 +1141,7 @@ BOOL LLFloaterEmojiPicker::handleKey(KEY key, MASK mask, BOOL called_from_parent } initialize(); } - return TRUE; + return true; } } |