diff options
author | McCabe Maxsted | 2009-06-13 01:18:31 -0700 |
---|---|---|
committer | McCabe Maxsted | 2009-06-13 01:18:31 -0700 |
commit | 6ca9572497f3ccfa3cd46130685baada752e7fe1 (patch) | |
tree | 7f4be21c3cbadbfd079cb32ac3585009cad88a0d /linden/indra/newview/llnetmap.h | |
parent | Applied Aimee's patch for VWR-6918: Hide/Show Selection Outlines (diff) | |
download | meta-impy-6ca9572497f3ccfa3cd46130685baada752e7fe1.zip meta-impy-6ca9572497f3ccfa3cd46130685baada752e7fe1.tar.gz meta-impy-6ca9572497f3ccfa3cd46130685baada752e7fe1.tar.bz2 meta-impy-6ca9572497f3ccfa3cd46130685baada752e7fe1.tar.xz |
Applied Aimee's patch for VWR-13221: Allow panning of the mini-map
Diffstat (limited to 'linden/indra/newview/llnetmap.h')
-rw-r--r-- | linden/indra/newview/llnetmap.h | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/linden/indra/newview/llnetmap.h b/linden/indra/newview/llnetmap.h index be5593d..508e882 100644 --- a/linden/indra/newview/llnetmap.h +++ b/linden/indra/newview/llnetmap.h | |||
@@ -40,9 +40,14 @@ | |||
40 | #include "llimage.h" | 40 | #include "llimage.h" |
41 | #include "llimagegl.h" | 41 | #include "llimagegl.h" |
42 | 42 | ||
43 | |||
44 | class LLTextBox; | 43 | class LLTextBox; |
45 | 44 | ||
45 | typedef enum e_minimap_center | ||
46 | { | ||
47 | MAP_CENTER_NONE = 0, | ||
48 | MAP_CENTER_CAMERA = 1 | ||
49 | } EMiniMapCenter; | ||
50 | |||
46 | class LLNetMap : public LLPanel | 51 | class LLNetMap : public LLPanel |
47 | { | 52 | { |
48 | public: | 53 | public: |
@@ -51,6 +56,9 @@ public: | |||
51 | 56 | ||
52 | virtual void draw(); | 57 | virtual void draw(); |
53 | virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); | 58 | virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); |
59 | virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); | ||
60 | virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); | ||
61 | virtual BOOL handleHover( S32 x, S32 y, MASK mask ); | ||
54 | virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask ); | 62 | virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask ); |
55 | virtual BOOL handleRightMouseDown( S32 x, S32 y, MASK mask ); | 63 | virtual BOOL handleRightMouseDown( S32 x, S32 y, MASK mask ); |
56 | virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); | 64 | virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); |
@@ -62,7 +70,7 @@ private: | |||
62 | 70 | ||
63 | void setScale( F32 scale ); | 71 | void setScale( F32 scale ); |
64 | 72 | ||
65 | // *TODO: Enable panning of the mini-map | 73 | // Not used at present |
66 | void translatePan( F32 delta_x, F32 delta_y ); | 74 | void translatePan( F32 delta_x, F32 delta_y ); |
67 | void setPan( F32 x, F32 y ) { mTargetPanX = x; mTargetPanY = y; } | 75 | void setPan( F32 x, F32 y ) { mTargetPanX = x; mTargetPanY = y; } |
68 | 76 | ||
@@ -90,6 +98,13 @@ private: | |||
90 | F32 mTargetPanY; | 98 | F32 mTargetPanY; |
91 | F32 mCurPanX; | 99 | F32 mCurPanX; |
92 | F32 mCurPanY; | 100 | F32 mCurPanY; |
101 | |||
102 | BOOL mPanning; // map has been dragged | ||
103 | S32 mMouseDownPanX; // value at start of drag | ||
104 | S32 mMouseDownPanY; // value at start of drag | ||
105 | S32 mMouseDownX; | ||
106 | S32 mMouseDownY; | ||
107 | |||
93 | BOOL mUpdateNow; | 108 | BOOL mUpdateNow; |
94 | LLVector3d mObjectImageCenterGlobal; | 109 | LLVector3d mObjectImageCenterGlobal; |
95 | LLPointer<LLImageRaw> mObjectRawImagep; | 110 | LLPointer<LLImageRaw> mObjectRawImagep; |
@@ -102,6 +117,8 @@ private: | |||
102 | static BOOL sRotateMap; | 117 | static BOOL sRotateMap; |
103 | static LLNetMap* sInstance; | 118 | static LLNetMap* sInstance; |
104 | static BOOL isAgentUnderCursor(void*) { return sInstance && sInstance->mClosestAgentToCursor.notNull(); } | 119 | static BOOL isAgentUnderCursor(void*) { return sInstance && sInstance->mClosestAgentToCursor.notNull(); } |
120 | static BOOL outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y); | ||
121 | |||
105 | static void showAgentProfile(void*); | 122 | static void showAgentProfile(void*); |
106 | BOOL isAgentUnderCursor() { return mClosestAgentToCursor.notNull(); } | 123 | BOOL isAgentUnderCursor() { return mClosestAgentToCursor.notNull(); } |
107 | 124 | ||
@@ -111,6 +128,18 @@ private: | |||
111 | /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata); | 128 | /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata); |
112 | }; | 129 | }; |
113 | 130 | ||
131 | class LLCenterMap : public LLMemberListener<LLNetMap> | ||
132 | { | ||
133 | public: | ||
134 | /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata); | ||
135 | }; | ||
136 | |||
137 | class LLCheckCenterMap : public LLMemberListener<LLNetMap> | ||
138 | { | ||
139 | public: | ||
140 | /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata); | ||
141 | }; | ||
142 | |||
114 | class LLStopTracking : public LLMemberListener<LLNetMap> | 143 | class LLStopTracking : public LLMemberListener<LLNetMap> |
115 | { | 144 | { |
116 | public: | 145 | public: |