diff options
author | AlexanderP ProductEngine <apaschenko@productengine.com> | 2012-11-16 12:38:40 +0200 |
---|---|---|
committer | AlexanderP ProductEngine <apaschenko@productengine.com> | 2012-11-16 12:38:40 +0200 |
commit | 50b69c3f97c0b58791f7dd67f8b2fbdc9e8ef503 (patch) | |
tree | 1a97f8460be345cf88203222260d330b1fb09894 /indra/llui/llfolderviewitem.cpp | |
parent | 0b910871ab2935bde912314515f8b53ec3ff754e (diff) |
CHUI-487, CHUI-488 W.I.P. #3 (Enable flashing FUI button behavior and Implement Flashing Conversations panel line item behavior): implemented conversation's item flashing
Diffstat (limited to 'indra/llui/llfolderviewitem.cpp')
-rwxr-xr-x | indra/llui/llfolderviewitem.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 822534ffcf..90568f344a 100755 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -23,9 +23,11 @@ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ + +#include "../newview/llflashtimer.h" + #include "linden_common.h" #include "llfolderviewitem.h" - #include "llfolderview.h" #include "llfolderviewmodel.h" #include "llpanel.h" @@ -142,6 +144,8 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p) mArrowSize(p.arrow_size), mMaxFolderItemOverlap(p.max_folder_item_overlap) { + mFlashTimer = new LLFlashTimer(); + sFgColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE); sHighlightBgColor = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", DEFAULT_WHITE); sHighlightFgColor = LLUIColorTable::instance().getColor("MenuItemHighlightFgColor", DEFAULT_WHITE); @@ -676,12 +680,16 @@ void LLFolderViewItem::drawHighlight(const BOOL showContent, const BOOL hasKeybo const S32 focus_bottom = getRect().getHeight() - mItemHeight; const bool folder_open = (getRect().getHeight() > mItemHeight + 4); const S32 FOCUS_LEFT = 1; + bool flashing = mFlashTimer->isFlashing(); + + if (flashing? mFlashTimer->isHighlight() : mIsSelected) // always render "current" item (only render other selected items if + // mShowSingleSelection is FALSE) or flashing item - if (mIsSelected) // always render "current" item. Only render other selected items if mShowSingleSelection is FALSE { gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); LLColor4 bg_color = bgColor; - if (!mIsCurSelection) + bool selection = flashing? mFlashTimer->isHighlight() : mIsCurSelection; + if (!selection) { // do time-based fade of extra objects F32 fade_time = (getRoot() ? getRoot()->getSelectionFadeElapsedTime() : 0.0f); @@ -701,7 +709,7 @@ void LLFolderViewItem::drawHighlight(const BOOL showContent, const BOOL hasKeybo getRect().getWidth() - 2, focus_bottom, bg_color, hasKeyboardFocus); - if (mIsCurSelection) + if (selection) { gl_rect_2d(FOCUS_LEFT, focus_top, |