summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolpie.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lltoolpie.cpp')
-rw-r--r--indra/newview/lltoolpie.cpp33
1 files changed, 20 insertions, 13 deletions
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index a6dcebc3b5..fab336f17d 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -42,12 +42,13 @@
#include "llagent.h"
#include "llviewercontrol.h"
#include "llfirstuse.h"
-#include "llfloateravatarinfo.h"
#include "llfloaterland.h"
+#include "llfloaterreg.h"
#include "llfloaterscriptdebug.h"
#include "llhoverview.h"
#include "llhudeffecttrail.h"
#include "llhudmanager.h"
+#include "llmediamanager.h"
#include "llmenugl.h"
#include "llmutelist.h"
#include "llselectmgr.h"
@@ -100,15 +101,19 @@ void LLToolPie::leftMouseCallback(const LLPickInfo& pick_info)
LLToolPie::getInstance()->pickLeftMouseDownCallback();
}
+// Spawn context menus on right mouse down so you can drag over and select
+// an item.
BOOL LLToolPie::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
+ // don't pick transparent so users can't "pay" transparent objects
+ gViewerWindow->pickAsync(x, y, mask, rightMouseCallback, FALSE, TRUE);
+ // claim not handled so UI focus stays same
return FALSE;
}
BOOL LLToolPie::handleRightMouseUp(S32 x, S32 y, MASK mask)
{
LLToolMgr::getInstance()->clearTransientTool();
- gViewerWindow->pickAsync(x, y, mask, rightMouseCallback, FALSE, TRUE);
return LLTool::handleRightMouseUp(x, y, mask);
}
@@ -116,7 +121,7 @@ BOOL LLToolPie::handleRightMouseUp(S32 x, S32 y, MASK mask)
void LLToolPie::rightMouseCallback(const LLPickInfo& pick_info)
{
LLToolPie::getInstance()->mPick = pick_info;
- LLToolPie::getInstance()->pickRightMouseUpCallback();
+ LLToolPie::getInstance()->pickRightMouseDownCallback();
}
// True if you selected an object.
@@ -141,7 +146,7 @@ BOOL LLToolPie::pickLeftMouseDownCallback()
else
{
// not selling passes, get info
- LLFloaterLand::showInstance();
+ LLFloaterReg::showInstance("about_land");
}
}
@@ -184,7 +189,7 @@ BOOL LLToolPie::pickLeftMouseDownCallback()
// touch behavior down below...
break;
case CLICK_ACTION_SIT:
- if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->mIsSitting)) // agent not already sitting
+ if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->isSitting())) // agent not already sitting
{
handle_sit_or_stand();
return TRUE;
@@ -286,9 +291,11 @@ BOOL LLToolPie::pickLeftMouseDownCallback()
return TRUE;
}
- // Could be first left-click on nothing
- LLFirstUse::useLeftClickNoHit();
-
+ //////////
+ // // Could be first left-click on nothing
+ // LLFirstUse::useLeftClickNoHit();
+ /////////
+
// Eat the event
return LLTool::handleMouseDown(x, y, mask);
}
@@ -354,7 +361,7 @@ ECursorType cursor_from_object(LLViewerObject* object)
switch(click_action)
{
case CLICK_ACTION_SIT:
- if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->mIsSitting)) // not already sitting?
+ if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->isSitting())) // not already sitting?
{
cursor = UI_CURSOR_TOOLSIT;
}
@@ -424,7 +431,7 @@ void LLToolPie::selectionPropertiesReceived()
handle_give_money_dialog();
break;
case CLICK_ACTION_OPEN:
- handle_object_open();
+ LLFloaterReg::showInstance("openobject");
break;
default:
break;
@@ -727,8 +734,8 @@ static ECursorType cursor_from_parcel_media(U8 click_action)
}
-// True if you selected an object.
-BOOL LLToolPie::pickRightMouseUpCallback()
+// True if we handled the event.
+BOOL LLToolPie::pickRightMouseDownCallback()
{
S32 x = mPick.mMousePt.mX;
S32 y = mPick.mMousePt.mY;
@@ -824,7 +831,7 @@ BOOL LLToolPie::pickRightMouseUpCallback()
}
}
- LLTool::handleRightMouseUp(x, y, mask);
+ LLTool::handleRightMouseDown(x, y, mask);
// We handled the event.
return TRUE;
}