diff options
Diffstat (limited to 'indra/newview/lloutfitgallery.cpp')
-rw-r--r-- | indra/newview/lloutfitgallery.cpp | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp index 65ec38a41d..bd5703ecb5 100644 --- a/indra/newview/lloutfitgallery.cpp +++ b/indra/newview/lloutfitgallery.cpp @@ -107,9 +107,9 @@ const LLOutfitGallery::Params& LLOutfitGallery::getDefaultParams() return LLUICtrlFactory::getDefaultParams<LLOutfitGallery>(); } -BOOL LLOutfitGallery::postBuild() +bool LLOutfitGallery::postBuild() { - BOOL rv = LLOutfitListBase::postBuild(); + bool rv = LLOutfitListBase::postBuild(); mScrollPanel = getChild<LLScrollContainer>("gallery_scroll_panel"); LLPanel::Params params = LLPanel::getDefaultParams(); // Don't parse XML when creating dummy LLPanel mGalleryPanel = LLUICtrlFactory::create<LLPanel>(params); @@ -146,9 +146,9 @@ void LLOutfitGallery::draw() } } -BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask) +bool LLOutfitGallery::handleKeyHere(KEY key, MASK mask) { - BOOL handled = FALSE; + bool handled = false; switch (key) { case KEY_RETURN: @@ -158,7 +158,7 @@ BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask) // Or should it wearSelectedOutfit? getSelectedItem()->openOutfitsContent(); } - handled = TRUE; + handled = true; break; case KEY_DELETE: #if LL_DARWIN @@ -170,12 +170,12 @@ BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask) { onRemoveOutfit(mSelectedOutfitUUID); } - handled = TRUE; + handled = true; break; case KEY_F2: LLAppearanceMgr::instance().renameOutfit(mSelectedOutfitUUID); - handled = TRUE; + handled = true; break; case KEY_PAGE_UP: @@ -183,7 +183,7 @@ BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask) { mScrollPanel->pageUp(30); } - handled = TRUE; + handled = true; break; case KEY_PAGE_DOWN: @@ -191,7 +191,7 @@ BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask) { mScrollPanel->pageDown(30); } - handled = TRUE; + handled = true; break; case KEY_HOME: @@ -199,7 +199,7 @@ BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask) { mScrollPanel->goToTop(); } - handled = TRUE; + handled = true; break; case KEY_END: @@ -207,27 +207,27 @@ BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask) { mScrollPanel->goToBottom(); } - handled = TRUE; + handled = true; break; case KEY_LEFT: moveLeft(); - handled = TRUE; + handled = true; break; case KEY_RIGHT: moveRight(); - handled = TRUE; + handled = true; break; case KEY_UP: moveUp(); - handled = TRUE; + handled = true; break; case KEY_DOWN: moveDown(); - handled = TRUE; + handled = true; break; default: @@ -256,7 +256,7 @@ void LLOutfitGallery::moveUp() item = mIndexToItemMap[n]; LLUUID item_id = item->getUUID(); ChangeOutfitSelection(nullptr, item_id); - item->setFocus(TRUE); + item->setFocus(true); scrollToShowItem(mSelectedOutfitUUID); } @@ -278,7 +278,7 @@ void LLOutfitGallery::moveDown() item = mIndexToItemMap[n]; LLUUID item_id = item->getUUID(); ChangeOutfitSelection(nullptr, item_id); - item->setFocus(TRUE); + item->setFocus(true); scrollToShowItem(mSelectedOutfitUUID); } @@ -303,7 +303,7 @@ void LLOutfitGallery::moveLeft() item = mIndexToItemMap[n]; LLUUID item_id = item->getUUID(); ChangeOutfitSelection(nullptr, item_id); - item->setFocus(TRUE); + item->setFocus(true); scrollToShowItem(mSelectedOutfitUUID); } @@ -326,7 +326,7 @@ void LLOutfitGallery::moveRight() item = mIndexToItemMap[n]; LLUUID item_id = item->getUUID(); ChangeOutfitSelection(nullptr, item_id); - item->setFocus(TRUE); + item->setFocus(true); scrollToShowItem(mSelectedOutfitUUID); } @@ -862,11 +862,11 @@ void LLOutfitGallery::onChangeOutfitSelection(LLWearableItemsList* list, const L return; if (mOutfitMap[mSelectedOutfitUUID]) { - mOutfitMap[mSelectedOutfitUUID]->setSelected(FALSE); + mOutfitMap[mSelectedOutfitUUID]->setSelected(false); } if (mOutfitMap[category_id]) { - mOutfitMap[category_id]->setSelected(TRUE); + mOutfitMap[category_id]->setSelected(true); } // mSelectedOutfitUUID will be set in LLOutfitListBase::ChangeOutfitSelection } @@ -899,15 +899,15 @@ void LLOutfitGallery::updateMessageVisibility() { if (mItems.empty()) { - mMessageTextBox->setVisible(TRUE); - mScrollPanel->setVisible(FALSE); + mMessageTextBox->setVisible(true); + mScrollPanel->setVisible(false); std::string message = getString(getFilterSubString().empty() ? "no_outfits_msg" : "no_matched_outfits_msg"); mMessageTextBox->setValue(message); } else { - mScrollPanel->setVisible(TRUE); - mMessageTextBox->setVisible(FALSE); + mScrollPanel->setVisible(true); + mMessageTextBox->setVisible(false); } } @@ -936,7 +936,7 @@ LLOutfitGalleryItem::~LLOutfitGalleryItem() } -BOOL LLOutfitGalleryItem::postBuild() +bool LLOutfitGalleryItem::postBuild() { setDefaultImage(); @@ -945,7 +945,7 @@ BOOL LLOutfitGalleryItem::postBuild() mTextBgPanel = getChild<LLPanel>("text_bg_panel"); setOutfitWorn(false); mHidden = false; - return TRUE; + return true; } void LLOutfitGalleryItem::draw() @@ -956,7 +956,7 @@ void LLOutfitGalleryItem::draw() LLUIColor border_color = LLUIColorTable::instance().getColor(mSelected ? "OutfitGalleryItemSelected" : "OutfitGalleryItemUnselected", LLColor4::white); LLRect border = getChildView("preview_outfit")->getRect(); border.mRight = border.mRight + 1; - gl_rect_2d(border, border_color.get(), FALSE); + gl_rect_2d(border, border_color.get(), false); // If the floater is focused, don't apply its alpha to the texture (STORM-677). const F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency(); @@ -1012,31 +1012,31 @@ void LLOutfitGalleryItem::setSelected(bool value) setOutfitWorn(mWorn); } -BOOL LLOutfitGalleryItem::handleMouseDown(S32 x, S32 y, MASK mask) +bool LLOutfitGalleryItem::handleMouseDown(S32 x, S32 y, MASK mask) { - setFocus(TRUE); + setFocus(true); return LLUICtrl::handleMouseDown(x, y, mask); } -BOOL LLOutfitGalleryItem::handleRightMouseDown(S32 x, S32 y, MASK mask) +bool LLOutfitGalleryItem::handleRightMouseDown(S32 x, S32 y, MASK mask) { - setFocus(TRUE); + setFocus(true); return LLUICtrl::handleRightMouseDown(x, y, mask); } -BOOL LLOutfitGalleryItem::handleDoubleClick(S32 x, S32 y, MASK mask) +bool LLOutfitGalleryItem::handleDoubleClick(S32 x, S32 y, MASK mask) { return openOutfitsContent() || LLPanel::handleDoubleClick(x, y, mask); } -BOOL LLOutfitGalleryItem::handleKeyHere(KEY key, MASK mask) +bool LLOutfitGalleryItem::handleKeyHere(KEY key, MASK mask) { if (!mGallery) { - return FALSE; + return false; } - BOOL handled = FALSE; + bool handled = false; switch (key) { case KEY_LEFT: @@ -1112,7 +1112,7 @@ bool LLOutfitGalleryItem::setImageAssetId(LLUUID image_asset_id) { mImageAssetId = image_asset_id; mTexturep = texture; - getChildView("preview_outfit")->setVisible(FALSE); + getChildView("preview_outfit")->setVisible(false); mDefaultImage = false; mImageUpdatePending = (texture->getDiscardLevel() == -1); return true; @@ -1129,7 +1129,7 @@ void LLOutfitGalleryItem::setDefaultImage() { mTexturep = NULL; mImageAssetId.setNull(); - getChildView("preview_outfit")->setVisible(TRUE); + getChildView("preview_outfit")->setVisible(true); mDefaultImage = true; mImageUpdatePending = false; } @@ -1198,11 +1198,11 @@ void LLOutfitGalleryGearMenu::onUpdateItemsVisibility() { if (!mMenu) return; bool have_selection = getSelectedOutfitID().notNull(); - mMenu->setItemVisible("expand", FALSE); - mMenu->setItemVisible("collapse", FALSE); + mMenu->setItemVisible("expand", false); + mMenu->setItemVisible("collapse", false); mMenu->setItemVisible("thumbnail", have_selection); - mMenu->setItemVisible("sepatator3", TRUE); - mMenu->setItemVisible("sort_folders_by_name", TRUE); + mMenu->setItemVisible("sepatator3", true); + mMenu->setItemVisible("sort_folders_by_name", true); LLOutfitListGearMenuBase::onUpdateItemsVisibility(); } @@ -1290,7 +1290,7 @@ void LLOutfitGallery::refreshOutfit(const LLUUID& category_id) LLFloater* appearance_floater = LLFloaterReg::getInstance("appearance"); if (appearance_floater) { - appearance_floater->setFocus(TRUE); + appearance_floater->setFocus(true); } } if (item_name == LLAppearanceMgr::sExpectedTextureName) |