diff options
author | McCabe Maxsted | 2009-09-11 00:33:33 -0700 |
---|---|---|
committer | McCabe Maxsted | 2009-09-11 00:33:33 -0700 |
commit | efa0d701845542e9ef555260fe6d2ad0beeb0760 (patch) | |
tree | 4527fe04a062d3353e4d1a77c547d1c2b1d475e9 /linden/indra/llcommon | |
parent | Fixed missing 'm' for draw distance slider (diff) | |
download | meta-impy-efa0d701845542e9ef555260fe6d2ad0beeb0760.zip meta-impy-efa0d701845542e9ef555260fe6d2ad0beeb0760.tar.gz meta-impy-efa0d701845542e9ef555260fe6d2ad0beeb0760.tar.bz2 meta-impy-efa0d701845542e9ef555260fe6d2ad0beeb0760.tar.xz |
Backported clickable object names from 1.23
Diffstat (limited to 'linden/indra/llcommon')
-rw-r--r-- | linden/indra/llcommon/CMakeLists.txt | 2 | ||||
-rw-r--r-- | linden/indra/llcommon/llchat.h | 6 | ||||
-rw-r--r-- | linden/indra/llcommon/llcursortypes.cpp | 89 | ||||
-rw-r--r-- | linden/indra/llcommon/llcursortypes.h | 81 |
4 files changed, 176 insertions, 2 deletions
diff --git a/linden/indra/llcommon/CMakeLists.txt b/linden/indra/llcommon/CMakeLists.txt index 4001e1f..3f14be6 100644 --- a/linden/indra/llcommon/CMakeLists.txt +++ b/linden/indra/llcommon/CMakeLists.txt | |||
@@ -20,6 +20,7 @@ set(llcommon_SOURCE_FILES | |||
20 | llcommon.cpp | 20 | llcommon.cpp |
21 | llcrc.cpp | 21 | llcrc.cpp |
22 | llcriticaldamp.cpp | 22 | llcriticaldamp.cpp |
23 | llcursortypes.cpp | ||
23 | lldate.cpp | 24 | lldate.cpp |
24 | llerror.cpp | 25 | llerror.cpp |
25 | llerrorthread.cpp | 26 | llerrorthread.cpp |
@@ -90,6 +91,7 @@ set(llcommon_HEADER_FILES | |||
90 | llcommon.h | 91 | llcommon.h |
91 | llcrc.h | 92 | llcrc.h |
92 | llcriticaldamp.h | 93 | llcriticaldamp.h |
94 | llcursortypes.h | ||
93 | lldarray.h | 95 | lldarray.h |
94 | lldarrayptr.h | 96 | lldarrayptr.h |
95 | lldate.h | 97 | lldate.h |
diff --git a/linden/indra/llcommon/llchat.h b/linden/indra/llcommon/llchat.h index 1bb3f3b..ec86450 100644 --- a/linden/indra/llcommon/llchat.h +++ b/linden/indra/llcommon/llchat.h | |||
@@ -77,9 +77,10 @@ public: | |||
77 | mAudible(CHAT_AUDIBLE_FULLY), | 77 | mAudible(CHAT_AUDIBLE_FULLY), |
78 | mMuted(FALSE), | 78 | mMuted(FALSE), |
79 | mTime(0.0), | 79 | mTime(0.0), |
80 | mPosAgent() | 80 | mPosAgent(), |
81 | mURL() | ||
81 | { } | 82 | { } |
82 | 83 | ||
83 | std::string mText; // UTF-8 line of text | 84 | std::string mText; // UTF-8 line of text |
84 | std::string mFromName; // agent or object name | 85 | std::string mFromName; // agent or object name |
85 | LLUUID mFromID; // agent id or object id | 86 | LLUUID mFromID; // agent id or object id |
@@ -89,6 +90,7 @@ public: | |||
89 | BOOL mMuted; // pass muted chat to maintain list of chatters | 90 | BOOL mMuted; // pass muted chat to maintain list of chatters |
90 | F64 mTime; // viewer only, seconds from viewer start | 91 | F64 mTime; // viewer only, seconds from viewer start |
91 | LLVector3 mPosAgent; | 92 | LLVector3 mPosAgent; |
93 | std::string mURL; | ||
92 | }; | 94 | }; |
93 | 95 | ||
94 | #endif | 96 | #endif |
diff --git a/linden/indra/llcommon/llcursortypes.cpp b/linden/indra/llcommon/llcursortypes.cpp new file mode 100644 index 0000000..858414b --- /dev/null +++ b/linden/indra/llcommon/llcursortypes.cpp | |||
@@ -0,0 +1,89 @@ | |||
1 | /** | ||
2 | * @file llcursortypes.cpp | ||
3 | * @brief Cursor types and lookup of types from a string | ||
4 | * | ||
5 | * $LicenseInfo:firstyear=2008&license=viewergpl$ | ||
6 | * | ||
7 | * Copyright (c) 2008, Linden Research, Inc. | ||
8 | * | ||
9 | * Second Life Viewer Source Code | ||
10 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
11 | * to you under the terms of the GNU General Public License, version 2.0 | ||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
16 | * | ||
17 | * There are special exceptions to the terms and conditions of the GPL as | ||
18 | * it is applied to this Source Code. View the full text of the exception | ||
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | ||
22 | * By copying, modifying or distributing this software, you acknowledge | ||
23 | * that you have read and understood your obligations described above, | ||
24 | * and agree to abide by those obligations. | ||
25 | * | ||
26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
28 | * COMPLETENESS OR PERFORMANCE. | ||
29 | * $/LicenseInfo$ | ||
30 | */ | ||
31 | |||
32 | #include "llcursortypes.h" | ||
33 | |||
34 | ECursorType getCursorFromString(const std::string& cursor_string) | ||
35 | { | ||
36 | static std::map<std::string,U32> cursor_string_table; | ||
37 | if (cursor_string_table.empty()) | ||
38 | { | ||
39 | cursor_string_table["UI_CURSOR_ARROW"] = UI_CURSOR_ARROW; | ||
40 | cursor_string_table["UI_CURSOR_WAIT"] = UI_CURSOR_WAIT; | ||
41 | cursor_string_table["UI_CURSOR_HAND"] = UI_CURSOR_HAND; | ||
42 | cursor_string_table["UI_CURSOR_IBEAM"] = UI_CURSOR_IBEAM; | ||
43 | cursor_string_table["UI_CURSOR_CROSS"] = UI_CURSOR_CROSS; | ||
44 | cursor_string_table["UI_CURSOR_SIZENWSE"] = UI_CURSOR_SIZENWSE; | ||
45 | cursor_string_table["UI_CURSOR_SIZENESW"] = UI_CURSOR_SIZENESW; | ||
46 | cursor_string_table["UI_CURSOR_SIZEWE"] = UI_CURSOR_SIZEWE; | ||
47 | cursor_string_table["UI_CURSOR_SIZENS"] = UI_CURSOR_SIZENS; | ||
48 | cursor_string_table["UI_CURSOR_NO"] = UI_CURSOR_NO; | ||
49 | cursor_string_table["UI_CURSOR_WORKING"] = UI_CURSOR_WORKING; | ||
50 | cursor_string_table["UI_CURSOR_TOOLGRAB"] = UI_CURSOR_TOOLGRAB; | ||
51 | cursor_string_table["UI_CURSOR_TOOLLAND"] = UI_CURSOR_TOOLLAND; | ||
52 | cursor_string_table["UI_CURSOR_TOOLFOCUS"] = UI_CURSOR_TOOLFOCUS; | ||
53 | cursor_string_table["UI_CURSOR_TOOLCREATE"] = UI_CURSOR_TOOLCREATE; | ||
54 | cursor_string_table["UI_CURSOR_ARROWDRAG"] = UI_CURSOR_ARROWDRAG; | ||
55 | cursor_string_table["UI_CURSOR_ARROWCOPY"] = UI_CURSOR_ARROWCOPY; | ||
56 | cursor_string_table["UI_CURSOR_ARROWDRAGMULTI"] = UI_CURSOR_ARROWDRAGMULTI; | ||
57 | cursor_string_table["UI_CURSOR_ARROWCOPYMULTI"] = UI_CURSOR_ARROWCOPYMULTI; | ||
58 | cursor_string_table["UI_CURSOR_NOLOCKED"] = UI_CURSOR_NOLOCKED; | ||
59 | cursor_string_table["UI_CURSOR_ARROWLOCKED"] = UI_CURSOR_ARROWLOCKED; | ||
60 | cursor_string_table["UI_CURSOR_GRABLOCKED"] = UI_CURSOR_GRABLOCKED; | ||
61 | cursor_string_table["UI_CURSOR_TOOLTRANSLATE"] = UI_CURSOR_TOOLTRANSLATE; | ||
62 | cursor_string_table["UI_CURSOR_TOOLROTATE"] = UI_CURSOR_TOOLROTATE; | ||
63 | cursor_string_table["UI_CURSOR_TOOLSCALE"] = UI_CURSOR_TOOLSCALE; | ||
64 | cursor_string_table["UI_CURSOR_TOOLCAMERA"] = UI_CURSOR_TOOLCAMERA; | ||
65 | cursor_string_table["UI_CURSOR_TOOLPAN"] = UI_CURSOR_TOOLPAN; | ||
66 | cursor_string_table["UI_CURSOR_TOOLZOOMIN"] = UI_CURSOR_TOOLZOOMIN; | ||
67 | cursor_string_table["UI_CURSOR_TOOLPICKOBJECT3"] = UI_CURSOR_TOOLPICKOBJECT3; | ||
68 | cursor_string_table["UI_CURSOR_TOOLSIT"] = UI_CURSOR_TOOLSIT; | ||
69 | cursor_string_table["UI_CURSOR_TOOLBUY"] = UI_CURSOR_TOOLBUY; | ||
70 | cursor_string_table["UI_CURSOR_TOOLPAY"] = UI_CURSOR_TOOLPAY; | ||
71 | cursor_string_table["UI_CURSOR_TOOLOPEN"] = UI_CURSOR_TOOLOPEN; | ||
72 | cursor_string_table["UI_CURSOR_TOOLPLAY"] = UI_CURSOR_TOOLPLAY; | ||
73 | cursor_string_table["UI_CURSOR_TOOLPAUSE"] = UI_CURSOR_TOOLPAUSE; | ||
74 | cursor_string_table["UI_CURSOR_TOOLMEDIAOPEN"] = UI_CURSOR_TOOLMEDIAOPEN; | ||
75 | cursor_string_table["UI_CURSOR_PIPETTE"] = UI_CURSOR_PIPETTE; | ||
76 | } | ||
77 | |||
78 | std::map<std::string,U32>::const_iterator iter = cursor_string_table.find(cursor_string); | ||
79 | |||
80 | if (iter != cursor_string_table.end()) | ||
81 | { | ||
82 | return (ECursorType)iter->second; | ||
83 | } | ||
84 | |||
85 | return UI_CURSOR_ARROW; | ||
86 | } | ||
87 | |||
88 | |||
89 | |||
diff --git a/linden/indra/llcommon/llcursortypes.h b/linden/indra/llcommon/llcursortypes.h new file mode 100644 index 0000000..9be064f --- /dev/null +++ b/linden/indra/llcommon/llcursortypes.h | |||
@@ -0,0 +1,81 @@ | |||
1 | /** | ||
2 | * @file llcursortypes.h | ||
3 | * @brief Cursor types | ||
4 | * | ||
5 | * $LicenseInfo:firstyear=2008&license=viewergpl$ | ||
6 | * | ||
7 | * Copyright (c) 2008, Linden Research, Inc. | ||
8 | * | ||
9 | * Second Life Viewer Source Code | ||
10 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
11 | * to you under the terms of the GNU General Public License, version 2.0 | ||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
16 | * | ||
17 | * There are special exceptions to the terms and conditions of the GPL as | ||
18 | * it is applied to this Source Code. View the full text of the exception | ||
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | ||
22 | * By copying, modifying or distributing this software, you acknowledge | ||
23 | * that you have read and understood your obligations described above, | ||
24 | * and agree to abide by those obligations. | ||
25 | * | ||
26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
28 | * COMPLETENESS OR PERFORMANCE. | ||
29 | * $/LicenseInfo$ | ||
30 | */ | ||
31 | |||
32 | #ifndef LL_LLCURSORTYPES_H | ||
33 | #define LL_LLCURSORTYPES_H | ||
34 | |||
35 | #include "linden_common.h" | ||
36 | |||
37 | // If you add types here, add them in LLCursor::getCursorFromString | ||
38 | enum ECursorType { | ||
39 | UI_CURSOR_ARROW, | ||
40 | UI_CURSOR_WAIT, | ||
41 | UI_CURSOR_HAND, | ||
42 | UI_CURSOR_IBEAM, | ||
43 | UI_CURSOR_CROSS, | ||
44 | UI_CURSOR_SIZENWSE, | ||
45 | UI_CURSOR_SIZENESW, | ||
46 | UI_CURSOR_SIZEWE, | ||
47 | UI_CURSOR_SIZENS, | ||
48 | UI_CURSOR_NO, | ||
49 | UI_CURSOR_WORKING, | ||
50 | UI_CURSOR_TOOLGRAB, | ||
51 | UI_CURSOR_TOOLLAND, | ||
52 | UI_CURSOR_TOOLFOCUS, | ||
53 | UI_CURSOR_TOOLCREATE, | ||
54 | UI_CURSOR_ARROWDRAG, | ||
55 | UI_CURSOR_ARROWCOPY, // drag with copy | ||
56 | UI_CURSOR_ARROWDRAGMULTI, | ||
57 | UI_CURSOR_ARROWCOPYMULTI, // drag with copy | ||
58 | UI_CURSOR_NOLOCKED, | ||
59 | UI_CURSOR_ARROWLOCKED, | ||
60 | UI_CURSOR_GRABLOCKED, | ||
61 | UI_CURSOR_TOOLTRANSLATE, | ||
62 | UI_CURSOR_TOOLROTATE, | ||
63 | UI_CURSOR_TOOLSCALE, | ||
64 | UI_CURSOR_TOOLCAMERA, | ||
65 | UI_CURSOR_TOOLPAN, | ||
66 | UI_CURSOR_TOOLZOOMIN, | ||
67 | UI_CURSOR_TOOLPICKOBJECT3, | ||
68 | UI_CURSOR_TOOLSIT, | ||
69 | UI_CURSOR_TOOLBUY, | ||
70 | UI_CURSOR_TOOLPAY, | ||
71 | UI_CURSOR_TOOLOPEN, | ||
72 | UI_CURSOR_TOOLPLAY, | ||
73 | UI_CURSOR_TOOLPAUSE, | ||
74 | UI_CURSOR_TOOLMEDIAOPEN, | ||
75 | UI_CURSOR_PIPETTE, | ||
76 | UI_CURSOR_COUNT // Number of elements in this enum (NOT a cursor) | ||
77 | }; | ||
78 | |||
79 | ECursorType getCursorFromString(const std::string& cursor_string); | ||
80 | |||
81 | #endif // LL_LLCURSORTYPES_H | ||