diff options
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llflashtimer.cpp | 19 | ||||
-rw-r--r-- | indra/llui/llflashtimer.h | 4 |
2 files changed, 17 insertions, 6 deletions
diff --git a/indra/llui/llflashtimer.cpp b/indra/llui/llflashtimer.cpp index 2ad86b5751..de7a4ab265 100644 --- a/indra/llui/llflashtimer.cpp +++ b/indra/llui/llflashtimer.cpp @@ -34,6 +34,7 @@ LLFlashTimer::LLFlashTimer(callback_t cb, S32 count, F32 period) , mCallback(cb) , mCurrentTickCount(0) , mIsFlashingInProgress(false) + , mIsCurrentlyHighlighted(false) { mEventTimer.stop(); @@ -58,9 +59,7 @@ BOOL LLFlashTimer::tick() if (++mCurrentTickCount >= mFlashCount) { - mEventTimer.stop(); - mCurrentTickCount = 0; - mIsFlashingInProgress = false; + stopFlashing(); } return FALSE; @@ -69,14 +68,26 @@ BOOL LLFlashTimer::tick() void LLFlashTimer::startFlashing() { mIsFlashingInProgress = true; + mIsCurrentlyHighlighted = true; mEventTimer.start(); } void LLFlashTimer::stopFlashing() { + mEventTimer.stop(); mIsFlashingInProgress = false; mIsCurrentlyHighlighted = false; - mEventTimer.stop(); + mCurrentTickCount = 0; +} + +bool LLFlashTimer::isFlashingInProgress() +{ + return mIsFlashingInProgress; +} + +bool LLFlashTimer::isCurrentlyHighlighted() +{ + return mIsCurrentlyHighlighted; } diff --git a/indra/llui/llflashtimer.h b/indra/llui/llflashtimer.h index 538ee0fcca..5c8860b097 100644 --- a/indra/llui/llflashtimer.h +++ b/indra/llui/llflashtimer.h @@ -50,8 +50,8 @@ public: void startFlashing(); void stopFlashing(); - bool isFlashingInProgress() {return mIsFlashingInProgress;} - bool isCurrentlyHighlighted() {return mIsCurrentlyHighlighted;} + bool isFlashingInProgress(); + bool isCurrentlyHighlighted(); private: callback_t mCallback; |