diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-10-09 00:42:36 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-10-09 00:42:36 +0000 |
commit | 81e0fb43caa27491fa18b17d6a05cafb0e20dfa6 (patch) | |
tree | aea6b59f47a56255ab01c0b814650b943170847e /indra/newview/llnearbychathandler.cpp | |
parent | 4c89e7389383e2943334ad8ec185b8935cbe7db8 (diff) |
merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1943 https://svn.aws.productengine.com/secondlife/pe/stable-2@1958 -> viewer-2.0.0-3
* Bugs: EXT-1148 EXT-1330 EXT-990 EXT-1259 EXT-1184 EXT-1327 EXT-1389 EXT-1276 EXT-1390 EXT-1396 EXT-1050 EXT-1094 EXT-1166 EXT-1137 EXT-1327 EXT-782 EXT-1137 EXT-1394 EXT-1326 EXT-917 EXT-1262
* New Dev: EXT-1292 EXT-1139
Diffstat (limited to 'indra/newview/llnearbychathandler.cpp')
-rw-r--r-- | indra/newview/llnearbychathandler.cpp | 42 |
1 files changed, 30 insertions, 12 deletions
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index eb42e83994..3c5e588128 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -75,6 +75,13 @@ public: void onToastDestroyed (LLToast* toast); void onToastFade (LLToast* toast); + void reshape (S32 width, S32 height, BOOL called_from_parent); + + void redrawToasts() + { + arrangeToasts(); + } + // hide all toasts from screen, but not remove them from a channel virtual void hideToastsFromScreen() { @@ -204,35 +211,46 @@ void LLNearbyChatScreenChannel::arrangeToasts() void LLNearbyChatScreenChannel::showToastsBottom() { - LLRect rect = getRect(); - LLRect toast_rect; S32 bottom = getRect().mBottom; + S32 margin = gSavedSettings.getS32("ToastMargin"); for(std::vector<LLToast*>::iterator it = m_active_toasts.begin(); it != m_active_toasts.end(); ++it) { LLToast* toast = (*it); - toast_rect = toast->getRect(); - toast_rect.setLeftTopAndSize(getRect().mLeft, bottom + toast_rect.getHeight()+gSavedSettings.getS32("ToastMargin"), toast_rect.getWidth() ,toast_rect.getHeight()); - - toast->setRect(toast_rect); + S32 toast_top = bottom + toast->getRect().getHeight() + margin; - if(toast->getRect().mTop > getRect().getHeight()) + if(toast_top > gFloaterView->getRect().getHeight()) { while(it!=m_active_toasts.end()) { - (*it)->setVisible(FALSE); - (*it)->stopTimer(); - m_toast_pool.push_back(*it); + toast->setVisible(FALSE); + toast->stopTimer(); + m_toast_pool.push_back(toast); it=m_active_toasts.erase(it); } break; } - toast->setVisible(TRUE); - bottom = toast->getRect().mTop; + else + { + toast_rect = toast->getRect(); + toast_rect.setLeftTopAndSize(getRect().mLeft , toast_top, toast_rect.getWidth() ,toast_rect.getHeight()); + + toast->setRect(toast_rect); + + toast->setVisible(TRUE); + toast->stopTimer(); + bottom = toast->getRect().mTop; + } } } +void LLNearbyChatScreenChannel::reshape (S32 width, S32 height, BOOL called_from_parent) +{ + LLScreenChannelBase::reshape(width, height, called_from_parent); + arrangeToasts(); +} + //----------------------------------------------------------------------------------------------- //LLNearbyChatHandler |