From cc22ffc6d799544e8f2a9dfed6813081d908c88d Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 13 Oct 2017 17:17:49 -0700 Subject: Watter settings active and start of new joystick button type. --- indra/newview/lljoystickbutton.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'indra/newview/lljoystickbutton.h') diff --git a/indra/newview/lljoystickbutton.h b/indra/newview/lljoystickbutton.h index 4e6c774cad..ae8de1bf32 100644 --- a/indra/newview/lljoystickbutton.h +++ b/indra/newview/lljoystickbutton.h @@ -178,4 +178,35 @@ public: virtual void onHeldDown(); }; +// +class LLJoystickQuaternion : + public LLJoystick +{ +public: + struct Params : + public LLInitParam::Block + { + Params(); + }; + + LLJoystickQuaternion(const LLJoystickQuaternion::Params &); + + virtual void setToggleState(BOOL left, BOOL top, BOOL right, BOOL bottom); + + virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); + virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); + virtual void onHeldDown(); + virtual void draw(); + +protected: + F32 getOrbitRate(); + virtual void updateSlop(); + void drawRotatedImage(LLPointer image, S32 rotations); + + BOOL mInLeft; + BOOL mInTop; + BOOL mInRight; + BOOL mInBottom; +}; + #endif // LL_LLJOYSTICKBUTTON_H -- cgit v1.2.3 From 00ce291f013ce434b202da675bfb38431014a077 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 17 Oct 2017 12:03:26 -0700 Subject: New prototype control for moving sun and moon in sky. --- indra/newview/lljoystickbutton.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'indra/newview/lljoystickbutton.h') diff --git a/indra/newview/lljoystickbutton.h b/indra/newview/lljoystickbutton.h index ae8de1bf32..ee66088b56 100644 --- a/indra/newview/lljoystickbutton.h +++ b/indra/newview/lljoystickbutton.h @@ -30,6 +30,7 @@ #include "llbutton.h" #include "llcoord.h" #include "llviewertexture.h" +#include "llquaternion.h" typedef enum e_joystick_quadrant { @@ -198,6 +199,9 @@ public: virtual void onHeldDown(); virtual void draw(); + void setRotation(const LLQuaternion &value); + LLQuaternion getRotation() const; + protected: F32 getOrbitRate(); virtual void updateSlop(); @@ -207,6 +211,15 @@ protected: BOOL mInTop; BOOL mInRight; BOOL mInBottom; + + S32 mXAxisIndex; + S32 mYAxisIndex; + S32 mZAxisIndex; + + LLVector3 mVectorZero; + LLQuaternion mRotation; + LLVector3 mUpDnAxis; + LLVector3 mLfRtAxis; }; #endif // LL_LLJOYSTICKBUTTON_H -- cgit v1.2.3