summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolpie.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-03-29 16:55:22 -0700
committerJames Cook <james@lindenlab.com>2010-03-29 16:55:22 -0700
commitecc2c726502448076295254714c0bfa8c0074f25 (patch)
tree6a9434c540f7b5ea7bca326df1a420e4a0a99cc4 /indra/newview/lltoolpie.cpp
parentd2f9e34598621f1dabad15025417efd6b81dddf0 (diff)
parentac103403160e87bb6b40ac3e032d077a3381da8e (diff)
Merge latest viewer-hotfix, approximately equal to Viewer 2.0 final
Diffstat (limited to 'indra/newview/lltoolpie.cpp')
-rw-r--r--indra/newview/lltoolpie.cpp27
1 files changed, 20 insertions, 7 deletions
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index e345784f71..4bf0e18123 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -413,24 +413,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:
@@ -918,6 +918,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"));
@@ -948,7 +958,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)
@@ -972,10 +982,13 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l
}
}
- // Avoid showing tip over media that's displaying
+
+ // 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 &&
+
+ bool needs_tip = (!is_media_displaying ||
+ for_sale) &&
(has_media ||
needs_tooltip(nodep) ||
needs_tooltip(LLSelectMgr::getInstance()->getPrimaryHoverNode()));