diff options
-rw-r--r-- | linden/indra/newview/lltool.cpp | 4 | ||||
-rw-r--r-- | linden/indra/newview/lltoolcomp.cpp | 79 | ||||
-rw-r--r-- | linden/indra/newview/lltoolcomp.h | 11 | ||||
-rw-r--r-- | linden/indra/newview/lltoolface.cpp | 2 | ||||
-rw-r--r-- | linden/indra/newview/lltoolface.h | 3 | ||||
-rw-r--r-- | linden/indra/newview/qtoolalign.cpp | 9 | ||||
-rw-r--r-- | linden/indra/newview/qtoolalign.h | 4 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/floater_tools.xml | 20 |
8 files changed, 62 insertions, 70 deletions
diff --git a/linden/indra/newview/lltool.cpp b/linden/indra/newview/lltool.cpp index df2191b..f8188e3 100644 --- a/linden/indra/newview/lltool.cpp +++ b/linden/indra/newview/lltool.cpp | |||
@@ -40,10 +40,12 @@ | |||
40 | 40 | ||
41 | #include "llviewerwindow.h" | 41 | #include "llviewerwindow.h" |
42 | #include "lltoolcomp.h" | 42 | #include "lltoolcomp.h" |
43 | #include "lltoolface.h" | ||
43 | #include "lltoolfocus.h" | 44 | #include "lltoolfocus.h" |
44 | #include "llfocusmgr.h" | 45 | #include "llfocusmgr.h" |
45 | #include "llagent.h" | 46 | #include "llagent.h" |
46 | #include "llviewerjoystick.h" | 47 | #include "llviewerjoystick.h" |
48 | #include "qtoolalign.h" | ||
47 | 49 | ||
48 | extern BOOL gDebugClicks; | 50 | extern BOOL gDebugClicks; |
49 | 51 | ||
@@ -187,7 +189,7 @@ LLTool* LLTool::getOverrideTool(MASK mask) | |||
187 | { | 189 | { |
188 | return NULL; | 190 | return NULL; |
189 | } | 191 | } |
190 | if (mask & MASK_ALT) | 192 | else if (mask & MASK_ALT) |
191 | { | 193 | { |
192 | return LLToolCamera::getInstance(); | 194 | return LLToolCamera::getInstance(); |
193 | } | 195 | } |
diff --git a/linden/indra/newview/lltoolcomp.cpp b/linden/indra/newview/lltoolcomp.cpp index 172f71d..2ec1d8e 100644 --- a/linden/indra/newview/lltoolcomp.cpp +++ b/linden/indra/newview/lltoolcomp.cpp | |||
@@ -43,6 +43,7 @@ | |||
43 | #include "llmaniptranslate.h" | 43 | #include "llmaniptranslate.h" |
44 | #include "llmenugl.h" // for right-click menu hack | 44 | #include "llmenugl.h" // for right-click menu hack |
45 | #include "llselectmgr.h" | 45 | #include "llselectmgr.h" |
46 | #include "lltoolface.h" | ||
46 | #include "lltoolfocus.h" | 47 | #include "lltoolfocus.h" |
47 | #include "lltoolgrab.h" | 48 | #include "lltoolgrab.h" |
48 | #include "lltoolgun.h" | 49 | #include "lltoolgun.h" |
@@ -131,6 +132,36 @@ void LLToolComposite::handleSelect() | |||
131 | mSelected = TRUE; | 132 | mSelected = TRUE; |
132 | } | 133 | } |
133 | 134 | ||
135 | |||
136 | LLTool* LLToolComposite::getOverrideTool(MASK mask) | ||
137 | { | ||
138 | if (gKeyboard->getKeyDown('M') && | ||
139 | ((mask == (MASK_ALT | MASK_CONTROL)) || (mask == (MASK_ALT | MASK_CONTROL | MASK_SHIFT)))) | ||
140 | { | ||
141 | return QToolAlign::getInstance(); | ||
142 | } | ||
143 | else if (gKeyboard->getKeyDown('P') && | ||
144 | (mask == (MASK_CONTROL | MASK_SHIFT))) | ||
145 | { | ||
146 | return LLToolCompTranslate::getInstance(); | ||
147 | } | ||
148 | else if (gKeyboard->getKeyDown('F') && | ||
149 | (mask == (MASK_ALT | MASK_CONTROL))) | ||
150 | { | ||
151 | return LLToolFace::getInstance(); | ||
152 | } | ||
153 | else if (mask == (MASK_CONTROL | MASK_SHIFT)) | ||
154 | { | ||
155 | return LLToolCompScale::getInstance(); | ||
156 | } | ||
157 | else if (mask == MASK_CONTROL) | ||
158 | { | ||
159 | return LLToolCompRotate::getInstance(); | ||
160 | } | ||
161 | return LLTool::getOverrideTool(mask); | ||
162 | } | ||
163 | |||
164 | |||
134 | //---------------------------------------------------------------------------- | 165 | //---------------------------------------------------------------------------- |
135 | // LLToolCompInspect | 166 | // LLToolCompInspect |
136 | //---------------------------------------------------------------------------- | 167 | //---------------------------------------------------------------------------- |
@@ -277,24 +308,6 @@ BOOL LLToolCompTranslate::handleMouseUp(S32 x, S32 y, MASK mask) | |||
277 | return LLToolComposite::handleMouseUp(x, y, mask); | 308 | return LLToolComposite::handleMouseUp(x, y, mask); |
278 | } | 309 | } |
279 | 310 | ||
280 | LLTool* LLToolCompTranslate::getOverrideTool(MASK mask) | ||
281 | { | ||
282 | if (gKeyboard->getKeyDown('A') && | ||
283 | ((mask & MASK_CONTROL) || (mask == (MASK_CONTROL | MASK_SHIFT)))) | ||
284 | { | ||
285 | return QToolAlign::getInstance(); | ||
286 | } | ||
287 | else if (mask == MASK_CONTROL) | ||
288 | { | ||
289 | return LLToolCompRotate::getInstance(); | ||
290 | } | ||
291 | else if (mask == (MASK_CONTROL | MASK_SHIFT)) | ||
292 | { | ||
293 | return LLToolCompScale::getInstance(); | ||
294 | } | ||
295 | return LLToolComposite::getOverrideTool(mask); | ||
296 | } | ||
297 | |||
298 | BOOL LLToolCompTranslate::handleDoubleClick(S32 x, S32 y, MASK mask) | 311 | BOOL LLToolCompTranslate::handleDoubleClick(S32 x, S32 y, MASK mask) |
299 | { | 312 | { |
300 | if (mManip->getSelection()->isEmpty() && mManip->getHighlightedPart() == LLManip::LL_NO_PART) | 313 | if (mManip->getSelection()->isEmpty() && mManip->getHighlightedPart() == LLManip::LL_NO_PART) |
@@ -401,22 +414,6 @@ BOOL LLToolCompScale::handleMouseUp(S32 x, S32 y, MASK mask) | |||
401 | return LLToolComposite::handleMouseUp(x, y, mask); | 414 | return LLToolComposite::handleMouseUp(x, y, mask); |
402 | } | 415 | } |
403 | 416 | ||
404 | LLTool* LLToolCompScale::getOverrideTool(MASK mask) | ||
405 | { | ||
406 | if (gKeyboard->getKeyDown('A') && | ||
407 | ((mask & MASK_CONTROL) || (mask == (MASK_CONTROL | MASK_SHIFT)))) | ||
408 | { | ||
409 | return QToolAlign::getInstance(); | ||
410 | } | ||
411 | else if (mask == MASK_CONTROL) | ||
412 | { | ||
413 | return LLToolCompRotate::getInstance(); | ||
414 | } | ||
415 | |||
416 | return LLToolComposite::getOverrideTool(mask); | ||
417 | } | ||
418 | |||
419 | |||
420 | BOOL LLToolCompScale::handleDoubleClick(S32 x, S32 y, MASK mask) | 417 | BOOL LLToolCompScale::handleDoubleClick(S32 x, S32 y, MASK mask) |
421 | { | 418 | { |
422 | if (!mManip->getSelection()->isEmpty() && mManip->getHighlightedPart() == LLManip::LL_NO_PART) | 419 | if (!mManip->getSelection()->isEmpty() && mManip->getHighlightedPart() == LLManip::LL_NO_PART) |
@@ -604,20 +601,6 @@ BOOL LLToolCompRotate::handleMouseUp(S32 x, S32 y, MASK mask) | |||
604 | return LLToolComposite::handleMouseUp(x, y, mask); | 601 | return LLToolComposite::handleMouseUp(x, y, mask); |
605 | } | 602 | } |
606 | 603 | ||
607 | LLTool* LLToolCompRotate::getOverrideTool(MASK mask) | ||
608 | { | ||
609 | if (gKeyboard->getKeyDown('A') && | ||
610 | ((mask & MASK_CONTROL) || (mask == (MASK_CONTROL | MASK_SHIFT)))) | ||
611 | { | ||
612 | return QToolAlign::getInstance(); | ||
613 | } | ||
614 | else if (mask == (MASK_CONTROL | MASK_SHIFT)) | ||
615 | { | ||
616 | return LLToolCompScale::getInstance(); | ||
617 | } | ||
618 | return LLToolComposite::getOverrideTool(mask); | ||
619 | } | ||
620 | |||
621 | BOOL LLToolCompRotate::handleDoubleClick(S32 x, S32 y, MASK mask) | 604 | BOOL LLToolCompRotate::handleDoubleClick(S32 x, S32 y, MASK mask) |
622 | { | 605 | { |
623 | if (!mManip->getSelection()->isEmpty() && mManip->getHighlightedPart() == LLManip::LL_NO_PART) | 606 | if (!mManip->getSelection()->isEmpty() && mManip->getHighlightedPart() == LLManip::LL_NO_PART) |
diff --git a/linden/indra/newview/lltoolcomp.h b/linden/indra/newview/lltoolcomp.h index b7ec940..cb5e544 100644 --- a/linden/indra/newview/lltoolcomp.h +++ b/linden/indra/newview/lltoolcomp.h | |||
@@ -84,6 +84,9 @@ public: | |||
84 | { mCur->localPointToScreen(local_x, local_y, screen_x, screen_y); } | 84 | { mCur->localPointToScreen(local_x, local_y, screen_x, screen_y); } |
85 | 85 | ||
86 | BOOL isSelecting(); | 86 | BOOL isSelecting(); |
87 | |||
88 | virtual LLTool* getOverrideTool(MASK mask); | ||
89 | |||
87 | protected: | 90 | protected: |
88 | void setCurrentTool( LLTool* new_tool ); | 91 | void setCurrentTool( LLTool* new_tool ); |
89 | LLTool* getCurrentTool() { return mCur; } | 92 | LLTool* getCurrentTool() { return mCur; } |
@@ -135,8 +138,6 @@ public: | |||
135 | virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); // Returns to the default tool | 138 | virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); // Returns to the default tool |
136 | virtual void render(); | 139 | virtual void render(); |
137 | 140 | ||
138 | virtual LLTool* getOverrideTool(MASK mask); | ||
139 | |||
140 | static void pickCallback(const LLPickInfo& pick_info); | 141 | static void pickCallback(const LLPickInfo& pick_info); |
141 | }; | 142 | }; |
142 | 143 | ||
@@ -156,8 +157,6 @@ public: | |||
156 | virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); // Returns to the default tool | 157 | virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); // Returns to the default tool |
157 | virtual void render(); | 158 | virtual void render(); |
158 | 159 | ||
159 | virtual LLTool* getOverrideTool(MASK mask); | ||
160 | |||
161 | static void pickCallback(const LLPickInfo& pick_info); | 160 | static void pickCallback(const LLPickInfo& pick_info); |
162 | }; | 161 | }; |
163 | 162 | ||
@@ -178,11 +177,7 @@ public: | |||
178 | virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); | 177 | virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); |
179 | virtual void render(); | 178 | virtual void render(); |
180 | 179 | ||
181 | virtual LLTool* getOverrideTool(MASK mask); | ||
182 | |||
183 | static void pickCallback(const LLPickInfo& pick_info); | 180 | static void pickCallback(const LLPickInfo& pick_info); |
184 | |||
185 | protected: | ||
186 | }; | 181 | }; |
187 | 182 | ||
188 | //----------------------------------------------------------------------- | 183 | //----------------------------------------------------------------------- |
diff --git a/linden/indra/newview/lltoolface.cpp b/linden/indra/newview/lltoolface.cpp index 51a4561..834bf76 100644 --- a/linden/indra/newview/lltoolface.cpp +++ b/linden/indra/newview/lltoolface.cpp | |||
@@ -57,7 +57,7 @@ | |||
57 | // | 57 | // |
58 | 58 | ||
59 | LLToolFace::LLToolFace() | 59 | LLToolFace::LLToolFace() |
60 | : LLTool(std::string("Texture")) | 60 | : LLToolComposite(std::string("Texture")) |
61 | { } | 61 | { } |
62 | 62 | ||
63 | 63 | ||
diff --git a/linden/indra/newview/lltoolface.h b/linden/indra/newview/lltoolface.h index f2b7d23..fc6f7de 100644 --- a/linden/indra/newview/lltoolface.h +++ b/linden/indra/newview/lltoolface.h | |||
@@ -34,12 +34,13 @@ | |||
34 | #define LL_LLTOOLFACE_H | 34 | #define LL_LLTOOLFACE_H |
35 | 35 | ||
36 | #include "lltool.h" | 36 | #include "lltool.h" |
37 | #include "lltoolcomp.h" | ||
37 | 38 | ||
38 | class LLViewerObject; | 39 | class LLViewerObject; |
39 | class LLPickInfo; | 40 | class LLPickInfo; |
40 | 41 | ||
41 | class LLToolFace | 42 | class LLToolFace |
42 | : public LLTool, public LLSingleton<LLToolFace> | 43 | : public LLToolComposite, public LLSingleton<LLToolFace> |
43 | { | 44 | { |
44 | public: | 45 | public: |
45 | LLToolFace(); | 46 | LLToolFace(); |
diff --git a/linden/indra/newview/qtoolalign.cpp b/linden/indra/newview/qtoolalign.cpp index cb32d0d..b4944fe 100644 --- a/linden/indra/newview/qtoolalign.cpp +++ b/linden/indra/newview/qtoolalign.cpp | |||
@@ -36,7 +36,7 @@ const F32 MANIPULATOR_SELECT_SIZE = 20.0; | |||
36 | 36 | ||
37 | 37 | ||
38 | QToolAlign::QToolAlign() | 38 | QToolAlign::QToolAlign() |
39 | : LLTool(std::string("Align")) | 39 | : LLToolComposite(std::string("Align")) |
40 | { | 40 | { |
41 | } | 41 | } |
42 | 42 | ||
@@ -61,6 +61,11 @@ BOOL QToolAlign::handleMouseDown(S32 x, S32 y, MASK mask) | |||
61 | } | 61 | } |
62 | 62 | ||
63 | 63 | ||
64 | BOOL QToolAlign::handleDoubleClick(S32 x, S32 y, MASK mask) | ||
65 | { | ||
66 | return TRUE; | ||
67 | } | ||
68 | |||
64 | 69 | ||
65 | void QToolAlign::pickCallback(const LLPickInfo& pick_info) | 70 | void QToolAlign::pickCallback(const LLPickInfo& pick_info) |
66 | { | 71 | { |
@@ -94,7 +99,7 @@ void QToolAlign::pickCallback(const LLPickInfo& pick_info) | |||
94 | } | 99 | } |
95 | else | 100 | else |
96 | { | 101 | { |
97 | if (!(pick_info.mKeyMask == MASK_SHIFT)) | 102 | if (!(pick_info.mKeyMask & MASK_SHIFT)) |
98 | { | 103 | { |
99 | LLSelectMgr::getInstance()->deselectAll(); | 104 | LLSelectMgr::getInstance()->deselectAll(); |
100 | } | 105 | } |
diff --git a/linden/indra/newview/qtoolalign.h b/linden/indra/newview/qtoolalign.h index b2c18b7..2d30b92 100644 --- a/linden/indra/newview/qtoolalign.h +++ b/linden/indra/newview/qtoolalign.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #define Q_QTOOLALIGN_H | 13 | #define Q_QTOOLALIGN_H |
14 | 14 | ||
15 | #include "lltool.h" | 15 | #include "lltool.h" |
16 | #include "lltoolcomp.h" | ||
16 | #include "llbbox.h" | 17 | #include "llbbox.h" |
17 | 18 | ||
18 | class LLViewerObject; | 19 | class LLViewerObject; |
@@ -20,7 +21,7 @@ class LLPickInfo; | |||
20 | class LLToolSelectRect; | 21 | class LLToolSelectRect; |
21 | 22 | ||
22 | class QToolAlign | 23 | class QToolAlign |
23 | : public LLTool, public LLSingleton<QToolAlign> | 24 | : public LLToolComposite, public LLSingleton<QToolAlign> |
24 | { | 25 | { |
25 | public: | 26 | public: |
26 | QToolAlign(); | 27 | QToolAlign(); |
@@ -29,6 +30,7 @@ public: | |||
29 | virtual void handleSelect(); | 30 | virtual void handleSelect(); |
30 | virtual void handleDeselect(); | 31 | virtual void handleDeselect(); |
31 | virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); | 32 | virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); |
33 | virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask); | ||
32 | virtual BOOL handleHover(S32 x, S32 y, MASK mask); | 34 | virtual BOOL handleHover(S32 x, S32 y, MASK mask); |
33 | virtual void render(); | 35 | virtual void render(); |
34 | 36 | ||
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml index 3b78eab..2ed5120 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml | |||
@@ -69,20 +69,24 @@ | |||
69 | 69 | ||
70 | <check_box bottom="-70" follows="left|top" font="SansSerifSmall" height="16" | 70 | <check_box bottom="-70" follows="left|top" font="SansSerifSmall" height="16" |
71 | initial_value="false" label="Position" left="4" mouse_opaque="true" | 71 | initial_value="false" label="Position" left="4" mouse_opaque="true" |
72 | name="radio position" radio_style="true" width="114" /> | 72 | name="radio position" radio_style="true" width="114" |
73 | tool_tip="Position selected prims (Ctrl-Shift-P)." /> | ||
73 | <check_box bottom_delta="-15" follows="left|top" font="SansSerifSmall" height="16" | 74 | <check_box bottom_delta="-15" follows="left|top" font="SansSerifSmall" height="16" |
74 | initial_value="false" label="Rotate (Ctrl)" left="4" mouse_opaque="true" | 75 | initial_value="false" label="Rotate (Ctrl)" left="4" mouse_opaque="true" |
75 | name="radio rotate" radio_style="true" width="114" /> | 76 | name="radio rotate" radio_style="true" width="114" |
77 | tool_tip="Rotate selected prims (Ctrl)." /> | ||
76 | <check_box bottom_delta="-15" follows="left|top" font="SansSerifSmall" height="16" | 78 | <check_box bottom_delta="-15" follows="left|top" font="SansSerifSmall" height="16" |
77 | initial_value="false" label="Stretch (Ctrl-Shift)" left="4" | 79 | initial_value="false" label="Stretch (Ctrl-Shift)" left="4" |
78 | mouse_opaque="true" name="radio stretch" radio_style="true" width="123" /> | 80 | mouse_opaque="true" name="radio stretch" radio_style="true" width="123" |
81 | tool_tip="Resize selected prims (Ctrl-Shift)." /> | ||
79 | <check_box bottom_delta="-15" follows="left|top" font="SansSerifSmall" height="16" | 82 | <check_box bottom_delta="-15" follows="left|top" font="SansSerifSmall" height="16" |
80 | initial_value="false" label="Select faces to texture" left="4" mouse_opaque="true" | 83 | initial_value="false" label="Select faces to texture" left="4" mouse_opaque="true" |
81 | name="radio select face" radio_style="true" width="114" /> | 84 | name="radio select face" radio_style="true" width="114" |
85 | tool_tip="Select faces of prims to texture (Ctrl-Alt-F)." /> | ||
82 | <check_box bottom_delta="-15" follows="left|top" font="SansSerifSmall" height="16" | 86 | <check_box bottom_delta="-15" follows="left|top" font="SansSerifSmall" height="16" |
83 | initial_value="false" label="Align (Shift to Pack)" left="4" mouse_opaque="true" | 87 | initial_value="false" label="Align (Shift to Pack)" left="4" mouse_opaque="true" |
84 | name="radio align" radio_style="true" width="114" | 88 | name="radio align" radio_style="true" width="114" |
85 | tool_tip="Align aligns all selected prims' edges along an axis, Pack moves all selected prims' edges so they're touching" /> | 89 | tool_tip="Align (Ctrl-Alt-M) aligns all selected prims edges along an axis. Pack (Ctrl-Alt-Shift-M) moves all selected prims edges so they're touching." /> |
86 | <check_box bottom_delta="-19" control_name="EditLinkedParts" follows="left|top" | 90 | <check_box bottom_delta="-19" control_name="EditLinkedParts" follows="left|top" |
87 | font="SansSerifSmall" height="16" initial_value="false" | 91 | font="SansSerifSmall" height="16" initial_value="false" |
88 | label="Edit linked parts" left="4" mouse_opaque="true" | 92 | label="Edit linked parts" left="4" mouse_opaque="true" |
@@ -1364,10 +1368,10 @@ | |||
1364 | Drag to Move, Shift-Drag to Copy | 1368 | Drag to Move, Shift-Drag to Copy |
1365 | </string> | 1369 | </string> |
1366 | <string name="status_selectface"> | 1370 | <string name="status_selectface"> |
1367 | Click to selet a Face for texturing | 1371 | Click to select a Face for texturing |
1368 | </string> | 1372 | </string> |
1369 | <string name="status_align"> | 1373 | <string name="status_align"> |
1370 | CTRL-A to align on an axis, CTRL-Shift-A to Pack | 1374 | Click to Align, Shift-Click to Pack |
1371 | </string> | 1375 | </string> |
1372 | <string name="status_modifyland"> | 1376 | <string name="status_modifyland"> |
1373 | Click and Hold to Modify Land | 1377 | Click and Hold to Modify Land |
@@ -1382,7 +1386,7 @@ | |||
1382 | Click Inworld to Build | 1386 | Click Inworld to Build |
1383 | </string> | 1387 | </string> |
1384 | <string name="status_selectland"> | 1388 | <string name="status_selectland"> |
1385 | Click and Drag to Select Land | 1389 | Click and Drag to select Land |
1386 | </string> | 1390 | </string> |
1387 | <string name="grid_screen_text"> | 1391 | <string name="grid_screen_text"> |
1388 | Screen | 1392 | Screen |