diff options
author | Jacek Antonelli | 2008-08-15 23:45:04 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:04 -0500 |
commit | 117e22047c5752352342d64e3fb7ce00a4eb8113 (patch) | |
tree | e32de2cfba0dda8705ae528fcd1fbe23ba075685 /linden/indra/llui/lltabcontainervertical.cpp | |
parent | Second Life viewer sources 1.18.0.6 (diff) | |
download | meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.zip meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.gz meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.bz2 meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.xz |
Second Life viewer sources 1.18.1.2
Diffstat (limited to 'linden/indra/llui/lltabcontainervertical.cpp')
-rw-r--r-- | linden/indra/llui/lltabcontainervertical.cpp | 74 |
1 files changed, 36 insertions, 38 deletions
diff --git a/linden/indra/llui/lltabcontainervertical.cpp b/linden/indra/llui/lltabcontainervertical.cpp index 317b7ca..e2d84a5 100644 --- a/linden/indra/llui/lltabcontainervertical.cpp +++ b/linden/indra/llui/lltabcontainervertical.cpp | |||
@@ -392,49 +392,47 @@ void LLTabContainerVertical::draw() | |||
392 | } | 392 | } |
393 | 393 | ||
394 | // Draw some of the buttons... | 394 | // Draw some of the buttons... |
395 | |||
396 | LLGLEnable scissor_test(has_scroll_arrows ? GL_SCISSOR_TEST : GL_FALSE); | ||
397 | |||
398 | if( has_scroll_arrows ) | ||
399 | { | ||
400 | // ...but clip them. | ||
401 | S32 x1 = mRect.mLeft; | ||
402 | S32 y1 = mDownArrowBtn->getRect().mTop + 3*TABCNTRV_PAD; | ||
403 | S32 x2 = mRect.mRight; | ||
404 | S32 y2 = mUpArrowBtn->getRect().mBottom - 3*TABCNTRV_PAD; | ||
405 | LLUI::setScissorRegionLocal(LLRect(x1, y2, x2, y1)); | ||
406 | } | ||
407 | |||
408 | //S32 max_scroll_visible = mTabList.size() - mMaxScrollPos + mScrollPos; | ||
409 | S32 idx = 0; | ||
410 | for(std::vector<LLTabTuple*>::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) | ||
411 | { | 395 | { |
412 | LLTabTuple* tuple = *iter; | 396 | LLRect clip_rect = getLocalRect(); |
413 | tuple->mButton->translate( 0 , top - tuple->mButton->getRect().mTop); | 397 | if (has_scroll_arrows) |
414 | top -= BTN_HEIGHT + TABCNTRV_PAD; | ||
415 | |||
416 | LLUI::pushMatrix(); | ||
417 | { | 398 | { |
418 | LLUI::translate((F32)tuple->mButton->getRect().mLeft, (F32)tuple->mButton->getRect().mBottom, 0.f); | 399 | // ...but clip them. |
419 | tuple->mButton->draw(); | 400 | clip_rect.mBottom = mDownArrowBtn->getRect().mTop + 3*TABCNTRV_PAD; |
401 | clip_rect.mTop = mUpArrowBtn->getRect().mBottom - 3*TABCNTRV_PAD; | ||
420 | } | 402 | } |
421 | LLUI::popMatrix(); | 403 | LLLocalClipRect clip(clip_rect); |
422 | 404 | ||
423 | idx++; | 405 | //S32 max_scroll_visible = mTabList.size() - mMaxScrollPos + mScrollPos; |
424 | } | 406 | S32 idx = 0; |
407 | for(std::vector<LLTabTuple*>::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) | ||
408 | { | ||
409 | LLTabTuple* tuple = *iter; | ||
410 | tuple->mButton->translate( 0 , top - tuple->mButton->getRect().mTop); | ||
411 | top -= BTN_HEIGHT + TABCNTRV_PAD; | ||
425 | 412 | ||
426 | if( has_scroll_arrows ) | 413 | LLUI::pushMatrix(); |
427 | { | 414 | { |
428 | // Redraw the arrows so that they appears on top. | 415 | LLUI::translate((F32)tuple->mButton->getRect().mLeft, (F32)tuple->mButton->getRect().mBottom, 0.f); |
429 | glPushMatrix(); | 416 | tuple->mButton->draw(); |
430 | glTranslatef((F32)mUpArrowBtn->getRect().mLeft, (F32)mUpArrowBtn->getRect().mBottom, 0.f); | 417 | } |
431 | mUpArrowBtn->draw(); | 418 | LLUI::popMatrix(); |
432 | glPopMatrix(); | 419 | |
433 | 420 | idx++; | |
434 | glPushMatrix(); | 421 | } |
435 | glTranslatef((F32)mDownArrowBtn->getRect().mLeft, (F32)mDownArrowBtn->getRect().mBottom, 0.f); | 422 | |
436 | mDownArrowBtn->draw(); | 423 | if( has_scroll_arrows ) |
437 | glPopMatrix(); | 424 | { |
425 | // Redraw the arrows so that they appears on top. | ||
426 | glPushMatrix(); | ||
427 | glTranslatef((F32)mUpArrowBtn->getRect().mLeft, (F32)mUpArrowBtn->getRect().mBottom, 0.f); | ||
428 | mUpArrowBtn->draw(); | ||
429 | glPopMatrix(); | ||
430 | |||
431 | glPushMatrix(); | ||
432 | glTranslatef((F32)mDownArrowBtn->getRect().mLeft, (F32)mDownArrowBtn->getRect().mBottom, 0.f); | ||
433 | mDownArrowBtn->draw(); | ||
434 | glPopMatrix(); | ||
435 | } | ||
438 | } | 436 | } |
439 | } | 437 | } |
440 | } | 438 | } |