diff options
author | Mike Antipov <mantipov@productengine.com> | 2009-12-15 15:40:13 +0200 |
---|---|---|
committer | Mike Antipov <mantipov@productengine.com> | 2009-12-15 15:40:13 +0200 |
commit | 40a10565ac02b5e0b8b34969f92c3e9b5c6b497c (patch) | |
tree | 6899cd6bd1a2ca161be43e2494e46adcca4d3369 /indra/newview | |
parent | c77266e21688695578890225192408b1bdb00252 (diff) |
Work on task EXT-3147 (Implement new states for message indicators)
-- Code recactored for future implementation of "Opening either Message Well will clear the "new messages" state (and thus the "lit" status)"
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llchiclet.cpp | 25 | ||||
-rw-r--r-- | indra/newview/llchiclet.h | 2 |
2 files changed, 17 insertions, 10 deletions
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 960d9e02b2..b27634e105 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -169,15 +169,7 @@ void LLSysWellChiclet::setCounter(S32 counter) mButton->setLabel(s_count); - /* - Emulate 4 states of button by background images, see detains in EXT-3147 - xml attribute Description - image_unselected "Unlit" - there are no new messages - image_selected "Unlit" + "Selected" - there are no new messages and the Well is open - image_pressed "Lit" - there are new messages - image_pressed_selected "Lit" + "Selected" - there are new messages and the Well is open - */ - mButton->setForcePressedState(counter > 0); + setNewMessagesState(counter > 0); // we have to flash to 'Lit' state each time new unread message is comming. if (counter > mCounter) @@ -208,11 +200,24 @@ void LLSysWellChiclet::changeLitState() { static bool set_lit = false; - mButton->setForcePressedState(set_lit); + setNewMessagesState(set_lit); set_lit ^= true; } +void LLSysWellChiclet::setNewMessagesState(bool new_messages) +{ + /* + Emulate 4 states of button by background images, see detains in EXT-3147 + xml attribute Description + image_unselected "Unlit" - there are no new messages + image_selected "Unlit" + "Selected" - there are no new messages and the Well is open + image_pressed "Lit" - there are new messages + image_pressed_selected "Lit" + "Selected" - there are new messages and the Well is open + */ + mButton->setForcePressedState(new_messages); +} + /************************************************************************/ /* LLIMWellChiclet implementation */ /************************************************************************/ diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 65abcd1f5f..6228f87252 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -804,6 +804,8 @@ protected: */ void changeLitState(); + void setNewMessagesState(bool new_messages); + protected: class FlashToLitTimer; LLButton* mButton; |