From b815dc9aa4dc60bf405c10e426579950570d5436 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 10 Mar 2011 20:20:17 -0800 Subject: SOCIAL-530 WIP When double clicking a nearby location I want my avatar to walk to that spot Initial mouse-based steering and single click to walk --- indra/newview/lltoolpie.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'indra/newview/lltoolpie.h') diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h index 77200a1da4..c46fdd6799 100644 --- a/indra/newview/lltoolpie.h +++ b/indra/newview/lltoolpie.h @@ -75,8 +75,8 @@ public: private: BOOL outsideSlop (S32 x, S32 y, S32 start_x, S32 start_y); - BOOL pickLeftMouseDownCallback(); - BOOL pickRightMouseDownCallback(); + BOOL handleLeftClickPick(); + BOOL handleRightClickPick(); BOOL useClickAction (MASK mask, LLViewerObject* object,LLViewerObject* parent); void showVisualContextMenuEffect(); @@ -88,12 +88,21 @@ private: BOOL handleTooltipLand(std::string line, std::string tooltip_msg); BOOL handleTooltipObject( LLViewerObject* hover_object, std::string line, std::string tooltip_msg); + void steerCameraWithMouse(S32 x, S32 y); + void startCameraSteering(); + private: - BOOL mGrabMouseButtonDown; + BOOL mMouseButtonDown; BOOL mMouseOutsideSlop; // for this drag, has mouse moved outside slop region + S32 mMouseDownX; + S32 mMouseDownY; + S32 mMouseSteerX; + S32 mMouseSteerY; + F32 mLastYaw; LLUUID mMediaMouseCaptureID; LLPickInfo mPick; LLPickInfo mHoverPick; + LLPickInfo mDragPick; LLPointer mClickActionObject; U8 mClickAction; LLSafeHandle mLeftClickSelection; -- cgit v1.2.3 From 1c5d2516e0d926c8bd0bc2faad0f8ccaa2725339 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 11 Mar 2011 00:21:22 -0800 Subject: SOCIAL-530 WIP When double clicking a nearby location I want my avatar to walk to that spot can drag objects in front of avatar in opposite direction now reliably release mouse capture min rotation radius is now scaled by camera distance from rotation center --- indra/newview/lltoolpie.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/lltoolpie.h') diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h index c46fdd6799..26dcbd35e6 100644 --- a/indra/newview/lltoolpie.h +++ b/indra/newview/lltoolpie.h @@ -92,13 +92,13 @@ private: void startCameraSteering(); private: - BOOL mMouseButtonDown; - BOOL mMouseOutsideSlop; // for this drag, has mouse moved outside slop region + bool mMouseButtonDown; + bool mMouseOutsideSlop; // for this drag, has mouse moved outside slop region S32 mMouseDownX; S32 mMouseDownY; S32 mMouseSteerX; S32 mMouseSteerY; - F32 mLastYaw; + bool mClockwise; LLUUID mMediaMouseCaptureID; LLPickInfo mPick; LLPickInfo mHoverPick; -- cgit v1.2.3 From 184c454222ff509629de8abc49a72122c75f0487 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 11 Mar 2011 20:44:57 -0800 Subject: visual feedback for click to walk --- indra/newview/lltoolpie.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/lltoolpie.h') diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h index 26dcbd35e6..1ac1c35bcc 100644 --- a/indra/newview/lltoolpie.h +++ b/indra/newview/lltoolpie.h @@ -33,6 +33,7 @@ class LLViewerObject; class LLObjectSelection; +class LLHUDEffectBlob; class LLToolPie : public LLTool, public LLSingleton { @@ -90,6 +91,8 @@ private: void steerCameraWithMouse(S32 x, S32 y); void startCameraSteering(); + void stopCameraSteering(); + bool inCameraSteerMode(); private: bool mMouseButtonDown; @@ -98,6 +101,8 @@ private: S32 mMouseDownY; S32 mMouseSteerX; S32 mMouseSteerY; + LLHUDEffectBlob* mAutoPilotDestination; + LLHUDEffectBlob* mMouseSteerGrabPoint; bool mClockwise; LLUUID mMediaMouseCaptureID; LLPickInfo mPick; -- cgit v1.2.3 From 5038c068eac20425c702fd1dff06ccdacdec9e6f Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 14 Mar 2011 12:39:50 -0700 Subject: SOCIAL-695 FIX clicking on world to give it focus will make your avatar walk --- indra/newview/lltoolpie.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/lltoolpie.h') diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h index 1ac1c35bcc..dca661d26d 100644 --- a/indra/newview/lltoolpie.h +++ b/indra/newview/lltoolpie.h @@ -103,7 +103,8 @@ private: S32 mMouseSteerY; LLHUDEffectBlob* mAutoPilotDestination; LLHUDEffectBlob* mMouseSteerGrabPoint; - bool mClockwise; + bool mClockwise; + bool mAbortClickToWalk; LLUUID mMediaMouseCaptureID; LLPickInfo mPick; LLPickInfo mHoverPick; -- cgit v1.2.3 From c650b9cf8202ffc63d58bbcbf05f7eddf9ae6c3c Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 14 Mar 2011 13:18:15 -0700 Subject: clicking on sky or on own avatar to steer now works --- indra/newview/lltoolpie.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lltoolpie.h') diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h index dca661d26d..01e74a20d7 100644 --- a/indra/newview/lltoolpie.h +++ b/indra/newview/lltoolpie.h @@ -108,7 +108,7 @@ private: LLUUID mMediaMouseCaptureID; LLPickInfo mPick; LLPickInfo mHoverPick; - LLPickInfo mDragPick; + LLPickInfo mSteerPick; LLPointer mClickActionObject; U8 mClickAction; LLSafeHandle mLeftClickSelection; -- cgit v1.2.3 From 0e10a83b6bc11d0a40f09e6ba59b30c0e1e343bd Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 14 Mar 2011 16:46:10 -0700 Subject: SOCIAL-695 FIX Selecting UI and then clicking on world to give focus back to viewer moves you to that location made this work when clicking on SL with another app in foreground visual feedback of ClickToWalk behavior --- indra/newview/lltoolpie.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview/lltoolpie.h') diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h index 01e74a20d7..c324b50c65 100644 --- a/indra/newview/lltoolpie.h +++ b/indra/newview/lltoolpie.h @@ -57,6 +57,7 @@ public: virtual void stopEditing(); virtual void onMouseCaptureLost(); + virtual void handleSelect(); virtual void handleDeselect(); virtual LLTool* getOverrideTool(MASK mask); @@ -101,8 +102,8 @@ private: S32 mMouseDownY; S32 mMouseSteerX; S32 mMouseSteerY; - LLHUDEffectBlob* mAutoPilotDestination; - LLHUDEffectBlob* mMouseSteerGrabPoint; + LLPointer mAutoPilotDestination; + LLPointer mMouseSteerGrabPoint; bool mClockwise; bool mAbortClickToWalk; LLUUID mMediaMouseCaptureID; -- cgit v1.2.3 From 2c22863888eefbfb0f4245011be989d155583db7 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 15 Mar 2011 09:54:17 -0700 Subject: another attempt at fixing gcc --- indra/newview/lltoolpie.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lltoolpie.h') diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h index c324b50c65..22e77a3159 100644 --- a/indra/newview/lltoolpie.h +++ b/indra/newview/lltoolpie.h @@ -30,10 +30,10 @@ #include "lltool.h" #include "lluuid.h" #include "llviewerwindow.h" // for LLPickInfo +#include "llhudeffectblob.h" // for LLPointer, apparently class LLViewerObject; class LLObjectSelection; -class LLHUDEffectBlob; class LLToolPie : public LLTool, public LLSingleton { -- cgit v1.2.3