From dcf279d663e701700cd1227825f3cff39554f82a Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 5 Mar 2010 18:34:36 -0800 Subject: EXT-2418 added open/sit/buy mouse cursors --- indra/newview/lltoolpie.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/lltoolpie.cpp') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index fb78b6a415..51a31f0725 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -412,24 +412,24 @@ ECursorType cursor_from_object(LLViewerObject* object) case CLICK_ACTION_SIT: if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->isSitting())) // not already sitting? { - cursor = UI_CURSOR_HAND; + cursor = UI_CURSOR_TOOLSIT; } break; case CLICK_ACTION_BUY: - cursor = UI_CURSOR_HAND; + cursor = UI_CURSOR_TOOLBUY; break; case CLICK_ACTION_OPEN: // Open always opens the parent. if (parent && parent->allowOpen()) { - cursor = UI_CURSOR_HAND; + cursor = UI_CURSOR_TOOLOPEN; } break; case CLICK_ACTION_PAY: if ((object && object->flagTakesMoney()) || (parent && parent->flagTakesMoney())) { - cursor = UI_CURSOR_HAND; + cursor = UI_CURSOR_TOOLBUY; } break; case CLICK_ACTION_ZOOM: -- cgit v1.2.3 From 1788f26b4c8fc91836feba298fd0d38564411341 Mon Sep 17 00:00:00 2001 From: angela Date: Mon, 8 Mar 2010 16:17:47 +0800 Subject: EXT-2418 Object hover tips no longer show price, description or owner --- indra/newview/lltoolpie.cpp | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'indra/newview/lltoolpie.cpp') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index fb78b6a415..94e43b1e0e 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -931,7 +931,7 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l if (media_impl.notNull() && (media_impl->hasMedia())) { is_media_displaying = true; - LLStringUtil::format_map_t args; + //LLStringUtil::format_map_t args; media_plugin = media_impl->getMediaPlugin(); if(media_plugin) @@ -955,13 +955,24 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l } } - // Avoid showing tip over media that's displaying + // Add price to tooltip for items on sale + bool for_sale = for_sale_selection(nodep); + if(for_sale) + { + LLStringUtil::format_map_t args; + args["[PRICE]"] = llformat ("%d", nodep->mSaleInfo.getSalePrice()); + tooltip_msg.append(LLTrans::getString("TooltipPrice", args) ); + } + + // Avoid showing tip over media that's displaying unless it's for sale // also check the primary node since sometimes it can have an action even though // the root node doesn't - bool needs_tip = !is_media_displaying && - (has_media || - needs_tooltip(nodep) || - needs_tooltip(LLSelectMgr::getInstance()->getPrimaryHoverNode())); + + bool needs_tip = (!is_media_displaying || + for_sale) && + (has_media || + needs_tooltip(nodep) || + needs_tooltip(LLSelectMgr::getInstance()->getPrimaryHoverNode())); if (show_all_object_tips || needs_tip) { -- cgit v1.2.3 From 032762fecffb913fd6178965befec62d6b5171e7 Mon Sep 17 00:00:00 2001 From: angela Date: Tue, 9 Mar 2010 10:04:36 +0800 Subject: EXT-2418 add price to object tooltip --- indra/newview/lltoolpie.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'indra/newview/lltoolpie.cpp') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 94e43b1e0e..2f4a69a53c 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -901,6 +901,16 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l || !existing_inspector->getVisible() || existing_inspector->getKey()["object_id"].asUUID() != hover_object->getID())) { + + // Add price to tooltip for items on sale + bool for_sale = for_sale_selection(nodep); + if(for_sale) + { + LLStringUtil::format_map_t args; + args["[PRICE]"] = llformat ("%d", nodep->mSaleInfo.getSalePrice()); + tooltip_msg.append(LLTrans::getString("TooltipPrice", args) ); + } + if (nodep->mName.empty()) { tooltip_msg.append(LLTrans::getString("TooltipNoName")); @@ -954,15 +964,7 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l } } } - - // Add price to tooltip for items on sale - bool for_sale = for_sale_selection(nodep); - if(for_sale) - { - LLStringUtil::format_map_t args; - args["[PRICE]"] = llformat ("%d", nodep->mSaleInfo.getSalePrice()); - tooltip_msg.append(LLTrans::getString("TooltipPrice", args) ); - } + // Avoid showing tip over media that's displaying unless it's for sale // also check the primary node since sometimes it can have an action even though -- cgit v1.2.3