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/newview/llflashtimer.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/newview/llflashtimer.cpp')
-rw-r--r-- | indra/newview/llflashtimer.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/newview/llflashtimer.cpp b/indra/newview/llflashtimer.cpp index f44ca9f90c..2feacfa218 100644 --- a/indra/newview/llflashtimer.cpp +++ b/indra/newview/llflashtimer.cpp @@ -29,11 +29,13 @@ #include "llflashtimer.h" #include "llviewercontrol.h" +#include "lleventtimer.h" LLFlashTimer::LLFlashTimer(callback_t cb, S32 count, F32 period) : LLEventTimer(period) , mCallback(cb) , mCurrentTickCount(0) + , mIsFlashing(false) { mEventTimer.stop(); @@ -49,8 +51,11 @@ LLFlashTimer::LLFlashTimer(callback_t cb, S32 count, F32 period) BOOL LLFlashTimer::tick() { - bool blink = !(mCurrentTickCount % 2); - mCallback(blink); + mIsHighlight = !(mCurrentTickCount % 2); + if (mCallback) + { + mCallback(mIsHighlight); + } if (++mCurrentTickCount >= mFlashCount) { @@ -63,10 +68,15 @@ BOOL LLFlashTimer::tick() void LLFlashTimer::startFlashing() { mCurrentTickCount = 0; + mIsFlashing = true; mEventTimer.start(); } void LLFlashTimer::stopFlashing() { + mIsFlashing = false; + mIsHighlight = false; mEventTimer.stop(); } + + |