From d181b84dfdce83d1999d086c3eda2cdc51849a11 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Tue, 10 Nov 2009 17:10:47 -0800 Subject: EXT-1478 Tool-tip background and border colors are being ignored EXT-2082 Multifloater preview tab container extends outside window border EXT-773 odd notecard behaviour on closing an unsaved notcard reviewed by Richard --- indra/newview/lltoolpie.cpp | 46 ++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) (limited to 'indra/newview/lltoolpie.cpp') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 93da32b115..d49ea5109d 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -700,13 +700,17 @@ BOOL LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask) // *HACK: We may select this object, so pretend it was clicked mPick = mHoverPick; - LLToolTipMgr::instance().show(LLToolTip::Params() - .message(avatar_name) - .image(LLUI::getUIImage("Info")) - .click_callback(boost::bind(showAvatarInspector, hover_object->getID())) - .visible_time_near(6.f) - .visible_time_far(3.f) - .wrap(false)); + LLInspector::Params p; + p.message(avatar_name); + p.image(LLUI::getUIImage("Info")); + p.click_callback(boost::bind(showAvatarInspector, hover_object->getID())); + p.visible_time_near(6.f); + p.visible_time_far(3.f); + p.wrap(false); + + p.fillFrom(LLUICtrlFactory::instance().getDefaultParams()); + + LLToolTipMgr::instance().show(p); } } else @@ -787,18 +791,22 @@ BOOL LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask) { // We may select this object, so pretend it was clicked mPick = mHoverPick; - LLToolTipMgr::instance().show(LLToolTip::Params() - .message(tooltip_msg) - .image(LLUI::getUIImage("Info_Off")) - .click_callback(boost::bind(showObjectInspector, hover_object->getID(), mHoverPick.mObjectFace)) - .time_based_media(is_time_based_media) - .web_based_media(is_web_based_media) - .media_playing(is_media_playing) - .click_playmedia_callback(boost::bind(playCurrentMedia, mHoverPick)) - .click_homepage_callback(boost::bind(VisitHomePage, mHoverPick)) - .visible_time_near(6.f) - .visible_time_far(3.f) - .wrap(false)); + LLInspector::Params p; + p.message(tooltip_msg); + p.image(LLUI::getUIImage("Info_Off")); + p.click_callback(boost::bind(showObjectInspector, hover_object->getID(), mHoverPick.mObjectFace)); + p.time_based_media(is_time_based_media); + p.web_based_media(is_web_based_media); + p.media_playing(is_media_playing); + p.click_playmedia_callback(boost::bind(playCurrentMedia, mHoverPick)); + p.click_homepage_callback(boost::bind(VisitHomePage, mHoverPick)); + p.visible_time_near(6.f); + p.visible_time_far(3.f); + p.wrap(false); + + p.fillFrom(LLUICtrlFactory::instance().getDefaultParams()); + + LLToolTipMgr::instance().show(p); } } } -- cgit v1.2.3 From e3236a906d01e95432990aa436121b19cf994301 Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 16 Nov 2009 13:47:54 -0800 Subject: EXT-2512 Turned off Hover Glow Objects by default. Should resolve EXT-2499 EXT-2522 EXT-2514 Consider turning back on for Viewer 2.1 and tuning. --- indra/newview/lltoolpie.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lltoolpie.cpp') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index d49ea5109d..9c8fca3552 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -526,7 +526,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask) } static LLCachedControl enable_highlight( - gSavedSettings, "RenderHighlightEnable", false); + gSavedSettings, "RenderHoverGlowEnable", false); LLDrawable* drawable = NULL; if (enable_highlight && show_highlight && object) { -- cgit v1.2.3 From a35fbddb910fa0dd068622c3dc64af1b27ca19b7 Mon Sep 17 00:00:00 2001 From: angela Date: Wed, 18 Nov 2009 20:52:53 +0800 Subject: EXT-2094 --- indra/newview/lltoolpie.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra/newview/lltoolpie.cpp') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 9c8fca3552..d0350507ed 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -209,6 +209,7 @@ BOOL LLToolPie::pickLeftMouseDownCallback() // touch behavior down below... break; case CLICK_ACTION_SIT: + if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->isSitting())) // agent not already sitting { handle_object_sit_or_stand(); @@ -253,6 +254,11 @@ BOOL LLToolPie::pickLeftMouseDownCallback() } } return TRUE; + case CLICK_ACTION_ZOOM: + gAgent.setFocusOnAvatar(FALSE, FALSE); + gAgent.setFocusGlobal(mPick); + gAgent.setCameraZoomFraction(0.9); + return TRUE; case CLICK_ACTION_PLAY: handle_click_action_play(); return TRUE; @@ -413,6 +419,9 @@ ECursorType cursor_from_object(LLViewerObject* object) cursor = UI_CURSOR_HAND; } break; + case CLICK_ACTION_ZOOM: + cursor = UI_CURSOR_TOOLZOOMIN; + break; case CLICK_ACTION_PLAY: case CLICK_ACTION_OPEN_MEDIA: cursor = cursor_from_parcel_media(click_action); @@ -551,6 +560,9 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask) case CLICK_ACTION_BUY: case CLICK_ACTION_PAY: case CLICK_ACTION_OPEN: + case CLICK_ACTION_ZOOM: + case CLICK_ACTION_PLAY: + case CLICK_ACTION_OPEN_MEDIA: // Because these actions open UI dialogs, we won't change // the cursor again until the next hover and GL pick over // the world. Keep the cursor an arrow, assuming that -- cgit v1.2.3 From b6ad65c04edc6e79637bf8ac9daf40b3654d80a6 Mon Sep 17 00:00:00 2001 From: angela Date: Thu, 19 Nov 2009 15:02:05 +0800 Subject: EXT-2094 Add click-to-zoom as a one-click settable option for objects --- indra/newview/lltoolpie.cpp | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'indra/newview/lltoolpie.cpp') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index d0350507ed..5ed8dc5fb9 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -253,12 +253,7 @@ BOOL LLToolPie::pickLeftMouseDownCallback() selectionPropertiesReceived(); } } - return TRUE; - case CLICK_ACTION_ZOOM: - gAgent.setFocusOnAvatar(FALSE, FALSE); - gAgent.setFocusGlobal(mPick); - gAgent.setCameraZoomFraction(0.9); - return TRUE; + return TRUE; case CLICK_ACTION_PLAY: handle_click_action_play(); return TRUE; @@ -266,6 +261,29 @@ BOOL LLToolPie::pickLeftMouseDownCallback() // mClickActionObject = object; handle_click_action_open_media(object); return TRUE; + case CLICK_ACTION_ZOOM: + { + const F32 PADDING_FACTOR = 2.f; + LLViewerObject* object = gObjectList.findObject(mPick.mObjectID); + + if (object) + { + gAgent.setFocusOnAvatar(FALSE, ANIMATE); + + LLBBox bbox = object->getBoundingBoxAgent() ; + F32 angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getAspect() > 1.f ? LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect() : LLViewerCamera::getInstance()->getView()); + F32 distance = bbox.getExtentLocal().magVec() * PADDING_FACTOR / atan(angle_of_view); + + LLVector3 obj_to_cam = LLViewerCamera::getInstance()->getOrigin() - bbox.getCenterAgent(); + obj_to_cam.normVec(); + + LLVector3d object_center_global = gAgent.getPosGlobalFromAgent(bbox.getCenterAgent()); + gAgent.setCameraPosAndFocusGlobal(object_center_global + LLVector3d(obj_to_cam * distance), + object_center_global, + mPick.mObjectID ); + } + } + return TRUE; default: // nothing break; -- cgit v1.2.3