From e414a91d7fb8ffea664bf1c035cb0bab3c4ece7e Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 9 Jun 2010 17:09:42 -0400 Subject: EXT-7430 : Create art overlay for inventory icons that are links Took out explicit _Link icons and replaced with overlay. Removed links overlays from non-main-inventory-floater panels. --- indra/newview/llfolderviewitem.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfolderviewitem.cpp') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 54e9bd5383..0c437cf035 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -96,6 +96,7 @@ void LLFolderViewItem::cleanupClass() LLFolderViewItem::Params::Params() : icon(), icon_open(), + icon_overlay(), root(), listener(), folder_arrow_image("folder_arrow_image"), @@ -133,6 +134,7 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p) mCreationDate(p.creation_date), mIcon(p.icon), mIconOpen(p.icon_open), + mIconOverlay(p.icon_overlay), mListener(p.listener), mHidden(false), mShowLoadStatus(false) @@ -617,6 +619,7 @@ const std::string& LLFolderViewItem::getSearchableLabel() const LLViewerInventoryItem * LLFolderViewItem::getInventoryItem(void) { + if (!getListener()) return NULL; return gInventory.getItem(getListener()->getUUID()); } @@ -948,7 +951,8 @@ void LLFolderViewItem::draw() mDragAndDropTarget = FALSE; } - + const LLViewerInventoryItem *item = getInventoryItem(); + const BOOL highlight_link = mIconOverlay && item && item->getIsLinkType(); //--------------------------------------------------------------------------------// // Draw open icon // @@ -962,6 +966,10 @@ void LLFolderViewItem::draw() mIcon->draw(icon_x, getRect().getHeight() - mIcon->getHeight() - TOP_PAD + 1); } + if (highlight_link) + { + mIconOverlay->draw(icon_x, getRect().getHeight() - mIcon->getHeight() - TOP_PAD + 1); + } //--------------------------------------------------------------------------------// // Exit if no label to draw @@ -972,8 +980,7 @@ void LLFolderViewItem::draw() } LLColor4 color = (mIsSelected && filled) ? sHighlightFgColor : sFgColor; - const LLViewerInventoryItem *item = getInventoryItem(); - if (item && item->getIsLinkType()) color = sLinkColor; + if (highlight_link) color = sLinkColor; if (in_library) color = sLibraryColor; F32 right_x = 0; -- cgit v1.2.3