diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llnotify.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/linden/indra/newview/llnotify.cpp b/linden/indra/newview/llnotify.cpp index 0bd039a..19695e8 100644 --- a/linden/indra/newview/llnotify.cpp +++ b/linden/indra/newview/llnotify.cpp | |||
@@ -334,13 +334,14 @@ LLNotifyBox::LLNotifyBox(LLPointer<LLNotifyBoxTemplate> xml_template, const LLSt | |||
334 | { | 334 | { |
335 | LLButton* btn; | 335 | LLButton* btn; |
336 | btn = new LLButton("next", | 336 | btn = new LLButton("next", |
337 | LLRect(getRect().getWidth()-18, BOTTOM_PAD+16, getRect().getWidth()-2, BOTTOM_PAD+2), | 337 | LLRect(getRect().getWidth()-26, BOTTOM_PAD + 20, getRect().getWidth()-2, BOTTOM_PAD), |
338 | "notify_next.tga", | 338 | "notify_next.png", |
339 | "notify_next.tga", | 339 | "notify_next.png", |
340 | "", | 340 | "", |
341 | onClickNext, | 341 | onClickNext, |
342 | this, | 342 | this, |
343 | sFont); | 343 | sFont); |
344 | btn->setScaleImage(TRUE); | ||
344 | btn->setToolTip(LLString("Next")); // *TODO: Translate | 345 | btn->setToolTip(LLString("Next")); // *TODO: Translate |
345 | addChild(btn); | 346 | addChild(btn); |
346 | mNextBtn = btn; | 347 | mNextBtn = btn; |
@@ -445,7 +446,7 @@ BOOL LLNotifyBox::handleMouseUp(S32 x, S32 y, MASK mask) | |||
445 | // virtual | 446 | // virtual |
446 | BOOL LLNotifyBox::handleRightMouseDown(S32 x, S32 y, MASK mask) | 447 | BOOL LLNotifyBox::handleRightMouseDown(S32 x, S32 y, MASK mask) |
447 | { | 448 | { |
448 | if (!mIsTip && getVisible() && getEnabled() && pointInView(x,y)) | 449 | if (!mIsTip) |
449 | { | 450 | { |
450 | moveToBack(true); | 451 | moveToBack(true); |
451 | return TRUE; | 452 | return TRUE; |
@@ -505,12 +506,10 @@ void LLNotifyBox::draw() | |||
505 | 506 | ||
506 | void LLNotifyBox::drawBackground() const | 507 | void LLNotifyBox::drawBackground() const |
507 | { | 508 | { |
508 | LLUUID image_id; | 509 | LLUIImagePtr imagep = LLUI::getUIImage("rounded_square.tga"); |
509 | image_id.set(gViewerArt.getString("rounded_square.tga")); | ||
510 | LLViewerImage* imagep = gImageList.getImage(image_id, MIPMAP_FALSE, TRUE); | ||
511 | if (imagep) | 510 | if (imagep) |
512 | { | 511 | { |
513 | LLViewerImage::bindTexture(imagep); | 512 | LLViewerImage::bindTexture(imagep->getImage()); |
514 | // set proper background color depending on whether notify box is a caution or not | 513 | // set proper background color depending on whether notify box is a caution or not |
515 | LLColor4 color = mIsCaution? gColors.getColor("NotifyCautionBoxColor") : gColors.getColor("NotifyBoxColor"); | 514 | LLColor4 color = mIsCaution? gColors.getColor("NotifyCautionBoxColor") : gColors.getColor("NotifyBoxColor"); |
516 | if(gFocusMgr.childHasKeyboardFocus( this )) | 515 | if(gFocusMgr.childHasKeyboardFocus( this )) |
@@ -520,11 +519,11 @@ void LLNotifyBox::drawBackground() const | |||
520 | gGL.color4fv(color.mV); | 519 | gGL.color4fv(color.mV); |
521 | gl_segmented_rect_2d_tex(-focus_width, getRect().getHeight() + focus_width, | 520 | gl_segmented_rect_2d_tex(-focus_width, getRect().getHeight() + focus_width, |
522 | getRect().getWidth() + focus_width, -focus_width, | 521 | getRect().getWidth() + focus_width, -focus_width, |
523 | imagep->getWidth(), imagep->getHeight(), | 522 | imagep->getTextureWidth(), imagep->getTextureHeight(), |
524 | 16, mIsTip ? ROUNDED_RECT_TOP : ROUNDED_RECT_BOTTOM); | 523 | 16, mIsTip ? ROUNDED_RECT_TOP : ROUNDED_RECT_BOTTOM); |
525 | color = gColors.getColor("ColorDropShadow"); | 524 | color = gColors.getColor("ColorDropShadow"); |
526 | gGL.color4fv(color.mV); | 525 | gGL.color4fv(color.mV); |
527 | gl_segmented_rect_2d_tex(0, getRect().getHeight(), getRect().getWidth(), 0, imagep->getWidth(), imagep->getHeight(), 16, mIsTip ? ROUNDED_RECT_TOP : ROUNDED_RECT_BOTTOM); | 526 | gl_segmented_rect_2d_tex(0, getRect().getHeight(), getRect().getWidth(), 0, imagep->getTextureWidth(), imagep->getTextureHeight(), 16, mIsTip ? ROUNDED_RECT_TOP : ROUNDED_RECT_BOTTOM); |
528 | 527 | ||
529 | if( mIsCaution ) | 528 | if( mIsCaution ) |
530 | color = gColors.getColor("NotifyCautionBoxColor"); | 529 | color = gColors.getColor("NotifyCautionBoxColor"); |
@@ -532,12 +531,12 @@ void LLNotifyBox::drawBackground() const | |||
532 | color = gColors.getColor("NotifyBoxColor"); | 531 | color = gColors.getColor("NotifyBoxColor"); |
533 | 532 | ||
534 | gGL.color4fv(color.mV); | 533 | gGL.color4fv(color.mV); |
535 | gl_segmented_rect_2d_tex(1, getRect().getHeight()-1, getRect().getWidth()-1, 1, imagep->getWidth(), imagep->getHeight(), 16, mIsTip ? ROUNDED_RECT_TOP : ROUNDED_RECT_BOTTOM); | 534 | gl_segmented_rect_2d_tex(1, getRect().getHeight()-1, getRect().getWidth()-1, 1, imagep->getTextureWidth(), imagep->getTextureHeight(), 16, mIsTip ? ROUNDED_RECT_TOP : ROUNDED_RECT_BOTTOM); |
536 | } | 535 | } |
537 | else | 536 | else |
538 | { | 537 | { |
539 | gGL.color4fv(color.mV); | 538 | gGL.color4fv(color.mV); |
540 | gl_segmented_rect_2d_tex(0, getRect().getHeight(), getRect().getWidth(), 0, imagep->getWidth(), imagep->getHeight(), 16, mIsTip ? ROUNDED_RECT_TOP : ROUNDED_RECT_BOTTOM); | 539 | gl_segmented_rect_2d_tex(0, getRect().getHeight(), getRect().getWidth(), 0, imagep->getTextureWidth(), imagep->getTextureHeight(), 16, mIsTip ? ROUNDED_RECT_TOP : ROUNDED_RECT_BOTTOM); |
541 | } | 540 | } |
542 | } | 541 | } |
543 | } | 542 | } |